|
52 | 52 | # * `Expr*` - A vector of Expr. |
53 | 53 | # * `&Expr*` - A boxed slice of Expr. |
54 | 54 | # These properties cannot be nested, for example we cannot create a vector of option types. |
| 55 | +# * is_annotation - If this field is a type annotation. |
55 | 56 | # |
56 | 57 | # source_order: |
57 | 58 | # Defines in what order the fields appear in source |
@@ -137,7 +138,7 @@ fields = [ |
137 | 138 | doc = "See also [AnnAssign](https://docs.python.org/3/library/ast.html#ast.AnnAssign)" |
138 | 139 | fields = [ |
139 | 140 | { name = "target", type = "Expr" }, |
140 | | - { name = "annotation", type = "Expr" }, |
| 141 | + { name = "annotation", type = "Expr", is_annotation = true }, |
141 | 142 | { name = "value", type = "Expr?" }, |
142 | 143 | { name = "simple", type = "bool" }, |
143 | 144 | ] |
@@ -443,7 +444,7 @@ custom_source_order = true |
443 | 444 | doc = """An AST node that represents either a single-part bytestring literal |
444 | 445 | or an implicitly concatenated bytestring literal.""" |
445 | 446 | fields = [{ name = "value", type = "BytesLiteralValue" }] |
446 | | -# Because StringLiteralValue type is an iterator and it's not clear from the type |
| 447 | +# Because BytesLiteralValue type is an iterator and it's not clear from the type |
447 | 448 | custom_source_order = true |
448 | 449 |
|
449 | 450 | [Expr.nodes.ExprNumberLiteral] |
|
0 commit comments