95 lines
1.8 KiB
Smalltalk
95 lines
1.8 KiB
Smalltalk
Extension { #name : 'PPContext' }
|
|
|
|
{ #category : '*petitcompiler' }
|
|
PPContext >> asCompiledParserContext [
|
|
^ PPCContext new
|
|
stream: stream;
|
|
yourself
|
|
|
|
]
|
|
|
|
{ #category : '*petitcompiler' }
|
|
PPContext >> atWs [
|
|
^ false
|
|
]
|
|
|
|
{ #category : '*petitcompiler' }
|
|
PPContext >> comment [
|
|
^ self globalAt: #comment ifAbsent: [ nil ].
|
|
]
|
|
|
|
{ #category : '*petitcompiler' }
|
|
PPContext >> comment: value [
|
|
^ self globalAt: #comment put: value
|
|
]
|
|
|
|
{ #category : '*petitcompiler' }
|
|
PPContext >> compiledParser [
|
|
^ self globalAt: #compiledParser
|
|
]
|
|
|
|
{ #category : '*petitcompiler' }
|
|
PPContext >> compiledParser: aPPParser [
|
|
^ self globalAt: #compiledParser put: aPPParser
|
|
]
|
|
|
|
{ #category : '*petitcompiler' }
|
|
PPContext >> lwRemember [
|
|
^ self position
|
|
]
|
|
|
|
{ #category : '*petitcompiler' }
|
|
PPContext >> lwRestore: position [
|
|
^ self position: position
|
|
]
|
|
|
|
{ #category : '*petitcompiler' }
|
|
PPContext >> methodFinished: whatever [
|
|
"nothing to do"
|
|
]
|
|
|
|
{ #category : '*petitcompiler' }
|
|
PPContext >> methodInvoked: whatever [
|
|
"nothing to do"
|
|
]
|
|
|
|
{ #category : '*petitcompiler' }
|
|
PPContext >> peek: anInteger [
|
|
^ stream peek: anInteger
|
|
]
|
|
|
|
{ #category : '*petitcompiler' }
|
|
PPContext >> setWs [
|
|
"nothing to do"
|
|
]
|
|
|
|
{ #category : '*petitcompiler' }
|
|
PPContext >> skipSeparators [
|
|
^ stream skipSeparators
|
|
]
|
|
|
|
{ #category : '*petitcompiler' }
|
|
PPContext >> tokenRead: whatever [
|
|
"nothing to do"
|
|
]
|
|
|
|
{ #category : '*petitcompiler' }
|
|
PPContext >> uncheckedBack [
|
|
^ stream uncheckedBack
|
|
]
|
|
|
|
{ #category : '*petitcompiler' }
|
|
PPContext >> uncheckedPosition: position [
|
|
^ stream uncheckedPosition: position
|
|
]
|
|
|
|
{ #category : '*petitcompiler' }
|
|
PPContext >> whitespace [
|
|
^ self globalAt: #whitespace ifAbsent: [ nil ].
|
|
]
|
|
|
|
{ #category : '*petitcompiler' }
|
|
PPContext >> whitespace: value [
|
|
^ self globalAt: #whitespace put: value
|
|
]
|