unary method
Implementation
AstNode unary() {
if (match([TokenType.not, TokenType.minus])) {
Token operator = previous();
AstNode right = unary();
return UnaryExpression(operator, right);
}
return call();
}
AstNode unary() {
if (match([TokenType.not, TokenType.minus])) {
Token operator = previous();
AstNode right = unary();
return UnaryExpression(operator, right);
}
return call();
}