コード例 #1
0
  private Suggestion nextMatchInNavigator(PExpNavigator n) {
    Suggestion retval = null;

    while (retval == null && n.hasNext()) {
      retval = matchExp(n.next(), n);
    }

    return retval;
  }
コード例 #2
0
  private Suggestion matchExp(PExp exp, PExpNavigator sourceNavigator) {
    Suggestion retval = null;

    if (myMatcher.couldReplace(exp)) {
      retval =
          new Suggestion(
              myCurConjunctIndex, sourceNavigator.replaceLast(myMatcher.getReplacement()));
    }

    return retval;
  }