Implemented regex validation for variables

This commit is contained in:
Martino Ferrari
2026-01-29 15:38:10 +01:00
parent cb79d490e7
commit 8be139ab27
3 changed files with 60 additions and 1 deletions

View File

@@ -137,7 +137,7 @@ func (l *Lexer) NextToken() Token {
return l.emit(TokenLBracket)
case ']':
return l.emit(TokenRBracket)
case '&', '?', '!', '<', '>', '*', '(', ')':
case '&', '?', '!', '<', '>', '*', '(', ')', '~', '%', '^':
return l.emit(TokenSymbol)
case '"':
return l.lexString()