Skip to content

Commit 0ea1b26

Browse files
committed
Fix wrong parent name for entities in left and right side of a for statement
1 parent 83c3d13 commit 0ea1b26

3 files changed

Lines changed: 16 additions & 16 deletions

File tree

‎src/FAST-Python-Model-Generator/FASTPythonMetamodelGenerator.class.st‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -750,9 +750,9 @@ FASTPythonMetamodelGenerator >> defineRelations [
750750
(forInClause property: #right) <>- (expression property: #parentForInClauseRight).
751751

752752
((forStatement property: #right) comment: 'The list that the for statement iterates over')
753-
<>- ((expression property: #parentForStatementLeft) comment: 'The for statement owner (if possible)').
753+
<>- ((expression property: #parentForStatementRight) comment: 'The for statement right owner (if possible)').
754754
((forStatement property: #left) comment: 'The identifier of the created local variable or tuple')
755-
<>- ((expression property: #parentForStatementRight) comment: 'The for statement owner (if possible)').
755+
<>- ((expression property: #parentForStatementLeft) comment: 'The for statement left owner (if possible)').
756756

757757
(functionDefinition property: #returnType) <>- (type property: #parentFunctionDefinition).
758758

‎src/FAST-Python-Model/FASTPyExpression.class.st‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side|
2929
| `parentForInClauseLeft` | `FASTPyExpression` | `left` | `FASTPyForInClause` | |
3030
| `parentForInClauseRight` | `FASTPyExpression` | `right` | `FASTPyForInClause` | |
31-
| `parentForStatementLeft` | `FASTPyExpression` | `right` | `FASTPyForStatement` | The for statement owner (if possible)|
32-
| `parentForStatementRight` | `FASTPyExpression` | `left` | `FASTPyForStatement` | The for statement owner (if possible)|
31+
| `parentForStatementLeft` | `FASTPyExpression` | `left` | `FASTPyForStatement` | The for statement left owner (if possible)|
32+
| `parentForStatementRight` | `FASTPyExpression` | `right` | `FASTPyForStatement` | The for statement right owner (if possible)|
3333
| `parentIfClause` | `FASTPyExpression` | `expression` | `FASTPyIfClause` | |
3434
| `parentInterpolation` | `FASTPyExpression` | `expression` | `FASTPyInterpolation` | |
3535
| `parentKeywordArgument` | `FASTPyExpression` | `value` | `FASTPyKeywordArgument` | Keyword argument from which I am the value (if it's the case)|
@@ -79,8 +79,8 @@ Class {
7979
'#parentExecStatementScopes => FMOne type: #FASTPyExecStatement opposite: #scopes',
8080
'#parentForInClauseLeft => FMOne type: #FASTPyForInClause opposite: #left',
8181
'#parentForInClauseRight => FMOne type: #FASTPyForInClause opposite: #right',
82-
'#parentForStatementLeft => FMOne type: #FASTPyForStatement opposite: #right',
83-
'#parentForStatementRight => FMOne type: #FASTPyForStatement opposite: #left',
82+
'#parentForStatementLeft => FMOne type: #FASTPyForStatement opposite: #left',
83+
'#parentForStatementRight => FMOne type: #FASTPyForStatement opposite: #right',
8484
'#parentIfClause => FMOne type: #FASTPyIfClause opposite: #expression',
8585
'#parentInterpolation => FMOne type: #FASTPyInterpolation opposite: #expression',
8686
'#parentKeywordArgument => FMOne type: #FASTPyKeywordArgument opposite: #value',
@@ -396,10 +396,10 @@ FASTPyExpression >> parentForInClauseRight: anObject [
396396

397397
{ #category : 'accessing' }
398398
FASTPyExpression >> parentForStatementLeft [
399-
"Relation named: #parentForStatementLeft type: #FASTPyForStatement opposite: #right"
399+
"Relation named: #parentForStatementLeft type: #FASTPyForStatement opposite: #left"
400400

401401
<generated>
402-
<FMComment: 'The for statement owner (if possible)'>
402+
<FMComment: 'The for statement left owner (if possible)'>
403403
<container>
404404
<derived>
405405
^ parentForStatementLeft
@@ -414,10 +414,10 @@ FASTPyExpression >> parentForStatementLeft: anObject [
414414

415415
{ #category : 'accessing' }
416416
FASTPyExpression >> parentForStatementRight [
417-
"Relation named: #parentForStatementRight type: #FASTPyForStatement opposite: #left"
417+
"Relation named: #parentForStatementRight type: #FASTPyForStatement opposite: #right"
418418

419419
<generated>
420-
<FMComment: 'The for statement owner (if possible)'>
420+
<FMComment: 'The for statement right owner (if possible)'>
421421
<container>
422422
<derived>
423423
^ parentForStatementRight

‎src/FAST-Python-Model/FASTPyForStatement.class.st‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
| Relation | Origin | Opposite | Type | Comment |
1414
|---|
1515
| `elseClause` | `FASTPyTWithElseClause` | `parentIfStatement` | `FASTPyElseClause` | |
16-
| `left` | `FASTPyForStatement` | `parentForStatementRight` | `FASTPyExpression` | The identifier of the created local variable or tuple|
17-
| `right` | `FASTPyForStatement` | `parentForStatementLeft` | `FASTPyExpression` | The list that the for statement iterates over|
16+
| `left` | `FASTPyForStatement` | `parentForStatementLeft` | `FASTPyExpression` | The identifier of the created local variable or tuple|
17+
| `right` | `FASTPyForStatement` | `parentForStatementRight` | `FASTPyExpression` | The list that the for statement iterates over|
1818
| `statements` | `FASTTStatementBlock` | `statementContainer` | `FASTTStatement` | Statements enclosed in this block|
1919
2020
@@ -33,8 +33,8 @@ Class {
3333
#traits : 'FASTPyTWithElseClause + FASTTStatementBlock',
3434
#classTraits : 'FASTPyTWithElseClause classTrait + FASTTStatementBlock classTrait',
3535
#instVars : [
36-
'#left => FMOne type: #FASTPyExpression opposite: #parentForStatementRight',
37-
'#right => FMOne type: #FASTPyExpression opposite: #parentForStatementLeft'
36+
'#left => FMOne type: #FASTPyExpression opposite: #parentForStatementLeft',
37+
'#right => FMOne type: #FASTPyExpression opposite: #parentForStatementRight'
3838
],
3939
#category : 'FAST-Python-Model-Entities',
4040
#package : 'FAST-Python-Model',
@@ -51,7 +51,7 @@ FASTPyForStatement class >> annotation [
5151

5252
{ #category : 'accessing' }
5353
FASTPyForStatement >> left [
54-
"Relation named: #left type: #FASTPyExpression opposite: #parentForStatementRight"
54+
"Relation named: #left type: #FASTPyExpression opposite: #parentForStatementLeft"
5555

5656
<generated>
5757
<FMComment: 'The identifier of the created local variable or tuple'>
@@ -67,7 +67,7 @@ FASTPyForStatement >> left: anObject [
6767

6868
{ #category : 'accessing' }
6969
FASTPyForStatement >> right [
70-
"Relation named: #right type: #FASTPyExpression opposite: #parentForStatementLeft"
70+
"Relation named: #right type: #FASTPyExpression opposite: #parentForStatementRight"
7171

7272
<generated>
7373
<FMComment: 'The list that the for statement iterates over'>

0 commit comments

Comments
 (0)