-
Notifications
You must be signed in to change notification settings - Fork 65
/
CExpressionNode.class.st
55 lines (42 loc) · 1010 Bytes
/
CExpressionNode.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
Class {
#name : #CExpressionNode,
#superclass : #CGLRAbstractNode,
#instVars : [
'needsParentheses'
],
#category : #'CAST-Nodes'
}
{ #category : #combining }
CExpressionNode >> , anotherExpression [
^ anotherExpression combineWithExpression: self
]
{ #category : #generated }
CExpressionNode >> acceptVisitor: anAbstractVisitor [
^ anAbstractVisitor visitExpression: self
]
{ #category : #combining }
CExpressionNode >> combineWithExpression: firstExpression [
| result |
self assertExpression: firstExpression.
result := CExpressionListNode new.
result add: firstExpression.
result add: self.
^ result
]
{ #category : #initialization }
CExpressionNode >> initialize [
super initialize.
needsParentheses := false
]
{ #category : #testing }
CExpressionNode >> isExpression [
^ true
]
{ #category : #accessing }
CExpressionNode >> needsParentheses [
^ needsParentheses
]
{ #category : #accessing }
CExpressionNode >> needsParentheses: aBoolean [
needsParentheses := aBoolean
]