about summary refs log tree commit diff
path: root/users/tazjin/rlox/src/errors.rs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-01-17 r/2126 chore(tazjin/rlox): Move other modules under treewalk::Vincent Ambo1-38/+0
It's unclear if the second part of the book can reuse anything from the first part (I'm guessing probably the scanner, but I'll move that back if it turns out to be the case). Change-Id: I9411355929e31ac6e953599e51665406b1f48d55 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2415 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-17 r/2120 refactor(tazjin/rlox): Move treewalk interpreter into subdirectoryVincent Ambo1-1/+1
Change-Id: I9163f75db5a1ff75e1b1f81bad78fd9d8ddb104a Reviewed-on: https://cl.tvl.fyi/c/depot/+/2409 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-16 r/2113 feat(tazjin/rlox): Implement variable depth resolverVincent Ambo1-0/+1
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
2021-01-14 r/2108 feat(tazjin/rlox): Implement early return from functionsVincent Ambo1-0/+12
In the book this is implemented via exceptions as control flow, and I'm sticking somewhat closely to that by doing it via an error variant. Change-Id: I9c7b84d6bb28265ab94021ea681df84f16a53da2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2395 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-14 r/2102 refactor(tazjin/rlox): Add helper method for parsing identifiersVincent Ambo1-1/+0
Change-Id: I9a45f823f16919319d6135225d5bd53ed54c2530 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2388 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-14 r/2096 feat(tazjin/rlox): Implement function call evaluationVincent Ambo1-0/+1
Change-Id: I6767c3a1a9654475b4066415f8c026b9c5b5907a Reviewed-on: https://cl.tvl.fyi/c/depot/+/2382 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-06 r/2059 feat(tazjin/rlox): Parse if statementsVincent Ambo1-0/+1
Change-Id: I2352d75a3f02d65a5a2d04fb2cc4daa50f11ca1e Reviewed-on: https://cl.tvl.fyi/c/depot/+/2321 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2020-12-31 r/2037 feat(tazjin/rlox): Implement block parsingVincent Ambo1-0/+1
Change-Id: I1b7235ed71fa36120984a36f22cd564f59581352 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2303 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2020-12-31 r/2033 feat(tazjin/rlox): Implement mutable variable assignmentVincent Ambo1-0/+1
Change-Id: I56db10a5ac26958ae27a8d4c8fa7b8f8285bc7e1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2299 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2020-12-31 r/2031 feat(tazjin/rlox): Add global variable support in interpreterVincent Ambo1-0/+2
Change-Id: I4134cf78dc3934a517ad0c848ae1d3729abaf882 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2297 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2020-12-22 r/2027 feat(tazjin/rlox): Parse variable assignment & accessVincent Ambo1-0/+1
Change-Id: I9894d76716d739e85a4757d9e658f884228e7f52 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2290 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2020-12-22 r/2024 feat(tazjin/rlox): Add support for statementsVincent Ambo1-0/+1
First part of https://craftinginterpreters.com/statements-and-state.html Supports print statements, as well as evaluation for the sake of it (i.e. future side-effects). Change-Id: Ic6653b568f98d6cfe3f297615b7113c0ba1d9a70 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2287 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2020-12-20 r/2019 feat(tazjin/rlox): Add runtime type error handlingVincent Ambo1-0/+1
Change-Id: I0d52bc9ff5be6421cb4131265ed28ce1ea7d8ff3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2282 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2020-12-06 r/1991 feat(tazjin/rlox): Synchronise parser state after errorsVincent Ambo1-0/+1
This lets the parser collect multiple errors instead of returning after the first one, with some optimistic synchronisation after encountering something that looks wonky. Change-Id: Ie9d0ce8de9dcc7a3d1e7aa2abe15f74cab0ab96b Reviewed-on: https://cl.tvl.fyi/c/depot/+/2236 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2020-12-06 r/1989 feat(tazjin/rlox): Implement parsing of parenthesised expressionsVincent Ambo1-0/+1
Change-Id: I0e6bd71fd787b719104ef93fc52df4090dc415b9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2234 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2020-11-28 r/1956 refactor(tazjin/rlox): Thread through scanner errorsVincent Ambo1-2/+2
... and show them to users, very crudely. Change-Id: If4491b14db1124313f6ab7e5fbfdce9fea501d11 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2193 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2020-11-28 r/1953 feat(tazjin/rlox): Implement string scanningVincent Ambo1-0/+1
Note that Lox does not support escapes, and I don't care about that. Change-Id: Ie848cbc1164c4b005b15e29aad8fe723aaa68d1b Reviewed-on: https://cl.tvl.fyi/c/depot/+/2190 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2020-11-23 r/1914 feat(tazjin/rlox): Implement single-character scanningVincent Ambo1-0/+14
... still not that interesting, but at this point slightly divergent from the book: The book embraces mutability for interpreter state, initially for tracking whether an error condition has occured. I avoid this by instead defining an error type and collecting the error values, to be handled later on. Notes: So far nothing special, but this is just the beginning of the book. I like the style it is written in and it has pointed to some interesting resources, such as a 1965 paper titled "The Next 700 Languages". Change-Id: I030b38438fec9eb55372bf547af225138908230a Reviewed-on: https://cl.tvl.fyi/c/depot/+/2144 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI