diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2021-02-26 17:50:53 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-26 17:50:53 +0100 |
| commit | 21b70835bfbc6b8a9c1099bb4a618f1cd457aac0 (patch) | |
| tree | 58d3a61762c85e4165af1dbd2dbafa6efdec6e9c /src/compiler.rs | |
| parent | 701c38433454d5afd833bb94723ab2e1f4bbe9bd (diff) | |
| parent | cab32da3a8f4b4e25e1d1f287315fe75256ecc89 (diff) | |
| download | sylt-21b70835bfbc6b8a9c1099bb4a618f1cd457aac0.tar.gz | |
Merge branch 'compiler-rewrite' into breaking-into-sections
Diffstat (limited to 'src/compiler.rs')
| -rw-r--r-- | src/compiler.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/compiler.rs b/src/compiler.rs index aa491e6..2244198 100644 --- a/src/compiler.rs +++ b/src/compiler.rs @@ -543,6 +543,18 @@ impl<'a> Compiler<'a> { fn eat(&mut self) -> Token { let t = self.peek(); self.curr += 1; + match t { + Token::GitConflictBegin => { + self.curr -= 1; + let start = self.line(); + self.curr += 1; + while !matches!(self.eat(), Token::GitConflictEnd) {} + self.panic = false; + self.error_on_line(ErrorKind::GitConflictError(start, self.line()), start, None); + self.panic = true; + } + _ => {} + } t } |
