From 8908e51aeaee91d6b63684a21ed1ca16de49916f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 7 Aug 2018 14:24:03 +0300 Subject: full precedence --- src/parser_impl/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/parser_impl') diff --git a/src/parser_impl/mod.rs b/src/parser_impl/mod.rs index d640a7784..06c16cdb4 100644 --- a/src/parser_impl/mod.rs +++ b/src/parser_impl/mod.rs @@ -70,6 +70,12 @@ impl<'t> ParserImpl<'t> { && self.inp.start(self.pos + 1) == self.inp.start(self.pos) + self.inp.len(self.pos) } + pub(super) fn at_compound3(&self, c1: SyntaxKind, c2: SyntaxKind, c3: SyntaxKind) -> bool { + self.inp.kind(self.pos) == c1 && self.inp.kind(self.pos + 1) == c2 && self.inp.kind(self.pos + 2) == c3 + && self.inp.start(self.pos + 1) == self.inp.start(self.pos) + self.inp.len(self.pos) + && self.inp.start(self.pos + 2) == self.inp.start(self.pos + 1) + self.inp.len(self.pos + 1) + } + pub(super) fn nth(&self, n: u32) -> SyntaxKind { self.inp.kind(self.pos + n) } -- cgit v1.2.3