diff options
author | Aleksey Kladov <[email protected]> | 2018-08-07 12:24:03 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-07 12:24:03 +0100 |
commit | 8908e51aeaee91d6b63684a21ed1ca16de49916f (patch) | |
tree | 30fa7b9ac02c7326d3c7fbd192ebe2ef46b82d58 /src/parser_impl | |
parent | 498098a5d968f06f08fa093f1fd5a43a9a61ecf3 (diff) |
full precedence
Diffstat (limited to 'src/parser_impl')
-rw-r--r-- | src/parser_impl/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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> { | |||
70 | && self.inp.start(self.pos + 1) == self.inp.start(self.pos) + self.inp.len(self.pos) | 70 | && self.inp.start(self.pos + 1) == self.inp.start(self.pos) + self.inp.len(self.pos) |
71 | } | 71 | } |
72 | 72 | ||
73 | pub(super) fn at_compound3(&self, c1: SyntaxKind, c2: SyntaxKind, c3: SyntaxKind) -> bool { | ||
74 | self.inp.kind(self.pos) == c1 && self.inp.kind(self.pos + 1) == c2 && self.inp.kind(self.pos + 2) == c3 | ||
75 | && self.inp.start(self.pos + 1) == self.inp.start(self.pos) + self.inp.len(self.pos) | ||
76 | && self.inp.start(self.pos + 2) == self.inp.start(self.pos + 1) + self.inp.len(self.pos + 1) | ||
77 | } | ||
78 | |||
73 | pub(super) fn nth(&self, n: u32) -> SyntaxKind { | 79 | pub(super) fn nth(&self, n: u32) -> SyntaxKind { |
74 | self.inp.kind(self.pos + n) | 80 | self.inp.kind(self.pos + n) |
75 | } | 81 | } |