Home | History | Annotate | Download | only in antlr3

Lines Matching full:what

399     def find(self, tree, what):
402 what may either be an integer specifzing the token type to find or
407 if isinstance(what, (int, long)):
408 return self._findTokenType(tree, what)
410 elif isinstance(what, basestring):
411 return self._findPattern(tree, what)
414 raise TypeError("'what' must be string or integer")
456 def visit(self, tree, what, visitor):
457 """Visit every node in tree matching what, invoking the visitor.
459 If what is a string, it is parsed as a pattern and only matching
465 If what is an integer, it is used as a token type and visit will match
472 if isinstance(what, (int, long)):
473 self._visitType(tree, None, 0, what, visitor)
475 elif isinstance(what, basestring):
476 self._visitPattern(tree, what, visitor)
479 raise TypeError("'what' must be string or integer")