Improve error handling in expressions
This commit is contained in:
@@ -159,10 +159,6 @@ func (b Bool) Pos() Position {
|
||||
return b.Position
|
||||
}
|
||||
|
||||
type Op interface {
|
||||
Op() string
|
||||
}
|
||||
|
||||
type Operator struct {
|
||||
Value string
|
||||
Position Position
|
||||
@@ -172,23 +168,6 @@ func (op Operator) Pos() Position {
|
||||
return op.Position
|
||||
}
|
||||
|
||||
func (op Operator) Op() string {
|
||||
return op.Value
|
||||
}
|
||||
|
||||
type Logical struct {
|
||||
Value string
|
||||
Position Position
|
||||
}
|
||||
|
||||
func (l Logical) Pos() Position {
|
||||
return l.Position
|
||||
}
|
||||
|
||||
func (l Logical) Op() string {
|
||||
return l.Value
|
||||
}
|
||||
|
||||
type Ternary struct {
|
||||
Condition Node
|
||||
IfTrue Node
|
||||
|
||||
Reference in New Issue
Block a user