Skip to content

Commit

Permalink
Merge pull request #38 from moosetechnology/fix-generator-external-de…
Browse files Browse the repository at this point in the history
…claration

Fix external declaration entity
  • Loading branch information
uNouss authored Dec 11, 2023
2 parents 4828fce + 62ac4a0 commit ea92601
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/Famix-Fortran77-Entities/FamixF77ExternalDeclaration.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ Im a external declaration.
Class {
#name : #FamixF77ExternalDeclaration,
#superclass : #FamixF77NamedEntity,
#traits : 'FamixTSourceEntity',
#classTraits : 'FamixTSourceEntity classTrait',
#instVars : [
'#programUnit => FMOne type: #FamixF77ProgramUnit opposite: #externalDeclarations'
],
#category : #'Famix-Fortran77-Entities-Entities'
}

Expand All @@ -16,3 +21,26 @@ FamixF77ExternalDeclaration class >> annotation [
<generated>
^ self
]

{ #category : #accessing }
FamixF77ExternalDeclaration >> programUnit [
"Relation named: #programUnit type: #FamixF77ProgramUnit opposite: #externalDeclarations"

<generated>
<container>
^ programUnit
]

{ #category : #accessing }
FamixF77ExternalDeclaration >> programUnit: anObject [

<generated>
programUnit := anObject
]

{ #category : #navigation }
FamixF77ExternalDeclaration >> programUnitGroup [
<generated>
<navigation: 'ProgramUnit'>
^ MooseSpecializedGroup with: self programUnit
]
30 changes: 30 additions & 0 deletions src/Famix-Fortran77-Entities/FamixF77ProgramUnit.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Class {
#traits : 'FamixTSourceEntity + FamixTWithComments + TEntityMetaLevelDependency',
#classTraits : 'FamixTSourceEntity classTrait + FamixTWithComments classTrait + TEntityMetaLevelDependency classTrait',
#instVars : [
'#externalDeclarations => FMMany type: #FamixF77ExternalDeclaration opposite: #programUnit',
'#includes => FMMany type: #FamixF77Include opposite: #includedBy',
'#programFile => FMOne type: #FamixF77ProgramFile opposite: #programUnits'
],
Expand All @@ -30,6 +31,12 @@ FamixF77ProgramUnit class >> isAbstract [
^ self == FamixF77ProgramUnit
]

{ #category : #adding }
FamixF77ProgramUnit >> addExternalDeclaration: anObject [
<generated>
^ self externalDeclarations add: anObject
]

{ #category : #adding }
FamixF77ProgramUnit >> addInclude: anObject [
<generated>
Expand All @@ -51,6 +58,29 @@ FamixF77ProgramUnit >> dicImplicit [
^ self attributeAt: #dicImplicit ifAbsentPut: [ self defaultImplicit ]
]

{ #category : #accessing }
FamixF77ProgramUnit >> externalDeclarations [
"Relation named: #externalDeclarations type: #FamixF77ExternalDeclaration opposite: #programUnit"

<generated>
<derived>
^ externalDeclarations
]

{ #category : #accessing }
FamixF77ProgramUnit >> externalDeclarations: anObject [

<generated>
externalDeclarations value: anObject
]

{ #category : #navigation }
FamixF77ProgramUnit >> externalDeclarationsGroup [
<generated>
<navigation: 'ExternalDeclarations'>
^ MooseSpecializedGroup withAll: self externalDeclarations asSet
]

{ #category : #testing }
FamixF77ProgramUnit >> implicits [

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ FamixFortran77Generator >> defineHierarchy [
complex --|> typeIntrinsic."

externalDeclaration --|> namedEntity.
externalDeclaration --|> #TSourceEntity.

indexedFileAnchor --|> sourceAnchor.
indexedFileAnchor --|> #TFileNavigation.
Expand Down Expand Up @@ -311,6 +312,7 @@ FamixFortran77Generator >> defineRelations [
super defineRelations.

programFile <>-* programUnit.
programUnit <>-* externalDeclaration.

((include property: #included)
comment: 'File included';
Expand Down

0 comments on commit ea92601

Please sign in to comment.