Skip to content

Commit

Permalink
Merge pull request #242 from moosetechnology/remove-segment
Browse files Browse the repository at this point in the history
Deletion of segment in FASTFortran metamodel and move it in FASTEsope…
  • Loading branch information
uNouss authored Dec 20, 2024
2 parents a591ebd + 37b8d03 commit 6630986
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 130 deletions.
2 changes: 1 addition & 1 deletion src/FAST-Fortran-Entities/FASTFortranComment.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ A fortran comment
| Name | Type | Default value | Comment |
|---|
| `content` | `String` | nil | Determines a content of a comment|
| `content` | `String` | nil | Content of the comment as a String|
| `content` | `String` | nil | Determines a content of a comment|
| `endPos` | `Number` | nil | |
| `startPos` | `Number` | nil | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ I represent a Fortran ""implied do"" expression
| Relation | Origin | Opposite | Type | Comment |
|---|
| `loopControl` | `FASTFortranTWithLoopControl` | `parentLoop` | `FASTFortranLoopControlExpression` | loop control|
| `variables` | `FASTFortranImpliedDoExpression` | `parentImpliedExpression` | `FASTTVariableEntity` | |
| `variables` | `FASTFortranTVariableGroup` | `parentVariableGroup` | `FASTFortranVariable` | |
| `variables` | `FASTFortranImpliedDoExpression` | `parentImpliedExpression` | `FASTTVariableEntity` | |
Expand Down
66 changes: 0 additions & 66 deletions src/FAST-Fortran-Entities/FASTFortranSegment.class.st

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Contains the block of Fortran statements
|---|
| `fastBehaviouralParent` | `FASTTStatementBlock` | `statementBlock` | `FASTTBehaviouralEntity` | Behavioural entity containing the statement block.|
| `parentDoStatement` | `FASTFortranStatementBlock` | `statementBlock` | `FASTFortranDoStatement` | Parent do statement|
| `parentIfBlock` | `FASTFortranStatementBlock` | `elseStatementBlock` | `FASTFortranIfBlockStatement` | Parent if block|
| `parentIfBlock` | `FASTFortranStatementBlock` | `thenStatementBlock` | `FASTFortranIfBlockStatement` | Parent if block|
| `parentIfBlock` | `FASTFortranStatementBlock` | `elseStatementBlock` | `FASTFortranIfBlockStatement` | Parent if block|
| `statementContainer` | `FASTTStatement` | `statements` | `FASTTStatementBlock` | Block containing this statement.|
### Children
Expand Down
7 changes: 0 additions & 7 deletions src/FAST-Fortran-Entities/FASTFortranTEntityCreator.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -657,13 +657,6 @@ FASTFortranTEntityCreator >> newScalarVariable [
^ self add: FASTFortranScalarVariable new
]

{ #category : 'entity creation' }
FASTFortranTEntityCreator >> newSegment [

<generated>
^ self add: FASTFortranSegment new
]

{ #category : 'entity creation' }
FASTFortranTEntityCreator >> newStatementBlock [

Expand Down
33 changes: 0 additions & 33 deletions src/FAST-Fortran-Generator/FASTFortranGenerator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ Class {
'tBinaryExpression',
'tVariableEntity',
'entity',
'segment',
'tDeclaration',
'tWithDeclarations',
'fieldAccess',
Expand Down Expand Up @@ -192,31 +191,6 @@ where the most common specifiers are:
'
]

{ #category : 'definition' }
FASTFortranGenerator >> commentForSegment [

^ '
```st
FASTFortranSegment new
name: ''toto'';
statements: {
FASTFortranVariableDeclarationStatement new
type: (FASTFortranIntegerType new
size: (FASTFortranScalarVariable new name: ''m'')
);
declarators: {
FASTFortranVariableDeclarator new
name: ''x'';
dimensions: {
FASTFortranArrayRange new
upperBound: (FASTFortranScalarVariable new name: ''n'')
}
}
}
```
'
]

{ #category : 'definition' }
FASTFortranGenerator >> defineClasses [

Expand Down Expand Up @@ -410,8 +384,6 @@ FASTFortranGenerator >> defineFASTClasses [

entity := self newClassNamed: #Entity.

segment := self newClassNamed: #Segment comment: self commentForSegment.

programFile := self
newClassNamed: #ProgramFile
comment:
Expand Down Expand Up @@ -644,11 +616,6 @@ FASTFortranGenerator >> defineHierarchy [
logicalType --|> type.
realType --|> type.

segment --|> type.
segment --|> #TStatementBlock.
segment --|> tDeclaration.
segment --|> tNamedEntity.

asterisk --|> integerConstant. "used as type size"
asterisk --|> tEntryArgument.
asterisk --|> tFormat.
Expand Down
13 changes: 0 additions & 13 deletions src/FAST-Fortran-Visitors/FASTFortranCopyVisitor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -1139,19 +1139,6 @@ FASTFortranCopyVisitor >> visitFASTFortranScalarVariable: aFASTFortranScalarVari

]

{ #category : 'visiting' }
FASTFortranCopyVisitor >> visitFASTFortranSegment: aFASTFortranSegment [
<generated>
^FASTFortranSegment new
size: (self copy: aFASTFortranSegment size) ;
name: (self copy: aFASTFortranSegment name) ;
statements: (self copy: aFASTFortranSegment statements) ;
startPos: (self copy: aFASTFortranSegment startPos) ;
endPos: (self copy: aFASTFortranSegment endPos) ;
yourself

]

{ #category : 'visiting' }
FASTFortranCopyVisitor >> visitFASTFortranStatementBlock: aFASTFortranStatementBlock [
<generated>
Expand Down
8 changes: 0 additions & 8 deletions src/FAST-Fortran-Visitors/FASTFortranSegment.extension.st

This file was deleted.

0 comments on commit 6630986

Please sign in to comment.