diff options
author | Aleksey Kladov <[email protected]> | 2018-08-07 14:32:09 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-07 14:32:09 +0100 |
commit | bcd6754f1266ef3f4ce42f76974e379815234494 (patch) | |
tree | ade8a7e0f2af6378c0d2cbba95e6dcdcf2d6779f /src/grammar/mod.rs | |
parent | 0ab1e255ee5c70aedd4d243e0e11109fc4bbcef2 (diff) |
semis after blcoks
Diffstat (limited to 'src/grammar/mod.rs')
-rw-r--r-- | src/grammar/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/grammar/mod.rs b/src/grammar/mod.rs index 1b997d861..b6da0d013 100644 --- a/src/grammar/mod.rs +++ b/src/grammar/mod.rs | |||
@@ -44,11 +44,16 @@ pub(crate) fn file(p: &mut Parser) { | |||
44 | } | 44 | } |
45 | 45 | ||
46 | 46 | ||
47 | #[derive(Clone, Copy, PartialEq, Eq)] | ||
47 | enum BlockLike { | 48 | enum BlockLike { |
48 | Block, | 49 | Block, |
49 | NotBlock, | 50 | NotBlock, |
50 | } | 51 | } |
51 | 52 | ||
53 | impl BlockLike { | ||
54 | fn is_block(self) -> bool { self == BlockLike::Block } | ||
55 | } | ||
56 | |||
52 | fn visibility(p: &mut Parser) { | 57 | fn visibility(p: &mut Parser) { |
53 | if p.at(PUB_KW) { | 58 | if p.at(PUB_KW) { |
54 | let vis = p.start(); | 59 | let vis = p.start(); |