factor method

Expr factor()

Implementation

Expr factor() {
  Expr expr = unary();
  while (match([TokenType.SLASH, TokenType.STAR, TokenType.MOD])) {
    Token operator = previous();
    Expr right = unary();
    expr = Binary(expr, operator, right);
  }
  return expr;
}