diff --git a/internal/common/literals.go b/internal/common/literals.go index 54ce84c1334..6251e50476d 100644 --- a/internal/common/literals.go +++ b/internal/common/literals.go @@ -165,7 +165,12 @@ func ParseLiteral(l *Lexer, constOnly bool) Literal { } lit.Loc = loc return lit - + case '-': + l.ConsumeToken('-') + lit := l.ConsumeLiteral() + lit.Text = "-" + lit.Text + lit.Loc = loc + return lit case '[': l.ConsumeToken('[') var list []Literal