term method

Expr term()

Implementation

Expr term() {
  Expr expr = factor();
  while (match([TokenType.MINUS, TokenType.PLUS])) {
    Token operator = previous();
    Expr right = factor();
    expr = Binary(expr, operator, right);
  }
  return expr;
}