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/error.rs | |
| parent | 12b2c5a161a2922ec86ef003e626ffb78b8f60ed (diff) | |
| download | sylt-0d1d548032420c0e7daccfe14bc2fed18775d797.tar.gz | |
tokenize and report git conflict markers
Diffstat (limited to 'src/error.rs')
| -rw-r--r-- | src/error.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs index 74f5af3..9aca985 100644 --- a/src/error.rs +++ b/src/error.rs @@ -32,6 +32,8 @@ pub enum ErrorKind { /// (line, token) SyntaxError(usize, Token), + /// (start, end) + GitConflictError(usize, usize), } #[derive(Debug, Clone)] @@ -103,6 +105,9 @@ impl fmt::Display for ErrorKind { ErrorKind::SyntaxError(line, token) => { write!(f, "Syntax Error on line {} at token {:?}", line, token) } + ErrorKind::GitConflictError(start_line, end_line) => { + write!(f, "Git conflict markers found between lines {} and {}", + start_line, end_line) } } } |
