equality method

AstNode equality()

Implementation

AstNode equality() {
  AstNode expr = comparison();
  while (match([TokenType.notEqual, TokenType.equal])) {
    Token operator = previous();
    AstNode right = comparison();
    expr = BinaryExpression(expr, operator, right);
  }
  return expr;
}