--- a/compiler/PPCTokenizingVisitor.st Thu May 21 14:12:22 2015 +0100
+++ b/compiler/PPCTokenizingVisitor.st Fri Jul 24 15:06:54 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';
@@ -42,7 +42,8 @@
yourself
].
^ parserNode
-
+
+ "Modified: / 12-05-2015 / 01:37:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
eofToken