diff options
author | Martin Fischer <martin@push-f.com> | 2021-11-30 10:56:59 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-11-30 11:22:35 +0100 |
commit | 915530c02029f8bd4444930ed949e14f09afab03 (patch) | |
tree | 6f58b9728386dc5c1709137bc0a250640a7ce572 /src/tokenizer/interface.rs | |
parent | 414e5838618123cb00216a7426b898aab88ee45a (diff) |
report spans for errors
Diffstat (limited to 'src/tokenizer/interface.rs')
-rw-r--r-- | src/tokenizer/interface.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tokenizer/interface.rs b/src/tokenizer/interface.rs index 715f9bc..128807e 100644 --- a/src/tokenizer/interface.rs +++ b/src/tokenizer/interface.rs @@ -112,7 +112,12 @@ pub enum Token { CharacterTokens(String), NullCharacterToken, EOFToken, - ParseError(Error), + ParseError { + error: Error, + #[cfg(feature = "spans")] + #[cfg_attr(docsrs, doc(cfg(feature = "spans")))] + span: std::ops::Range<usize>, + }, } #[derive(Debug, PartialEq)] |