parol: Structural error
I think we should have a dedicated error type something like the following instead of miette::Report
.
enum ParserError {
Scanner(ScannerError),
Syntax(SyntaxError),
}
pub struct Span(Range<usize>);
enum ScannerError {
UnexpectedToken {
span: Span,
token: Token,
expected: Vec<TokenDef>,
},
...
}
enum SyntaxError {
...
}
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 21 (21 by maintainers)
Commits related to this issue
- Structural error #43 - First part: No miette — committed to jsinger67/parol by jsinger67 2 years ago
I released new versions on crates.io of
parol-macros
,parol_runtime
,parol
andparol-ls
today. Hence I would close this issue. As always, donโt hesitate to contact me if you have any suggestions or questions. Thanks a lot for your contributions! ๐ฏYeah, good points ๐ Then I can put
codespan_reporting
as dependency ofparol_runtime
and re-export it. This will remove the need of both new crates,parol-errors
anderror-report
.