aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-01-07 09:32:29 +0000
committerAleksey Kladov <[email protected]>2018-01-07 09:32:29 +0000
commitefcfaae34ac7a54e858aad82e6503a7c69d6c550 (patch)
tree611b74d833d3e852f0fe271db3faebd4e865c097 /src
parentf797c81155e9b7371b24801efac3fcbd236fc9ab (diff)
Tests for partial parse
Diffstat (limited to 'src')
-rw-r--r--src/parser/event_parser/grammar.rs7
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) {
74fn comma_list<F: Fn(&mut Parser) -> bool>(p: &mut Parser, f: F) { 74fn 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