about summary refs log tree commit diff
path: root/users/tazjin/rlox/src/bytecode/mod.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-02-27T13·45+0200
committertazjin <mail@tazj.in>2021-02-27T19·22+0000
commitb13a6736ddf87e9689a207d5980dd28b9aa83dd4 (patch)
treeff8e95d5693d51ab5ccd755a420278a1a4046ff8 /users/tazjin/rlox/src/bytecode/mod.rs
parentee974b3eddffa47d0d16beeada6658f37a21a8d4 (diff)
chore(tazjin/rlox): Set up some scaffolding for panic mode r/2238
This lets us suppress reporting of additional errors from the compiler
until a synchronisation point is reached.

Change-Id: Iacf90949f868fbdb4349750065b5e458cf74d32a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2557
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/tazjin/rlox/src/bytecode/mod.rs')
-rw-r--r--users/tazjin/rlox/src/bytecode/mod.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/users/tazjin/rlox/src/bytecode/mod.rs b/users/tazjin/rlox/src/bytecode/mod.rs
index 362d8bb1252f..97316e66aa05 100644
--- a/users/tazjin/rlox/src/bytecode/mod.rs
+++ b/users/tazjin/rlox/src/bytecode/mod.rs
@@ -20,7 +20,10 @@ impl crate::Lox for Interpreter {
         Interpreter {}
     }
 
-    fn interpret(&mut self, code: String) -> Result<Self::Value, Vec<Self::Error>> {
+    fn interpret(
+        &mut self,
+        code: String,
+    ) -> Result<Self::Value, Vec<Self::Error>> {
         let chunk = compiler::compile(&code)?;
         vm::interpret(chunk).map_err(|e| vec![e])
     }