aboutsummaryrefslogtreecommitdiff
path: root/src/parser/event_parser/grammar.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-01-01 20:22:01 +0000
committerAleksey Kladov <[email protected]>2018-01-01 20:22:01 +0000
commit55602727c8adfa12c026a8c7881a8bc57fba9db8 (patch)
treeafebee4b834ba25b870b194e09a9d069cb922a38 /src/parser/event_parser/grammar.rs
parent46422f722bdcadbf4462dd5a9c65756434b2d97a (diff)
Parser: first struct :-)
Diffstat (limited to 'src/parser/event_parser/grammar.rs')
-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 0896506fb..be61483ec 100644
--- a/src/parser/event_parser/grammar.rs
+++ b/src/parser/event_parser/grammar.rs
@@ -43,13 +43,18 @@ fn item(p: &mut Parser) -> Result {
43 if p.current_is(STRUCT_KW) { 43 if p.current_is(STRUCT_KW) {
44 p.start(STRUCT_ITEM); 44 p.start(STRUCT_ITEM);
45 p.bump(); 45 p.bump();
46 let _ = struct_item(p);
46 p.finish(); 47 p.finish();
47 return OK; 48 return OK;
48 } 49 }
49 ERR 50 ERR
50} 51}
51 52
52 53fn struct_item(p: &mut Parser) -> Result{
54 p.expect(IDENT)?;
55 p.expect(L_CURLY)?;
56 p.expect(R_CURLY)
57}
53 58
54// Paths, types, attributes, and stuff // 59// Paths, types, attributes, and stuff //
55 60