refactor(vm) cleanup errors

This commit is contained in:
Rachel Powers
2024-05-07 23:09:08 -07:00
parent 5cc935b826
commit 48fbe671ff
7 changed files with 25 additions and 28 deletions

View File

@@ -182,7 +182,7 @@ fn write_enum_aggragate_mod<T: std::io::Write>(
type Err = crate::errors::ParseError;\n \
fn from_str(s: &str) -> Result<Self, Self::Err> {{\n \
let end = s.len();\n \
match s {{\n \
match s.to_lowercase().as_str() {{\n \
{arms}\n \
_ => Err(crate::errors::ParseError{{ line: 0, start: 0, end, msg: format!(\"Unknown enum '{{}}'\", s) }})\n \
}}\n \

View File

@@ -52,7 +52,6 @@ fn write_instructions_enum<T: std::io::Write>(
Display, EnumIter, EnumProperty, EnumString, FromRepr,\n\
}};\n
use crate::vm::object::traits::Programmable;\n\
use crate::vm::instructions::traits::*;\n\
"
)?;