feat(tvix/compiler): implement parens precedence
Change-Id: I8944354b3690d7504e4fe4254f14be5b849b9bcf Reviewed-on: https://cl.tvl.fyi/c/depot/+/6076 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
parent
72be759e1e
commit
18fe188c3e
1 changed files with 6 additions and 1 deletions
|
@ -6,7 +6,7 @@ use crate::errors::EvalResult;
|
|||
use crate::opcode::OpCode;
|
||||
use crate::value::Value;
|
||||
use rnix;
|
||||
use rnix::types::TypedNode;
|
||||
use rnix::types::{TypedNode, Wrapper};
|
||||
|
||||
struct Compiler {
|
||||
chunk: Chunk,
|
||||
|
@ -36,6 +36,11 @@ impl Compiler {
|
|||
self.compile_unary_op(op)
|
||||
}
|
||||
|
||||
rnix::SyntaxKind::NODE_PAREN => {
|
||||
let op = rnix::types::Paren::cast(node).unwrap();
|
||||
self.compile(op.inner().unwrap())
|
||||
}
|
||||
|
||||
kind => {
|
||||
println!("visiting unsupported node: {:?}", kind);
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in a new issue