forked from pharo-project/pharo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ReservedVariable.class.st
55 lines (43 loc) · 971 Bytes
/
ReservedVariable.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
"
I model self, thisContext and super
"
Class {
#name : #ReservedVariable,
#superclass : #Variable,
#classInstVars : [
'instance'
],
#category : #'OpalCompiler-Core-Semantics'
}
{ #category : #accessing }
ReservedVariable class >> instance [
^instance ifNil: [ instance := self new ]
]
{ #category : #testing }
ReservedVariable class >> isAbstract [
^self = ReservedVariable
]
{ #category : #converting }
ReservedVariable >> asString [
^ self name
]
{ #category : #'code generation' }
ReservedVariable >> emitStore: methodBuilder [
self shouldNotImplement
]
{ #category : #testing }
ReservedVariable >> isReservedVariable [
^true
]
{ #category : #testing }
ReservedVariable >> isWritable [
^ false
]
{ #category : #printing }
ReservedVariable >> printOn: stream [
stream nextPutAll: self name
]
{ #category : #debugging }
ReservedVariable >> write: aValue inContext: aContext [
self error: name, ' is reserved word and cant be modified'
]