aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-02-26 18:26:20 +0100
committerGustav Sörnäs <gustav@sornas.net>2021-02-26 18:26:20 +0100
commitf2e87b1cf38de715e840440898b7a6cee91eb258 (patch)
treee332b6f4b20c2bf9c17f1d98d21b0fe0cd585073 /src/lib.rs
parent064bd91e7ceadde5272bf27fde59b43c27372cd3 (diff)
downloadsylt-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.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 69bb66e..97f555c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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) => {