-
Notifications
You must be signed in to change notification settings - Fork 67
/
CBinaryOperatorNode.class.st
73 lines (60 loc) · 1.39 KB
/
CBinaryOperatorNode.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
Class {
#name : #CBinaryOperatorNode,
#superclass : #CExpressionNode,
#instVars : [
'left',
'right',
'operator'
],
#category : #'CAST-Nodes'
}
{ #category : #'instance creation' }
CBinaryOperatorNode class >> operator: aString left: lexpression right: rexpression [
^ self new
operator: aString;
left: lexpression;
right: rexpression;
yourself
]
{ #category : #generated }
CBinaryOperatorNode >> acceptVisitor: anAbstractVisitor [
^ anAbstractVisitor visitBinary: self
]
{ #category : #testing }
CBinaryOperatorNode >> isBinaryOperation [
^ true
]
{ #category : #generated }
CBinaryOperatorNode >> left [
^ left
]
{ #category : #generated }
CBinaryOperatorNode >> left: aCGLRAbstractNode [
self assertExpression: aCGLRAbstractNode.
self left notNil
ifTrue: [ self left parent: nil ].
left := aCGLRAbstractNode.
self left notNil
ifTrue: [ self left parent: self ]
]
{ #category : #generated }
CBinaryOperatorNode >> operator [
^ operator
]
{ #category : #generated }
CBinaryOperatorNode >> operator: aSmaCCToken [
operator := aSmaCCToken
]
{ #category : #generated }
CBinaryOperatorNode >> right [
^ right
]
{ #category : #generated }
CBinaryOperatorNode >> right: aCGLRAbstractNode [
self assertExpression: aCGLRAbstractNode.
self right notNil
ifTrue: [ self right parent: nil ].
right := aCGLRAbstractNode.
self right notNil
ifTrue: [ self right parent: self ]
]