Improve error handling in expressions

This commit is contained in:
2023-10-30 17:16:45 -07:00
parent dce4ee2e8f
commit 7e307d8811
2 changed files with 60 additions and 64 deletions

View File

@@ -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