-
Notifications
You must be signed in to change notification settings - Fork 65
/
CConstantNode.class.st
61 lines (46 loc) · 1.02 KB
/
CConstantNode.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
Class {
#name : #CConstantNode,
#superclass : #CExpressionNode,
#instVars : [
'value'
],
#category : #'CAST-Nodes'
}
{ #category : #'instance creation' }
CConstantNode class >> value: aValue [
^ self new
value: aValue;
yourself
]
{ #category : #comparing }
CConstantNode >> = anObject [
"Answer whether the receiver and anObject represent the same object."
self == anObject ifTrue: [ ^ true ].
self class = anObject class ifFalse: [ ^ false ].
^ value = anObject value
]
{ #category : #generated }
CConstantNode >> acceptVisitor: anAbstractVisitor [
^ anAbstractVisitor visitConstant: self
]
{ #category : #comparing }
CConstantNode >> hash [
"Answer an integer value that is related to the identity of the receiver."
^ value hash
]
{ #category : #testing }
CConstantNode >> isConstant [
^ true
]
{ #category : #testing }
CConstantNode >> isLeaf [
^ true
]
{ #category : #generated }
CConstantNode >> value [
^ value
]
{ #category : #generated }
CConstantNode >> value: aSmaCCToken [
value := aSmaCCToken
]