--- a/compiler/PPCTokenizingVisitor.st Tue May 12 01:33:33 2015 +0100
+++ b/compiler/PPCTokenizingVisitor.st Tue May 12 01:57:37 2015 +0100
@@ -18,17 +18,17 @@
tokens addLast: self eofToken.
tokens do: [ :token | token unmarkForInline ].
- whitespaceNode := tokens detect: [ :e | e isTrimmingTokenNode ] ifFound: [:token |
- token whitespace copy
- unmarkForInline;
- name: 'consumeWhitespace';
- yourself
- ] ifNone: [
- PPCNilNode new
- name: 'consumeWhitespace';
- yourself
- ].
-
+ whitespaceNode := tokens detect: [ :e | e isTrimmingTokenNode ] ifNone:[nil].
+ whitespaceNode notNil ifTrue:[
+ whitespaceNode := whitespaceNode whitespace copy
+ unmarkForInline;
+ name: 'consumeWhitespace';
+ yourself
+ ] ifFalse:[
+ whitespaceNode := (PPCNilNode new)
+ name: 'consumeWhitespace';
+ yourself
+ ].
tokenizerNode := PPCTokenChoiceNode new
children: tokens asArray;
name: 'nextToken';
@@ -43,7 +43,7 @@
].
^ parserNode
- "Modified: / 10-05-2015 / 07:27:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 12-05-2015 / 01:37:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
eofToken