diff options
author | Vincent Ambo <mail@tazj.in> | 2022-09-01T16·57+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-09-07T20·04+0000 |
commit | 55d21a1389504d6d9872144077196bac9ee17feb (patch) | |
tree | 25e8a57afc217102e6dd7a75b4d3eed33403e961 /tvix/eval/src/errors.rs | |
parent | 80333009008b8a6ee644b7504b65f4c337418a3b (diff) |
refactor(tvix/eval): store spans instead of nodes in Warning/Error r/4737
Another step towards being able to report accurate errors. The codemap spans contain strictly more accessible information, as they now retain information about which input file something came from. This required some shuffling around in the compiler to thread all the right information to the right places. Change-Id: I18ccfb20f07b0c33e1c4f51ca00cd09f7b2d19c6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6404 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/errors.rs')
-rw-r--r-- | tvix/eval/src/errors.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/eval/src/errors.rs b/tvix/eval/src/errors.rs index 32d37d78156d..aced6f6a5571 100644 --- a/tvix/eval/src/errors.rs +++ b/tvix/eval/src/errors.rs @@ -52,13 +52,13 @@ pub enum ErrorKind { #[derive(Clone, Debug)] pub struct Error { - pub node: Option<rnix::SyntaxNode>, pub kind: ErrorKind, + pub span: Option<codemap::Span>, } impl From<ErrorKind> for Error { fn from(kind: ErrorKind) -> Self { - Error { node: None, kind } + Error { span: None, kind } } } |