From bcd6754f1266ef3f4ce42f76974e379815234494 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 7 Aug 2018 16:32:09 +0300 Subject: semis after blcoks --- src/grammar/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/grammar/mod.rs') 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) { } +#[derive(Clone, Copy, PartialEq, Eq)] enum BlockLike { Block, NotBlock, } +impl BlockLike { + fn is_block(self) -> bool { self == BlockLike::Block } +} + fn visibility(p: &mut Parser) { if p.at(PUB_KW) { let vis = p.start(); -- cgit v1.2.3