list
¶
Provide the smallest explicit list-construction and query API that host frontends can target when they need to build list values incrementally or reason about list metadata in lowered control-flow contexts.
Classes:
-
ListAppend– -
ListCreate– -
ListIndex– -
ListLength–
ListAppend
¶
Bases: DataType
Append one value to an existing mutable list variable or field. This node models incremental list growth and is not a user-facing collection API by itself. attributes: base: type: astx.AST value: type: astx.AST type_: type: astx.Int32
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/collections/list.py
139 140 141 142 143 144 145 146 147 148 149 150 151 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/collections/list.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
ListCreate
¶
ListCreate(element_type: DataType)
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/collections/list.py
33 34 35 36 37 38 39 40 41 42 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/collections/list.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
ListIndex
¶
Bases: DataType
Read one element from a list-valued expression using one integer index. attributes: base: type: astx.AST index: type: astx.AST type_: type: astx.DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/collections/list.py
82 83 84 85 86 87 88 89 90 91 92 93 94 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/collections/list.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
ListLength
¶
ListLength(base: AST)
Bases: DataType
Return the current logical length of one list-valued expression as an int32 value. The runtime stores list lengths as int64, but the current ASTx language-level contract intentionally truncates that representation to Int32. attributes: base: type: astx.AST type_: type: astx.Int32
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/collections/list.py
194 195 196 197 198 199 200 201 202 203 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/collections/list.py
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |