1. allison
  2. spix

Commits

allison  committed 7355b6e

Spacing rule accepts Space or Comment as alternates.

  • Participants
  • Parent commits ce8e5a9
  • Branches default

Comments (0)

Files changed (1)

File Spix/PEG/Parser.pir

View file
     src = ''
 
   children_loop:
+  try_space:
     $P0 = self.'Space'(input, new_pos)
+    if null $P0 goto try_comment
+    goto capture_child
+  try_comment:
+    $P0 = self.'Comment'(input, new_pos)
     if null $P0 goto children_done
+  capture_child:
     push children, $P0
     $S0 = $P0.'src'()
     src .= $S0
-    inc new_pos
+    new_pos = self.'pos'()
     goto children_loop
   children_done: