diff options
author | Vincent Ambo <mail@tazj.in> | 2021-02-27T12·18+0200 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2021-02-27T13·05+0000 |
commit | ee974b3eddffa47d0d16beeada6658f37a21a8d4 (patch) | |
tree | f15fbf315a39c7dcfa84097778cb3f3bbdf78c42 /users/tazjin/rlox/src/bytecode/errors.rs | |
parent | da2dfb42c6c1cb3a63686be06e9ff04f445506b2 (diff) |
feat(tazjin/rlox): Bootstrap rough shape of bytecode compiler r/2237
This one necessarily has to diverge more from the book than the treewalk interpreter did, so some of this is expected to change, but I'm happy with the rough shape. Since we're reusing the old scanner, the compiler/parser struct owns an iterator over all tokens with which the pull-scanner from the bytecode chapters is simulated. Change-Id: Icfa0bd4729d9df786e08f7e49a25cba1b9989a91 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2556 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'users/tazjin/rlox/src/bytecode/errors.rs')
-rw-r--r-- | users/tazjin/rlox/src/bytecode/errors.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/users/tazjin/rlox/src/bytecode/errors.rs b/users/tazjin/rlox/src/bytecode/errors.rs index 99b2aa406c99..4d6daff0f3f0 100644 --- a/users/tazjin/rlox/src/bytecode/errors.rs +++ b/users/tazjin/rlox/src/bytecode/errors.rs @@ -6,6 +6,7 @@ use std::fmt; pub enum ErrorKind { UnexpectedChar(char), UnterminatedString, + ExpectedToken(&'static str), InternalError(&'static str), } |