summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oryxc/src/compiler.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/oryxc/src/compiler.rs b/oryxc/src/compiler.rs
index 1e539ce..bca1ba6 100644
--- a/oryxc/src/compiler.rs
+++ b/oryxc/src/compiler.rs
@@ -171,6 +171,14 @@ fn worker_loop(
}
let (ast, _extra_data) = parser::parse(name, &tokens);
+
+ if state.flags.debug_parser {
+ let mut handle = io::stderr().lock();
+ for n in ast.iter() {
+ let _ = write!(handle, "{n:?}\n");
+ }
+ }
+
let mut fdata = state.files.get_mut(&file).unwrap();
fdata.tokens = Arc::from(MaybeUninit::new(tokens));
fdata.ast = Arc::from(MaybeUninit::new(ast));