mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-07 21:25:31 +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 = FunctionDef(identifier name, arguments args,
|
||||||
stmt* body, expr* decorator_list, expr? returns,
|
stmt* body, expr* decorator_list, expr? returns,
|
||||||
string? type_comment)
|
string? type_comment, type_param* type_params)
|
||||||
| AsyncFunctionDef(identifier name, arguments args,
|
| AsyncFunctionDef(identifier name, arguments args,
|
||||||
stmt* body, expr* decorator_list, expr? returns,
|
stmt* body, expr* decorator_list, expr? returns,
|
||||||
string? type_comment)
|
string? type_comment, type_param* type_params)
|
||||||
|
|
||||||
| ClassDef(identifier name,
|
| ClassDef(identifier name,
|
||||||
expr* bases,
|
expr* bases,
|
||||||
keyword* keywords,
|
keyword* keywords,
|
||||||
stmt* body,
|
stmt* body,
|
||||||
expr* decorator_list)
|
expr* decorator_list,
|
||||||
|
type_param* type_params)
|
||||||
| Return(expr? value)
|
| Return(expr? value)
|
||||||
|
|
||||||
| Delete(expr* targets)
|
| Delete(expr* targets)
|
||||||
| Assign(expr* targets, expr value, string? type_comment)
|
| Assign(expr* targets, expr value, string? type_comment)
|
||||||
|
| TypeAlias(expr name, type_param* type_params, expr value)
|
||||||
| AugAssign(expr target, operator op, expr value)
|
| AugAssign(expr target, operator op, expr value)
|
||||||
-- 'simple' indicates that we annotate simple name without parens
|
-- 'simple' indicates that we annotate simple name without parens
|
||||||
| AnnAssign(expr target, expr annotation, expr? value, int simple)
|
| 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)
|
attributes (int lineno, int col_offset, int end_lineno, int end_col_offset)
|
||||||
|
|
||||||
type_ignore = TypeIgnore(int lineno, string tag)
|
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