Przeglądaj źródła

Examples: Added correct type-info to the create_ast example

gm/2021-09-23T00Z/github.com--lark-parser-lark/v0.12.0
Erez Sh 3 lat temu
rodzic
commit
53b58e7137
1 zmienionych plików z 3 dodań i 1 usunięć
  1. +3
    -1
      examples/advanced/create_ast.py

+ 3
- 1
examples/advanced/create_ast.py Wyświetl plik

@@ -15,6 +15,7 @@ from typing import List
from dataclasses import dataclass

from lark import Lark, ast_utils, Transformer, v_args
from lark.tree import Meta

this_module = sys.modules[__name__]

@@ -32,7 +33,8 @@ class _Statement(_Ast):

@dataclass
class Value(_Ast, ast_utils.WithMeta):
meta: object
"Uses WithMeta to include line-number metadata in the meta attribute"
meta: Meta
value: object

@dataclass


Ładowanie…
Anuluj
Zapisz