diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2021-02-22 18:11:50 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2021-02-22 18:11:50 +0100 |
| commit | 0d1d548032420c0e7daccfe14bc2fed18775d797 (patch) | |
| tree | 418f42b2f9e7242796211fb11f34e68649b585d6 /src/compiler.rs | |
| parent | 12b2c5a161a2922ec86ef003e626ffb78b8f60ed (diff) | |
| download | sylt-0d1d548032420c0e7daccfe14bc2fed18775d797.tar.gz | |
tokenize and report git conflict markers
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 cd4ffda..124606e 100644 --- a/src/compiler.rs +++ b/src/compiler.rs @@ -473,6 +473,18 @@ impl Compiler { 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 } |
