1+ "
2+ ## Relations
3+ ======================
4+
5+ ### Parents
6+ | Relation | Origin | Opposite | Type | Comment |
7+ |---|
8+ | `parentLoopStatement` | `FASTTStatement` | `body` | `FASTTLoopStatement` | Optional loop of which this statement is the body|
9+ | `statementContainer` | `FASTTStatement` | `statements` | `FASTTStatementBlock` | Block containing this statement.|
10+
11+ ### Children
12+ | Relation | Origin | Opposite | Type | Comment |
13+ |---|
14+ | `expression` | `FASTPyAssertStatement` | `assertOwner` | `FASTTExpression` | The expression asserted|
15+
16+
17+ ## Properties
18+ ======================
19+
20+ | Name | Type | Default value | Comment |
21+ |---|
22+ | `endPos` | `Number` | nil | |
23+ | `startPos` | `Number` | nil | |
24+
25+ "
126Class {
227 #name : ' FASTPyAssertStatement' ,
328 #superclass : ' FASTPyEntity' ,
29+ #traits : ' FASTTStatement' ,
30+ #classTraits : ' FASTTStatement classTrait' ,
431 #category : ' FAST-Python-Model-Entities' ,
532 #package : ' FAST-Python-Model' ,
633 #tag : ' Entities'
@@ -14,3 +41,34 @@ FASTPyAssertStatement class >> annotation [
1441 < generated>
1542 ^ self
1643]
44+
45+ { #category : ' accessing' }
46+ FASTPyAssertStatement >> expression [
47+ " Relation named: #expression type: #FASTTExpression opposite: #assertOwner"
48+
49+ < generated>
50+ < FMComment: ' The expression asserted' >
51+ < FMProperty: #expression type: #FASTTExpression opposite: #assertOwner >
52+ ^ self attributeAt: #expression ifAbsent: [ nil ]
53+ ]
54+
55+ { #category : ' accessing' }
56+ FASTPyAssertStatement >> expression: anObject [
57+
58+ < generated>
59+ (self attributeAt: #expression ifAbsentPut: [nil ]) == anObject ifTrue: [ ^ anObject ].
60+ anObject ifNil: [ | otherSide |
61+ otherSide := self expression.
62+ self attributeAt: #expression put: anObject.
63+ otherSide assertOwner: nil ]
64+ ifNotNil: [
65+ self attributeAt: #expression put: anObject.
66+ anObject assertOwner: self ]
67+ ]
68+
69+ { #category : ' navigation' }
70+ FASTPyAssertStatement >> expressionGroup [
71+ < generated>
72+ < navigation: ' Expression' >
73+ ^ MooseSpecializedGroup with: self expression
74+ ]
0 commit comments