compiler/PPCInlineLiteralNode.st
changeset 438 20598d7ce9fa
parent 437 54b3bc9e3987
child 442 d333233f7ebd
child 452 9f4558b3be66
--- a/compiler/PPCInlineLiteralNode.st	Tue Apr 21 17:20:11 2015 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-"{ Package: 'stx:goodies/petitparser/compiler' }"
-
-"{ NameSpace: Smalltalk }"
-
-PPCLiteralNode subclass:#PPCInlineLiteralNode
-	instanceVariableNames:''
-	classVariableNames:''
-	poolDictionaries:''
-	category:'PetitCompiler-Nodes'
-!
-
-!PPCInlineLiteralNode methodsFor:'compiling'!
-
-compileWith: compiler effect: effect id: id
-	| encodedLiteral |
-	
-	encodedLiteral := self encodeQuotes: literal.
-	compiler startInline: id.
-	compiler add: '((context peek: ', literal size asString, ') = #''', encodedLiteral, ''')'.
-	compiler indent.
-	compiler add: ' ifTrue: [ context skip: ', literal size asString, '. #''', encodedLiteral, ''']'.
-	compiler add: ' ifFalse: [ self error: ''', encodedLiteral,  ' expected'' ].'.
-	compiler dedent.
- ^ compiler stopInline.
-! !
-
-!PPCInlineLiteralNode methodsFor:'printing'!
-
-asInlined
-	^ self
-!
-
-printOn: aStream
-	aStream nextPutAll: '#inline'.
-	super printOn: aStream
-! !
-