diff options
Diffstat (limited to 'src/parser/grammar/items/traits.rs')
-rw-r--r-- | src/parser/grammar/items/traits.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/parser/grammar/items/traits.rs b/src/parser/grammar/items/traits.rs new file mode 100644 index 000000000..3bef9639f --- /dev/null +++ b/src/parser/grammar/items/traits.rs | |||
@@ -0,0 +1,17 @@ | |||
1 | use super::*; | ||
2 | |||
3 | pub(super) fn trait_item(p: &mut Parser) { | ||
4 | assert!(p.at(TRAIT_KW)); | ||
5 | p.bump(); | ||
6 | p.expect(IDENT); | ||
7 | p.expect(L_CURLY); | ||
8 | p.expect(R_CURLY); | ||
9 | } | ||
10 | |||
11 | pub(super) fn impl_item(p: &mut Parser) { | ||
12 | assert!(p.at(IMPL_KW)); | ||
13 | p.bump(); | ||
14 | p.expect(IDENT); | ||
15 | p.expect(L_CURLY); | ||
16 | p.expect(R_CURLY); | ||
17 | } | ||