Browse Source

Small addition to docs

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.8.0
Erez Sh 4 years ago
parent
commit
0e141ec896
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      docs/classes.md

+ 2
- 0
docs/classes.md View File

@@ -53,6 +53,7 @@ The main tree class
* `data` - The name of the rule or alias * `data` - The name of the rule or alias
* `children` - List of matched sub-rules and terminals * `children` - List of matched sub-rules and terminals
* `meta` - Line & Column numbers (unless `propagate_positions` is disabled) * `meta` - Line & Column numbers (unless `propagate_positions` is disabled)
* meta attributes: `line`, `column`, `start_pos`, `end_line`, `end_column`, `end_pos`


#### \_\_init\_\_(self, data, children) #### \_\_init\_\_(self, data, children)


@@ -98,6 +99,7 @@ When using a lexer, the resulting tokens in the trees will be of the Token class
* `column` - The column of the token in the text (starting with 1) * `column` - The column of the token in the text (starting with 1)
* `end_line` - The line where the token ends * `end_line` - The line where the token ends
* `end_column` - The next column after the end of the token. For example, if the token is a single character with a `column` value of 4, `end_column` will be 5. * `end_column` - The next column after the end of the token. For example, if the token is a single character with a `column` value of 4, `end_column` will be 5.
* `end_pos` - the index where the token ends (basically pos_in_stream + len(token))


## Transformer ## Transformer
## Visitor ## Visitor


Loading…
Cancel
Save