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

Match() public method

Compare pattern matched as rule patternRuleIndex against tree and return a ParseTreeMatch object that contains the matched elements, or the node at which the match failed.
public Match ( IParseTree tree, string pattern, int patternRuleIndex ) : ParseTreeMatch
tree IParseTree
pattern string
patternRuleIndex int
return ParseTreeMatch
        public virtual ParseTreeMatch Match(IParseTree tree, string pattern, int patternRuleIndex)
        {
            ParseTreePattern p = Compile(pattern, patternRuleIndex);
            return Match(tree, p);
        }

Same methods

ParseTreePatternMatcher::Match ( IParseTree tree, ParseTreePattern pattern ) : ParseTreeMatch

Usage Example

Beispiel #1
0
 public virtual ParseTreeMatch Match(IParseTree tree)
 {
     return(matcher.Match(tree, this));
 }