hafriedlander / php-peg

PEG (parsing expression grammar) compiler for PHP
Other
191 stars 53 forks source link

Fix: rules splitting regexp. #30

Closed peter-kolenic closed 10 years ago

peter-kolenic commented 10 years ago
hafriedlander commented 10 years ago

Thanks, good catch

hafriedlander commented 10 years ago

Incidentally, if possible, when fixing an issue it'd be good if the PR came with a test that failed before & passed after the fix.

peter-kolenic commented 10 years ago
  1. Thank You for this project.
  2. test for tab is here, if: https://github.com/peter-kolenic/php-peg/commit/f932b5289772cd33b8744d2cfc1e0e9e671d148a Is it OK to add it to base syntax test, or should i make new function or file for corner cases ? (the other bug seems too obscure to me to be added there, so i wait for Your reply).
hafriedlander commented 10 years ago

Unfortunately the test coverage isn't very good at the moment - normally you'd add it to the existing tests for tabs, but there aren't any, it's all in that one test :).

Other than using Quux for consistency instead of tabtest (as per http://en.wikipedia.org/wiki/Metasyntactic_variable#English) that test looks fine.

peter-kolenic commented 10 years ago

OK, :-), https://github.com/peter-kolenic/php-peg/commit/a534bf62f74c8e776b9b241c277480b457d97072

should i issue new PR ?

hafriedlander commented 10 years ago

Yes please.