Skip to content

Commit 551be8a

Browse files
authored
Merge pull request #217 from moosetechnology/included-file
Included file
2 parents be44c8c + d8b1e5a commit 551be8a

6 files changed

+21
-14
lines changed

src/EsopeImporter-Tests/FamixEsopeResolverTest.class.st

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ FamixEsopeResolverTest >> setUp [
1414

1515
super setUp.
1616

17+
mooseModel setIntrinsicTypes.
1718
resolver := FamixEsopeResolver on: mooseModel.
1819
]
1920

src/EsopeImporter-Tests/IASTToFamixVisitorTest.class.st

+1
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ IASTToFamixVisitorTest >> setUp [
192192

193193
programFile := IASTProgramFile new filename: 'fortran77.f' ; yourself.
194194
visitor := IASTToFamixFortranVisitor new.
195+
visitor model setIntrinsicTypes
195196
]
196197

197198
{ #category : 'tests-fortran' }

src/EsopeImporter/FamixEsopeModel.extension.st

+8-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ Extension { #name : 'FamixEsopeModel' }
44
FamixEsopeModel >> initialize [
55

66
super initialize.
7-
self name: 'EsopeMooseModel'.
8-
self attributeAt: #instrinsicTypes put: self intrinsicTypes.
9-
self attributeAt: #unknownType put: [ self newTypeUnknown ]
7+
self name: 'EsopeMooseModel'
108
]
119

1210
{ #category : '*EsopeImporter' }
@@ -20,3 +18,10 @@ FamixEsopeModel >> intrinsicTypes [
2018
(#character -> (self newTypeIntrinsic name: #character)) }
2119
asDictionary
2220
]
21+
22+
{ #category : '*EsopeImporter' }
23+
FamixEsopeModel >> setIntrinsicTypes [
24+
25+
self attributeAt: #instrinsicTypes put: self intrinsicTypes.
26+
self attributeAt: #unknownType put: [ self newTypeUnknown ]
27+
]

src/EsopeImporter/FamixF77Model.extension.st

+7
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,10 @@ FamixF77Model >> intrinsicTypes [
1919
(#character -> (self newTypeIntrinsic name: #character))
2020
} asDictionary
2121
]
22+
23+
{ #category : '*EsopeImporter' }
24+
FamixF77Model >> setIntrinsicTypes [
25+
26+
self attributeAt: #instrinsicTypes put: self intrinsicTypes.
27+
self attributeAt: #unknownType put: [ self newTypeUnknown ]
28+
]

src/EsopeImporter/IASTAbstractFamixVisitor.class.st

+1-8
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ IASTAbstractFamixVisitor >> model [
7272
IASTAbstractFamixVisitor >> model: anObject [
7373

7474
model := anObject.
75-
self setIntrinsicTypes
75+
model setIntrinsicTypes
7676
]
7777

7878
{ #category : 'private-creation' }
@@ -99,13 +99,6 @@ IASTAbstractFamixVisitor >> retrieveTypeFrom: aName [
9999
) at: aName ifAbsent: typeNotFoundBlock.
100100
]
101101

102-
{ #category : 'private - helpers' }
103-
IASTAbstractFamixVisitor >> setIntrinsicTypes [
104-
105-
model attributeAt: #instrinsicTypes put: model intrinsicTypes.
106-
model attributeAt: #unknownType put: [ model newTypeUnknown ]
107-
]
108-
109102
{ #category : 'spawn' }
110103
IASTAbstractFamixVisitor >> spawn: aVisitorClass [
111104
^aVisitorClass new

src/EsopeImporter/IASTToFamixFortranVisitor.class.st

+3-3
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ IASTToFamixFortranVisitor >> visitIASTIncludedFile: anIncludedFile [
210210
'.
211211

212212
anIncludedFile sourceAnchor
213-
startLine: anIncludedFile sourceAnchor startLine + 1;
214-
startColumn: 1;
215-
endLine: anIncludedFile sourceAnchor endLine - 1;
213+
startLine: anIncludedFile sourceAnchor startLine + 1 ;
214+
startColumn: 1 ;
215+
endLine: anIncludedFile sourceAnchor endLine ;
216216
endColumn: 1.
217217

218218
^ self

0 commit comments

Comments
 (0)