mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-07 13:15:21 +00:00
parent
69d27d924c
commit
25b23998ad
1 changed files with 10 additions and 3 deletions
|
@ -10,20 +10,22 @@ module Python
|
|||
|
||||
stmt = FunctionDef(identifier name, arguments args,
|
||||
stmt* body, expr* decorator_list, expr? returns,
|
||||
string? type_comment)
|
||||
string? type_comment, type_param* type_params)
|
||||
| AsyncFunctionDef(identifier name, arguments args,
|
||||
stmt* body, expr* decorator_list, expr? returns,
|
||||
string? type_comment)
|
||||
string? type_comment, type_param* type_params)
|
||||
|
||||
| ClassDef(identifier name,
|
||||
expr* bases,
|
||||
keyword* keywords,
|
||||
stmt* body,
|
||||
expr* decorator_list)
|
||||
expr* decorator_list,
|
||||
type_param* type_params)
|
||||
| Return(expr? value)
|
||||
|
||||
| Delete(expr* targets)
|
||||
| Assign(expr* targets, expr value, string? type_comment)
|
||||
| TypeAlias(expr name, type_param* type_params, expr value)
|
||||
| AugAssign(expr target, operator op, expr value)
|
||||
-- 'simple' indicates that we annotate simple name without parens
|
||||
| AnnAssign(expr target, expr annotation, expr? value, int simple)
|
||||
|
@ -142,4 +144,9 @@ module Python
|
|||
attributes (int lineno, int col_offset, int end_lineno, int end_col_offset)
|
||||
|
||||
type_ignore = TypeIgnore(int lineno, string tag)
|
||||
|
||||
type_param = TypeVar(identifier name, expr? bound)
|
||||
| ParamSpec(identifier name)
|
||||
| TypeVarTuple(identifier name)
|
||||
attributes (int lineno, int col_offset, int end_lineno, int end_col_offset)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue