-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't panic on parse error at EOF in macro grammar
Fixes #376
- Loading branch information
1 parent
ffcead2
commit d888952
Showing
4 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
peg::parser!(); | ||
|
||
peg::parser!( | ||
grammar parser() for str | ||
); | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
error: expected one of "#", "grammar", "pub" at end of input | ||
--> tests/compile-fail/incomplete_grammar.rs:2:1 | ||
| | ||
2 | peg::parser!(); | ||
| ^^^^^^^^^^^^^^ | ||
| | ||
= note: this error originates in the macro `peg::parser` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: expected one of "::", "<", "{" at end of input | ||
--> tests/compile-fail/incomplete_grammar.rs:4:1 | ||
| | ||
4 | / peg::parser!( | ||
5 | | grammar parser() for str | ||
6 | | ); | ||
| |_^ | ||
| | ||
= note: this error originates in the macro `peg::parser` (in Nightly builds, run with -Z macro-backtrace for more info) |