gustavoaca1997 / Caribay

A PEG Parser Generator with Semi-Automatic Error Recovery based on LPeg(Label)
MIT License
19 stars 0 forks source link

Rules with new lines #10

Open edubart opened 4 years ago

edubart commented 4 years ago

Currently you can't break a line after the rule declaration, for example this works:

storage_class_specifier <- `typedef` /
  `extern` /
  `static` /
  `register`

but this doesn't:

storage_class_specifier <-
  `typedef` /
  `extern` /
  `static` /
  `register`

fails with:

caribay/parser.lua:170: Error at line 10, column 1: Valid expression expected

Motivation: Sometimes I have to use some large named rules and is more readable to start it in a new line.