chore(tazjin/rlox): Implement From<ScannerError> for bytecode errors

Change-Id: I446c6e38cf239a132882d37df156884d319ca111
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2553
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
Vincent Ambo 2021-02-26 22:29:33 +02:00 committed by tazjin
parent 2974d4b4b6
commit ebc987f4aa
2 changed files with 22 additions and 3 deletions

View file

@ -19,7 +19,7 @@ impl crate::Lox for Interpreter {
Interpreter {}
}
fn interpret(&mut self, _: String) -> Result<Self::Value, Vec<Self::Error>> {
fn interpret(&mut self, code: String) -> Result<Self::Value, Vec<Self::Error>> {
let chunk: Chunk = Default::default();
vm::interpret(chunk).map_err(|e| vec![e])
}