diff options
| author | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-02-23 19:35:49 +0100 |
|---|---|---|
| committer | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-02-23 19:35:49 +0100 |
| commit | f6393ccf3f5c60bfe746ef33b7dc321c01b34be8 (patch) | |
| tree | eb3c651df7e632b1e033cf1d7e7e7ce1596d2ab9 /src/lib.rs | |
| parent | 0a37bd9ba38d1fefe077f72640926e3fac034992 (diff) | |
| download | sylt-f6393ccf3f5c60bfe746ef33b7dc321c01b34be8.tar.gz | |
fix some bugs, and parse all the sections
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -25,7 +25,7 @@ pub fn compile_file(path: &Path, functions: Vec<(String, RustFunction)> ) -> Result<vm::VM, Vec<Error>> { let tokens = tokenizer::file_to_tokens(path); - match compiler::Compiler::new(path, tokens).compile("main", path, &functions) { + match compiler::Compiler::new(path, &tokens).compile("main", path, &functions) { Ok(prog) => { let mut vm = vm::VM::new(); vm.print_blocks = print; @@ -53,7 +53,7 @@ pub fn run_string(s: &str, print: bool, functions: Vec<(String, RustFunction)>) } fn run(tokens: TokenStream, path: &Path, print: bool, functions: Vec<(String, RustFunction)>) -> Result<(), Vec<Error>> { - match compiler::Compiler::new(path, tokens).compile("main", path, &functions) { + match compiler::Compiler::new(path, &tokens).compile("main", path, &functions) { Ok(prog) => { let mut vm = vm::VM::new(); vm.print_blocks = print; |
