Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Clarify some NodeVisitor docs.
  • Loading branch information
erikrose committed May 5, 2017
1 parent 545806c commit 30b94f1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions parsimonious/nodes.py
Expand Up @@ -239,7 +239,8 @@ def generic_visit(self, node, visited_children):
# Convenience methods:

def parse(self, text, pos=0):
"""Parse some text with this Visitor's default grammar.
"""Parse some text with this Visitor's default grammar and return the
result of visiting it.
``SomeVisitor().parse('some_string')`` is a shortcut for
``SomeVisitor().visit(some_grammar.parse('some_string'))``.
Expand All @@ -248,8 +249,8 @@ def parse(self, text, pos=0):
return self._parse_or_match(text, pos, 'parse')

def match(self, text, pos=0):
"""Parse some text with this Visitor's default grammar, but don't
insist on parsing all the way to the end.
"""Parse and visit some text with this Visitor's default grammar, but
don't insist on parsing all the way to the end.
``SomeVisitor().match('some_string')`` is a shortcut for
``SomeVisitor().visit(some_grammar.match('some_string'))``.
Expand Down

0 comments on commit 30b94f1

Please sign in to comment.