diff options
author | Vincent Ambo <mail@tazj.in> | 2021-01-16T12·11+0300 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2021-01-16T13·46+0000 |
commit | 29335a8b63ba62bd83019eb193baba7c5b656da3 (patch) | |
tree | 2018e86c92ab702ac2549da399bd707769ccd0c7 /users/tazjin/rlox/src/errors.rs | |
parent | f472c824277d80134ce9e55c0a2ce1cb98201134 (diff) |
feat(tazjin/rlox): Implement variable depth resolver r/2113
Implements the first part of the resolver from https://craftinginterpreters.com/resolving-and-binding.html This is wired up to the execution paths in main, but not yet in the tests. The resolved depth is also not actually used for variable lookups (yet). Change-Id: I3a8615252b7b9b12d5a290c5ddf85988f61b9184 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2403 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
Diffstat (limited to 'users/tazjin/rlox/src/errors.rs')
-rw-r--r-- | users/tazjin/rlox/src/errors.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/users/tazjin/rlox/src/errors.rs b/users/tazjin/rlox/src/errors.rs index 875f268ca64d..27ccb962f736 100644 --- a/users/tazjin/rlox/src/errors.rs +++ b/users/tazjin/rlox/src/errors.rs @@ -14,6 +14,7 @@ pub enum ErrorKind { InternalError(String), InvalidAssignmentTarget(String), RuntimeError(String), + StaticError(String), // This variant is not an error, rather it is used for // short-circuiting out of a function body that hits a `return` |