operator == method

  1. @override
bool operator ==(
  1. Object other
)
override

An ATN configuration is equal to another if both have the same state, they predict the same alternative, and syntactic/semantic contexts are the same.

Implementation

@override
bool operator ==(Object other) {
  if (other is ATNConfig) {
    return state.stateNumber == other.state.stateNumber &&
        alt == other.alt &&
        (context == other.context ||
            (context != null && context == other.context)) &&
        semanticContext == other.semanticContext &&
        isPrecedenceFilterSuppressed() ==
            other.isPrecedenceFilterSuppressed();
  }
  return false;
}