-
Notifications
You must be signed in to change notification settings - Fork 67
/
CPreprocessorIfNode.class.st
106 lines (79 loc) · 1.74 KB
/
CPreprocessorIfNode.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
Class {
#name : #CPreprocessorIfNode,
#superclass : #CExpressionNode,
#instVars : [
'then',
'else',
'if',
'isArgument'
],
#category : #'CAST-Nodes'
}
{ #category : #'instance creation' }
CPreprocessorIfNode class >> if: aCondition then: anExpression [
^ self new
if: aCondition;
then: anExpression;
yourself
]
{ #category : #'instance creation' }
CPreprocessorIfNode class >> if: aCondition then: anExpression asArgument: asArgument [
^ self new
isArgument: asArgument;
if: aCondition;
then: anExpression;
yourself
]
{ #category : #'instance creation' }
CPreprocessorIfNode class >> if: aCondition then: anExpression else: anOtherExpression [
^ self new
if: aCondition;
then: anExpression;
else: anOtherExpression;
yourself
]
{ #category : #accessing }
CPreprocessorIfNode >> acceptVisitor: anAbstractVisitor [
^ anAbstractVisitor visitPreprocessorIf: self
]
{ #category : #accessing }
CPreprocessorIfNode >> else [
^ else
]
{ #category : #accessing }
CPreprocessorIfNode >> else: aStatement [
else := aStatement
]
{ #category : #accessing }
CPreprocessorIfNode >> if [
^ if
]
{ #category : #accessing }
CPreprocessorIfNode >> if: aStatement [
if := aStatement
]
{ #category : #initialization }
CPreprocessorIfNode >> initialize [
super initialize.
isArgument := false
]
{ #category : #accessing }
CPreprocessorIfNode >> isArgument [
^ isArgument
]
{ #category : #accessing }
CPreprocessorIfNode >> isArgument: aBoolean [
isArgument := aBoolean
]
{ #category : #accessing }
CPreprocessorIfNode >> needsSeparator [
^ false
]
{ #category : #accessing }
CPreprocessorIfNode >> then [
^ then
]
{ #category : #accessing }
CPreprocessorIfNode >> then: aStatement [
then := aStatement
]