fix parsing prefix operators in calls
This commit is contained in:
parent
b52c1b26c9
commit
29a80854a4
4 changed files with 69 additions and 43 deletions
|
@ -401,6 +401,7 @@ unsafe extern "C" fn haku_compile_brush(
|
|||
"compiling: parsed successfully into {} AST nodes",
|
||||
ast.len()
|
||||
);
|
||||
// debug!("ast: {}", ast::dump::dump(&ast, root, Some(code)));
|
||||
|
||||
let src = Source { code, ast: &ast };
|
||||
|
||||
|
@ -431,21 +432,21 @@ unsafe extern "C" fn haku_compile_brush(
|
|||
);
|
||||
debug!("compiling: {closure_spec:?}");
|
||||
|
||||
debug!("bytecode: {:?}", chunk.bytecode);
|
||||
{
|
||||
let mut cursor = 0_usize;
|
||||
for info in &chunk.span_info {
|
||||
let slice = &chunk.bytecode[cursor..cursor + info.len as usize];
|
||||
debug!(
|
||||
"{:?} | 0x{:x} {:?} | {:?}",
|
||||
info.span,
|
||||
cursor,
|
||||
slice,
|
||||
info.span.slice(src.code),
|
||||
);
|
||||
cursor += info.len as usize;
|
||||
}
|
||||
}
|
||||
// debug!("bytecode: {:?}", chunk.bytecode);
|
||||
// {
|
||||
// let mut cursor = 0_usize;
|
||||
// for info in &chunk.span_info {
|
||||
// let slice = &chunk.bytecode[cursor..cursor + info.len as usize];
|
||||
// debug!(
|
||||
// "{:?} | 0x{:x} {:?} | {:?}",
|
||||
// info.span,
|
||||
// cursor,
|
||||
// slice,
|
||||
// info.span.slice(src.code),
|
||||
// );
|
||||
// cursor += info.len as usize;
|
||||
// }
|
||||
// }
|
||||
|
||||
instance.compile_result2 = Some(CompileResult {
|
||||
defs_string: instance.defs.serialize_defs(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue