Improve expression handling and add parentheses support
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user