aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler.rs
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-02-26 17:50:53 +0100
committerGitHub <noreply@github.com>2021-02-26 17:50:53 +0100
commit21b70835bfbc6b8a9c1099bb4a618f1cd457aac0 (patch)
tree58d3a61762c85e4165af1dbd2dbafa6efdec6e9c /src/compiler.rs
parent701c38433454d5afd833bb94723ab2e1f4bbe9bd (diff)
parentcab32da3a8f4b4e25e1d1f287315fe75256ecc89 (diff)
downloadsylt-21b70835bfbc6b8a9c1099bb4a618f1cd457aac0.tar.gz
Merge branch 'compiler-rewrite' into breaking-into-sections
Diffstat (limited to 'src/compiler.rs')
-rw-r--r--src/compiler.rs12
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
}