Improved test

This commit is contained in:
Martino Ferrari
2026-02-02 15:20:41 +01:00
parent d2b2750833
commit b879766021
9 changed files with 386 additions and 19 deletions

View File

@@ -319,6 +319,13 @@ func (p *Parser) parseAtom() (Value, bool) {
}
return val, true
}
if tok.Value == "!" {
val, ok := p.parseAtom()
if !ok {
return nil, false
}
return &UnaryExpression{Position: tok.Position, Operator: tok, Right: val}, true
}
fallthrough
case TokenLBrace:
arr := &ArrayValue{Position: tok.Position}