Antlr4.Runtime.Tree.Pattern.ParseTreePatternMatcher.Matches C# (CSharp) Method

Matches() public method

Does pattern matched as rule patternRuleIndex match tree? Pass in a compiled pattern instead of a string representation of a tree pattern.
public Matches ( IParseTree tree, ParseTreePattern pattern ) : bool
tree IParseTree
pattern ParseTreePattern
return bool
        public virtual bool Matches(IParseTree tree, ParseTreePattern pattern)
        {
            MultiMap<string, IParseTree> labels = new MultiMap<string, IParseTree>();
            IParseTree mismatchedNode = MatchImpl(tree, pattern.PatternTree, labels);
            return mismatchedNode == null;
        }

Same methods

ParseTreePatternMatcher::Matches ( IParseTree tree, string pattern, int patternRuleIndex ) : bool