Improve expression handling and add parentheses support

This commit is contained in:
2023-10-30 15:02:41 -07:00
parent 900de82d6a
commit 136e8cb26e
8 changed files with 583 additions and 416 deletions

View File

@@ -63,8 +63,8 @@ type Value struct {
}
type Expr struct {
Segment Node
Logical Logical
First Node
Operator Operator
Rest []Expr
Position Position
}
@@ -73,17 +73,6 @@ func (e Expr) Pos() Position {
return e.Position
}
type ExprSegment struct {
Value Node
Operator Operator
Rest []ExprSegment
Position Position
}
func (es ExprSegment) Pos() Position {
return es.Position
}
type FuncCall struct {
Name Ident
Params []Node