Skip to content

Commit

Permalink
significant whitespace -> significant indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nchammas committed Jan 3, 2025
1 parent 20494d2 commit 1b7a2dd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@ def parse_with_progress(parser: Lark, text: str, start=None):
Keep in mind that this implementation relies on the `InteractiveParser` and, therefore, only works with the `LALR(1)` parser, and not `Earley`.


## Parsing a Language with Significant Whitespace
## Parsing a Language with Significant Indentation

If your grammar needs to support significant whitespace, you will need to use the `Indenter` class.
Take a look at the [indented tree example][indent] as well as the [Python grammar][python] for
inspiration.
If your grammar needs to support significant indentation (e.g. Python, YAML), you will need to use
the `Indenter` class. Take a look at the [indented tree example][indent] as well as the
[Python grammar][python] for inspiration.

[indent]: examples/indented_tree.html
[python]: https://github.com/lark-parser/lark/blob/master/lark/grammars/python.lark

0 comments on commit 1b7a2dd

Please sign in to comment.