29 lines
739 B
Smalltalk
29 lines
739 B
Smalltalk
|
Extension { #name : 'PPContext' }
|
||
|
|
||
|
{ #category : '*PetitParser-Ruby-Parser' }
|
||
|
PPContext >> heredocId [
|
||
|
^ self globalAt: #heredocId ifAbsent: nil
|
||
|
]
|
||
|
|
||
|
{ #category : '*PetitParser-Ruby-Parser' }
|
||
|
PPContext >> heredocId: value [
|
||
|
self globalAt: #heredocId put: value
|
||
|
]
|
||
|
|
||
|
{ #category : '*PetitParser-Ruby-Parser' }
|
||
|
PPContext >> percentStringEnd [
|
||
|
^ self globalAt: #percentStringEnd ifAbsent: nil
|
||
|
]
|
||
|
|
||
|
{ #category : '*PetitParser-Ruby-Parser' }
|
||
|
PPContext >> percentStringStart: value [
|
||
|
| endValue |
|
||
|
endValue := value.
|
||
|
(value == $[) ifTrue: [ endValue := $] ].
|
||
|
(value == $() ifTrue: [ endValue := $) ].
|
||
|
(value == ${) ifTrue: [ endValue := $} ].
|
||
|
|
||
|
self globalAt: #percentStringStart put: value.
|
||
|
self globalAt: #percentStringEnd put: endValue
|
||
|
]
|