Browse Source

JavaScript example: Fix automatic semicolon insertion

Fix parsing of inputs like this:

  foo() // comment
  bar()
redux
David Majda 9 years ago
parent
commit
b271d66442
  1. 2
      examples/javascript.pegjs

2
examples/javascript.pegjs

@ -513,7 +513,7 @@ _
EOS
= __ ";"
/ _ LineTerminatorSequence
/ _ SingleLineComment? LineTerminatorSequence
/ _ &"}"
/ __ EOF

Loading…
Cancel
Save