factor method

AstNode factor()

Implementation

AstNode factor() {
  AstNode expr = unary();
  while (match([TokenType.divide, TokenType.multiply])) {
    Token operator = previous();
    AstNode right = unary();
    expr = BinaryExpression(expr, operator, right);
  }
  return expr;
}