--- a/compiler/PPCNotLiteralNode.st Tue Apr 21 17:20:11 2015 +0100
+++ b/compiler/PPCNotLiteralNode.st Thu Apr 30 23:43:14 2015 +0200
@@ -11,44 +11,17 @@
!PPCNotLiteralNode methodsFor:'accessing'!
-asInlined
- ^ PPCInlineNotLiteralNode new
- name: name;
- literal: literal;
- yourself
-!
-
firstCharSet
^ PPCharSetPredicate on: [:e | true ]
!
-literal
-
- ^ literal
-!
-
-literal: anObject
-
- literal := anObject
-!
-
prefix
^ #notLit
! !
-!PPCNotLiteralNode methodsFor:'as yet unclassified'!
+!PPCNotLiteralNode methodsFor:'visiting'!
-compileWith: compiler effect: effect id: id
- | encodedLiteral size |
- encodedLiteral := self encodeQuotes: literal.
- size := literal size asString.
-
- compiler startMethod: id.
- compiler add: '((context peek: ', size, ') =#''', encodedLiteral, ''')'.
- compiler indent.
- compiler add: ' ifTrue: [ self error: ''', encodedLiteral, ' not expected'' ]'.
- compiler add: ' ifFalse: [ nil ].'.
- compiler dedent.
- ^ compiler stopMethod.
+accept: visitor
+ ^ visitor visitNotLiteralNode: self
! !