unary method

AstNode unary()

Implementation

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