ParseTreePatternMatcher.match

Compare {@code pattern} matched against {@code tree} and return a {@link ParseTreeMatch} object that contains the matched elements, or thenode at which the match failed. Pass in a compiled pattern instead of a string representation of a tree pattern.

  1. ParseTreeMatch match(ParseTree tree, string pattern, int patternRuleIndex)
  2. ParseTreeMatch match(ParseTree tree, ParseTreePattern pattern)
    class ParseTreePatternMatcher

Meta