-
Notifications
You must be signed in to change notification settings - Fork 71
/
CExpressionListNode.class.st
79 lines (61 loc) · 1.58 KB
/
CExpressionListNode.class.st
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Class {
#name : #CExpressionListNode,
#superclass : #CExpressionNode,
#instVars : [
'expressions',
'printOnMultipleLines'
],
#category : #'CAST-Nodes'
}
{ #category : #adding }
CExpressionListNode >> , anotherExpression [
self add: anotherExpression.
^ self
]
{ #category : #adding }
CExpressionListNode >> acceptVisitor: anAbstractVisitor [
^ anAbstractVisitor visitExpressionList: self
]
{ #category : #adding }
CExpressionListNode >> add: anExpression [
expressions add: anExpression
]
{ #category : #adding }
CExpressionListNode >> combineWithExpression: firstExpression [
| result |
self assertExpression: firstExpression.
result := CExpressionListNode new.
result add: firstExpression.
expressions do: [ :expr |
result add: expr ].
^ result
]
{ #category : #generated }
CExpressionListNode >> expressions [
^ expressions
]
{ #category : #generated }
CExpressionListNode >> expressions: anOrderedCollection [
self assertListOfExpressions: anOrderedCollection.
self setParents: self expressions to: nil.
expressions := anOrderedCollection.
self setParents: self expressions to: self
]
{ #category : #'generated-initialize-release' }
CExpressionListNode >> initialize [
super initialize.
expressions := OrderedCollection new: 2.
printOnMultipleLines := false.
]
{ #category : #testing }
CExpressionListNode >> isCommaSeparatedExpression [
^ true
]
{ #category : #accessing }
CExpressionListNode >> printOnMultipleLines [
^ printOnMultipleLines
]
{ #category : #accessing }
CExpressionListNode >> printOnMultipleLines: aBoolean [
printOnMultipleLines := aBoolean
]