diff options
author | Aleksey Kladov <[email protected]> | 2018-01-01 20:22:01 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-01-01 20:22:01 +0000 |
commit | 55602727c8adfa12c026a8c7881a8bc57fba9db8 (patch) | |
tree | afebee4b834ba25b870b194e09a9d069cb922a38 /src/parser/event_parser/grammar.rs | |
parent | 46422f722bdcadbf4462dd5a9c65756434b2d97a (diff) |
Parser: first struct :-)
Diffstat (limited to 'src/parser/event_parser/grammar.rs')
-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 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 | 53 | fn 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 | ||