compiler/PPCTokenizingCodeGenerator.st
changeset 454 a9cd5ea7cc36
parent 452 9f4558b3be66
child 460 87a3d30ab570
--- a/compiler/PPCTokenizingCodeGenerator.st	Sun May 10 06:46:56 2015 +0100
+++ b/compiler/PPCTokenizingCodeGenerator.st	Sun May 10 14:20:24 2015 +0100
@@ -12,9 +12,10 @@
 !PPCTokenizingCodeGenerator methodsFor:'visiting'!
 
 visitChoiceNode: node
-"	true ifTrue: [ ^ super visitChoiceNode: node ]."
+"       true ifTrue: [ ^ super visitChoiceNode: node ]."
     "HACK alert: We are inside token..."
-    node firstSetWithTokens detect: [ :e | e isTokenNode not ] ifFound: [ ^ super visitChoiceNode: node ].
+
+    (node firstSetWithTokens contains: [ :e | e isTokenNode not ]) ifTrue: [ ^ super visitChoiceNode: node ].
          
     node children do: [ :child |
         | tokenMethodName |
@@ -43,6 +44,8 @@
     ].
 
     compiler codeError: 'no choice found'.
+
+    "Modified: / 10-05-2015 / 07:37:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 visitDeterministicChoiceNode: node