Antlr4.Runtime.Tree.Pattern.ParseTreeMatch.ParseTreeMatch C# (CSharp) Method

ParseTreeMatch() public method

Constructs a new instance of ParseTreeMatch from the specified parse tree and pattern.
/// IllegalArgumentException /// if /// /// is /// /// /// IllegalArgumentException /// if /// /// is /// /// /// IllegalArgumentException /// if /// /// is /// ///
public ParseTreeMatch ( IParseTree tree, ParseTreePattern pattern, IParseTree>.MultiMap labels, IParseTree mismatchedNode ) : System
tree IParseTree The parse tree to match against the pattern.
pattern ParseTreePattern The parse tree pattern.
labels IParseTree>.MultiMap /// A mapping from label names to collections of /// /// objects located by the tree pattern matching process. ///
mismatchedNode IParseTree /// The first node which failed to match the tree /// pattern during the matching process. ///
return System
        public ParseTreeMatch(IParseTree tree, ParseTreePattern pattern, MultiMap<string, IParseTree> labels, IParseTree mismatchedNode)
        {
            if (tree == null)
            {
                throw new ArgumentException("tree cannot be null");
            }
            if (pattern == null)
            {
                throw new ArgumentException("pattern cannot be null");
            }
            if (labels == null)
            {
                throw new ArgumentException("labels cannot be null");
            }
            this.tree = tree;
            this.pattern = pattern;
            this.labels = labels;
            this.mismatchedNode = mismatchedNode;
        }