Method: ParseTreePattern#matches

Defined in:
lib/antlr4/tree/ParseTreePattern.rb

#matches(tree) ⇒ @code true

Determine whether or not a parse tree matches this tree pattern.

pattern; otherwise, false.

Parameters:

  • tree

    The parse tree to match against this tree pattern.

Returns:

  • (@code true)

    if tree is a match for the current tree



47
48
49
# File 'lib/antlr4/tree/ParseTreePattern.rb', line 47

def matches(tree)
    return self.matcher.match(tree, self).succeeded()
end