Skip to content

Commit

Permalink
Merge pull request #36 from moosetechnology/31-create-FamixF77Implicit
Browse files Browse the repository at this point in the history
  • Loading branch information
uNouss authored Oct 6, 2023
2 parents 96c0d48 + 8bd952a commit 1166982
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 3 deletions.
18 changes: 18 additions & 0 deletions src/Famix-Fortran77-Entities/FamixF77ExternalDeclaration.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"
Im a external declaration.
[See more](https://docs.oracle.com/cd/E19957-01/805-4939/6j4m0vn9d/index.html)
"
Class {
#name : #FamixF77ExternalDeclaration,
#superclass : #FamixF77NamedEntity,
#category : #'Famix-Fortran77-Entities-Entities'
}

{ #category : #meta }
FamixF77ExternalDeclaration class >> annotation [

<FMClass: #ExternalDeclaration super: #FamixF77NamedEntity>
<package: #'Famix-Fortran77-Entities'>
<generated>
^ self
]
49 changes: 49 additions & 0 deletions src/Famix-Fortran77-Entities/FamixF77Implicit.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
"
[Implicit](https://docs.oracle.com/cd/E19957-01/805-4939/6j4m0vn9v/index.html) statement
"
Class {
#name : #FamixF77Implicit,
#superclass : #FamixF77Entity,
#instVars : [
'#letters => FMProperty',
'#type => FMProperty'
],
#category : #'Famix-Fortran77-Entities-Entities'
}

{ #category : #meta }
FamixF77Implicit class >> annotation [

<FMClass: #Implicit super: #FamixF77Entity>
<package: #'Famix-Fortran77-Entities'>
<generated>
^ self
]

{ #category : #accessing }
FamixF77Implicit >> letters [

<FMProperty: #letters type: #Object>
<generated>
^ letters
]

{ #category : #accessing }
FamixF77Implicit >> letters: anObject [
<generated>
letters := anObject
]

{ #category : #accessing }
FamixF77Implicit >> type [

<FMProperty: #type type: #FamixTType>
<generated>
^ type
]

{ #category : #accessing }
FamixF77Implicit >> type: anObject [
<generated>
type := anObject
]
28 changes: 28 additions & 0 deletions src/Famix-Fortran77-Entities/FamixF77ImportingContext.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@ FamixF77ImportingContext >> importComment [
^ self importConcreteEntity: (self class fm3ClassNamed: #Comment)
]

{ #category : #importing }
FamixF77ImportingContext >> importExternalDeclaration [

<generated>
^ self importConcreteEntity: (self class fm3ClassNamed: #ExternalDeclaration)
]

{ #category : #importing }
FamixF77ImportingContext >> importImplicit [

<generated>
^ self importConcreteEntity: (self class fm3ClassNamed: #Implicit)
]

{ #category : #importing }
FamixF77ImportingContext >> importInclude [

Expand Down Expand Up @@ -176,6 +190,20 @@ FamixF77ImportingContext >> shouldImportComment [
^ self shouldImport: #Comment
]

{ #category : #testing }
FamixF77ImportingContext >> shouldImportExternalDeclaration [

<generated>
^ self shouldImport: #ExternalDeclaration
]

{ #category : #testing }
FamixF77ImportingContext >> shouldImportImplicit [

<generated>
^ self shouldImport: #Implicit
]

{ #category : #testing }
FamixF77ImportingContext >> shouldImportInclude [

Expand Down
14 changes: 14 additions & 0 deletions src/Famix-Fortran77-Entities/FamixF77TEntityCreator.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ FamixF77TEntityCreator >> newComment [
^ self add: FamixF77Comment new
]

{ #category : #'entity creation' }
FamixF77TEntityCreator >> newExternalDeclaration [

<generated>
^ self add: FamixF77ExternalDeclaration new
]

{ #category : #'entity creation' }
FamixF77TEntityCreator >> newImplicit [

<generated>
^ self add: FamixF77Implicit new
]

{ #category : #'entity creation' }
FamixF77TEntityCreator >> newInclude [

Expand Down
32 changes: 29 additions & 3 deletions src/Famix-Fortran77-Generator/FamixFortran77Generator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ Class {
'typeIntrinsic',
'include',
'includedFile',
'typeUnknown'
'typeUnknown',
'externalDeclaration',
'implicit'
],
#category : #'Famix-Fortran77-Generator'
}
Expand Down Expand Up @@ -102,6 +104,12 @@ FamixFortran77Generator >> defineClasses [

comment comment: self fCommentEntityComment.

externalDeclaration := builder
newClassNamed: #ExternalDeclaration
comment: self externalDeclarationComment.

implicit := builder newClassNamed: #Implicit comment: self implicitComment.

indexedFileAnchor := builder
newClassNamed: #IndexedFileAnchor
comment: self indexedFileAnchorComment.
Expand Down Expand Up @@ -166,8 +174,8 @@ FamixFortran77Generator >> defineClasses [
comment: self typeIntrinsicComment.

typeUnknown := builder
newClassNamed: #TypeUnknown
comment: self typeIntrinsicComment.
newClassNamed: #TypeUnknown
comment: self typeIntrinsicComment.

variable := builder
newClassNamed: #Variable
Expand All @@ -185,6 +193,8 @@ FamixFortran77Generator >> defineHierarchy [
"character --|> typeIntrinsic.
complex --|> typeIntrinsic."

externalDeclaration --|> namedEntity.

indexedFileAnchor --|> sourceAnchor.
indexedFileAnchor --|> #TFileNavigation.
Expand Down Expand Up @@ -263,6 +273,9 @@ FamixFortran77Generator >> defineProperties [

(comment property: #isEsope type: #Boolean defaultValue: false)
comment: 'It is esope comment ?'.

(implicit property: #letters type: #Object) comment: ''.
(implicit property: #type type: #FamixTType) comment: ''.

(include property: #isLocal type: #Boolean) comment:
'Whether this is a local include (with "included.h") or a system one (with <included.h>)'.
Expand Down Expand Up @@ -310,6 +323,13 @@ FamixFortran77Generator >> defineRelations [
'All inclusions made by this programUnits')
]

{ #category : #definition }
FamixFortran77Generator >> externalDeclarationComment [

^ 'Im a external declaration.
[See more](https://docs.oracle.com/cd/E19957-01/805-4939/6j4m0vn9d/index.html)'
]

{ #category : #'class comment' }
FamixFortran77Generator >> fCommentEntityComment [

Expand All @@ -322,6 +342,12 @@ FamixFortran77Generator >> fileEntityComment [
^ 'a fortran file'
]

{ #category : #definition }
FamixFortran77Generator >> implicitComment [

^ '[Implicit](https://docs.oracle.com/cd/E19957-01/805-4939/6j4m0vn9v/index.html) statement'
]

{ #category : #'private - utility' }
FamixFortran77Generator >> implicitPropertyFor: anInstanceVar [
(anInstanceVar
Expand Down

0 comments on commit 1166982

Please sign in to comment.