From 0e141ec8962cd875e90127bcb94ed1b7b25db5ad Mon Sep 17 00:00:00 2001 From: Erez Sh Date: Thu, 21 Nov 2019 10:43:46 +0200 Subject: [PATCH] Small addition to docs --- docs/classes.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/classes.md b/docs/classes.md index 1d59551..021b2f4 100644 --- a/docs/classes.md +++ b/docs/classes.md @@ -53,6 +53,7 @@ The main tree class * `data` - The name of the rule or alias * `children` - List of matched sub-rules and terminals * `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) @@ -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) * `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_pos` - the index where the token ends (basically pos_in_stream + len(token)) ## Transformer ## Visitor