"{ Package: 'stx:goodies/petitparser/compiler' }"
"{ NameSpace: Smalltalk }"
PPCNotLiteralNode subclass:#PPCInlineNotLiteralNode
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'PetitCompiler-Nodes'
!
!PPCInlineNotLiteralNode methodsFor:'as yet unclassified'!
compileWith: compiler effect: effect id: id
| encodedLiteral size |
encodedLiteral := self encodeQuotes: literal.
size := literal size asString.
compiler startInline: id.
compiler add: '((context peek: ', size, ') =#''', encodedLiteral, ''')'.
compiler indent.
compiler add: ' ifTrue: [ self error: ''', encodedLiteral, ' not expected'' ]'.
compiler add: ' ifFalse: [ nil ].'.
compiler dedent.
^ compiler stopInline.
! !
!PPCInlineNotLiteralNode methodsFor:'printing'!
asInlined
^ self
!
printOn: aStream
aStream nextPutAll: #inlined.
super printOn: aStream.
! !