diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2021-02-26 18:26:20 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2021-02-26 18:26:20 +0100 |
| commit | f2e87b1cf38de715e840440898b7a6cee91eb258 (patch) | |
| tree | e332b6f4b20c2bf9c17f1d98d21b0fe0cd585073 /src/lib.rs | |
| parent | 064bd91e7ceadde5272bf27fde59b43c27372cd3 (diff) | |
| download | sylt-f2e87b1cf38de715e840440898b7a6cee91eb258.tar.gz | |
keep a hashmap of compiler contextes
A context is a path and its frames.
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -20,10 +20,11 @@ mod tokenizer; /// Compiles a file and links the supplied functions as callable external /// functions. Use this if you want your programs to be able to yield. -pub fn compile_file(path: &Path, - print: bool, - functions: Vec<(String, RustFunction)> - ) -> Result<vm::VM, Vec<Error>> { +pub fn compile_file( + path: &Path, + print: bool, + 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) { Ok(prog) => { |
