Portability fix PPCAbstractCharacterNode>>body: use #storeString instead of #printString.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 30 Oct 2014 11:35:27 +0000
changeset 397 530d98b90b13
parent 396 ec569977267a
child 398 b3e47bab2de6
Portability fix PPCAbstractCharacterNode>>body: use #storeString instead of #printString.
compiler/PPCAbstractCharacterNode.st
--- a/compiler/PPCAbstractCharacterNode.st	Sun Oct 26 22:49:03 2014 +0000
+++ b/compiler/PPCAbstractCharacterNode.st	Thu Oct 30 11:35:27 2014 +0000
@@ -7,6 +7,7 @@
 	category:'PetitCompiler-Nodes'
 !
 
+
 !PPCAbstractCharacterNode methodsFor:'accessing'!
 
 acceptsEpsilon
@@ -34,20 +35,22 @@
 !PPCAbstractCharacterNode methodsFor:'compiling'!
 
 body: compiler
-	| id |
+        | id |
 
-	character ppcPrintable ifTrue: [
-		id := character printString
-	] ifFalse: [
-		id := compiler idFor: character prefixed: #char.
-		compiler addConstant: (Character value: character asInteger) as: id .
-	].
+        character ppcPrintable ifTrue: [
+                id := character storeString.
+        ] ifFalse: [
+                id := compiler idFor: character prefixed: #char.
+                compiler addConstant: (Character value: character asInteger) as: id .
+        ].
 
-	compiler add: '(context peek == ', id, ')'.
-	compiler indent.
-	compiler add: 'ifFalse: [ self error: ''', character asInteger asString, ' expected'' at: context position ] '.
-	compiler add: 'ifTrue: [ context next ].'.
-	compiler dedent.
+        compiler add: '(context peek == ', id, ')'.
+        compiler indent.
+        compiler add: 'ifFalse: [ self error: ''', character asInteger asString, ' expected'' at: context position ] '.
+        compiler add: 'ifTrue: [ context next ].'.
+        compiler dedent.
+
+    "Modified: / 30-10-2014 / 10:59:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 compileWith: compiler effect: effect id: id
@@ -62,3 +65,10 @@
  	^ compiler stopMethod.
 ! !
 
+!PPCAbstractCharacterNode class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+