-
Notifications
You must be signed in to change notification settings - Fork 65
/
CGotoStatementNode.class.st
58 lines (46 loc) · 1.14 KB
/
CGotoStatementNode.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
Class {
#name : #CGotoStatementNode,
#superclass : #CGLRAbstractNode,
#instVars : [
'label'
],
#category : #'CAST-Nodes'
}
{ #category : #generated }
CGotoStatementNode class >> identifier: id [
^ self new
label: (CIdentifierNode name: id);
yourself
]
{ #category : #comparing }
CGotoStatementNode >> = anObject [
"Answer whether the receiver and anObject represent the same object."
self == anObject ifTrue: [ ^ true ].
self class = anObject class ifFalse: [ ^ false ].
^ label = anObject label
]
{ #category : #generated }
CGotoStatementNode >> acceptVisitor: anAbstractVisitor [
^ anAbstractVisitor visitGotoStatement: self
]
{ #category : #comparing }
CGotoStatementNode >> hash [
"Answer an integer value that is related to the identity of the receiver."
^ label hash
]
{ #category : #testing }
CGotoStatementNode >> isGoTo [
^ true.
]
{ #category : #generated }
CGotoStatementNode >> label [
^ label
]
{ #category : #generated }
CGotoStatementNode >> label: aCGLRIdentifierNode [
self label notNil
ifTrue: [ self label parent: nil ].
label := aCGLRIdentifierNode.
self label notNil
ifTrue: [ self label parent: self ]
]