diff options
author | Aleksey Kladov <[email protected]> | 2018-01-07 09:32:29 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-01-07 09:32:29 +0000 |
commit | efcfaae34ac7a54e858aad82e6503a7c69d6c550 (patch) | |
tree | 611b74d833d3e852f0fe271db3faebd4e865c097 /src | |
parent | f797c81155e9b7371b24801efac3fcbd236fc9ab (diff) |
Tests for partial parse
Diffstat (limited to 'src')
-rw-r--r-- | src/parser/event_parser/grammar.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/parser/event_parser/grammar.rs b/src/parser/event_parser/grammar.rs index 7425526ef..79ef8b31c 100644 --- a/src/parser/event_parser/grammar.rs +++ b/src/parser/event_parser/grammar.rs | |||
@@ -74,7 +74,12 @@ fn many<F: Fn(&mut Parser) -> bool>(p: &mut Parser, f: F) { | |||
74 | fn comma_list<F: Fn(&mut Parser) -> bool>(p: &mut Parser, f: F) { | 74 | fn comma_list<F: Fn(&mut Parser) -> bool>(p: &mut Parser, f: F) { |
75 | many(p, |p| { | 75 | many(p, |p| { |
76 | f(p); | 76 | f(p); |
77 | p.is_eof() || p.expect(COMMA) | 77 | if p.is_eof() { |
78 | false | ||
79 | } else { | ||
80 | p.expect(COMMA); | ||
81 | true | ||
82 | } | ||
78 | }) | 83 | }) |
79 | } | 84 | } |
80 | 85 | ||