literals
¶
AST nodes for literals.
Modules:
-
base
–ASTx Data Types module.
-
boolean
–ASTx Data Types module.
-
numeric
–ASTx Data Types module.
-
string
–ASTx Data Types module.
-
temporal
–ASTx Data Types module.
Classes:
-
Literal
–Literal Data type.
-
LiteralBoolean
–LiteralBoolean data type class.
-
LiteralComplex
–Base class for literal complex numbers.
-
LiteralComplex32
–LiteralComplex32 data type class.
-
LiteralComplex64
–LiteralComplex64 data type class.
-
LiteralDate
–LiteralDate data type class.
-
LiteralDateTime
–LiteralDateTime data type class.
-
LiteralFloat16
–LiteralFloat16 data type class.
-
LiteralFloat32
–LiteralFloat32 data type class.
-
LiteralFloat64
–LiteralFloat64 data type class.
-
LiteralInt128
–LiteralInt128 data type class.
-
LiteralInt16
–LiteralInt16 data type class.
-
LiteralInt32
–LiteralInt32 data type class.
-
LiteralInt64
–LiteralInt64 data type class.
-
LiteralInt8
–LiteralInt8 data type class.
-
LiteralTime
–LiteralTime data type class.
-
LiteralTimestamp
–LiteralTimestamp data type class.
-
LiteralUInt128
–LiteralUInt128 data type class.
-
LiteralUInt16
–LiteralUInt16 data type class.
-
LiteralUInt32
–LiteralUInt32 data type class.
-
LiteralUInt64
–LiteralUInt64 data type class.
-
LiteralUInt8
–LiteralUInt8 data type class.
-
LiteralUTF8Char
–Literal class for UTF-8 characters.
-
LiteralUTF8String
–Literal class for UTF-8 strings.
Literal
¶
Literal(*args, **kwargs)
Bases: DataTypeOps
Literal Data type.
Methods:
-
get_struct
–Return the AST representation for the object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/base.py
28 29 30 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST representation for the object.
Source code in src/astx/literals/base.py
37 38 39 40 41 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralBoolean
¶
LiteralBoolean(value: bool, loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Literal
LiteralBoolean data type class.
Methods:
-
get_struct
–Return the AST representation for the object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/boolean.py
23 24 25 26 27 28 29 30 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST representation for the object.
Source code in src/astx/literals/base.py
37 38 39 40 41 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralComplex
¶
Bases: Literal
Base class for literal complex numbers.
Methods:
-
get_struct
–Return the AST representation for the complex literal.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/numeric.py
263 264 265 266 267 268 269 270 271 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST representation for the complex literal.
Source code in src/astx/literals/numeric.py
277 278 279 280 281 282 283 284 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralComplex32
¶
Bases: LiteralComplex
LiteralComplex32 data type class.
Methods:
-
get_struct
–Return the AST representation for the complex literal.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/numeric.py
292 293 294 295 296 297 298 299 300 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST representation for the complex literal.
Source code in src/astx/literals/numeric.py
277 278 279 280 281 282 283 284 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralComplex64
¶
Bases: LiteralComplex
LiteralComplex64 data type class.
Methods:
-
get_struct
–Return the AST representation for the complex literal.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/numeric.py
308 309 310 311 312 313 314 315 316 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST representation for the complex literal.
Source code in src/astx/literals/numeric.py
277 278 279 280 281 282 283 284 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralDate
¶
LiteralDate(value: str, loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Literal
LiteralDate data type class.
Methods:
-
get_struct
–Return the structure of the LiteralDate object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/temporal.py
27 28 29 30 31 32 33 34 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the structure of the LiteralDate object.
Source code in src/astx/literals/temporal.py
40 41 42 43 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralDateTime
¶
LiteralDateTime(value: str, loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Literal
LiteralDateTime data type class.
Methods:
-
get_struct
–Return the structure of the LiteralDateTime object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/temporal.py
99 100 101 102 103 104 105 106 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the structure of the LiteralDateTime object.
Source code in src/astx/literals/temporal.py
112 113 114 115 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralFloat16
¶
LiteralFloat16(value: float, loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Literal
LiteralFloat16 data type class.
Methods:
-
get_struct
–Return the AST representation for the object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/numeric.py
211 212 213 214 215 216 217 218 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST representation for the object.
Source code in src/astx/literals/base.py
37 38 39 40 41 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralFloat32
¶
LiteralFloat32(value: float, loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Literal
LiteralFloat32 data type class.
Methods:
-
get_struct
–Return the AST representation for the object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/numeric.py
228 229 230 231 232 233 234 235 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST representation for the object.
Source code in src/astx/literals/base.py
37 38 39 40 41 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralFloat64
¶
LiteralFloat64(value: float, loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Literal
LiteralFloat64 data type class.
Methods:
-
get_struct
–Return the AST representation for the object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/numeric.py
245 246 247 248 249 250 251 252 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST representation for the object.
Source code in src/astx/literals/base.py
37 38 39 40 41 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralInt128
¶
LiteralInt128(value: int, loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Literal
LiteralInt128 data type class.
Methods:
-
get_struct
–Return the AST representation for the object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/numeric.py
109 110 111 112 113 114 115 116 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST representation for the object.
Source code in src/astx/literals/base.py
37 38 39 40 41 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralInt16
¶
LiteralInt16(value: int, loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Literal
LiteralInt16 data type class.
Methods:
-
get_struct
–Return the AST representation for the object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/numeric.py
58 59 60 61 62 63 64 65 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST representation for the object.
Source code in src/astx/literals/base.py
37 38 39 40 41 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralInt32
¶
LiteralInt32(value: int, loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Literal
LiteralInt32 data type class.
Methods:
-
get_struct
–Return the AST representation for the object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/numeric.py
75 76 77 78 79 80 81 82 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST representation for the object.
Source code in src/astx/literals/base.py
37 38 39 40 41 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralInt64
¶
LiteralInt64(value: int, loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Literal
LiteralInt64 data type class.
Methods:
-
get_struct
–Return the AST representation for the object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/numeric.py
92 93 94 95 96 97 98 99 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST representation for the object.
Source code in src/astx/literals/base.py
37 38 39 40 41 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralInt8
¶
LiteralInt8(value: int, loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Literal
LiteralInt8 data type class.
Methods:
-
get_struct
–Return the AST representation for the object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/numeric.py
41 42 43 44 45 46 47 48 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST representation for the object.
Source code in src/astx/literals/base.py
37 38 39 40 41 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralTime
¶
LiteralTime(value: str, loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Literal
LiteralTime data type class.
Methods:
-
get_struct
–Return the structure of the LiteralTime object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/temporal.py
51 52 53 54 55 56 57 58 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the structure of the LiteralTime object.
Source code in src/astx/literals/temporal.py
64 65 66 67 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralTimestamp
¶
LiteralTimestamp(value: str, loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Literal
LiteralTimestamp data type class.
Methods:
-
get_struct
–Return the structure of the LiteralTimestamp object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/temporal.py
75 76 77 78 79 80 81 82 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the structure of the LiteralTimestamp object.
Source code in src/astx/literals/temporal.py
88 89 90 91 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralUInt128
¶
LiteralUInt128(value: int, loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Literal
LiteralUInt128 data type class.
Methods:
-
get_struct
–Return the AST representation for the object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/numeric.py
194 195 196 197 198 199 200 201 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST representation for the object.
Source code in src/astx/literals/base.py
37 38 39 40 41 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralUInt16
¶
LiteralUInt16(value: int, loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Literal
LiteralUInt16 data type class.
Methods:
-
get_struct
–Return the AST representation for the object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/numeric.py
143 144 145 146 147 148 149 150 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST representation for the object.
Source code in src/astx/literals/base.py
37 38 39 40 41 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralUInt32
¶
LiteralUInt32(value: int, loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Literal
LiteralUInt32 data type class.
Methods:
-
get_struct
–Return the AST representation for the object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/numeric.py
160 161 162 163 164 165 166 167 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST representation for the object.
Source code in src/astx/literals/base.py
37 38 39 40 41 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralUInt64
¶
LiteralUInt64(value: int, loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Literal
LiteralUInt64 data type class.
Methods:
-
get_struct
–Return the AST representation for the object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/numeric.py
177 178 179 180 181 182 183 184 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST representation for the object.
Source code in src/astx/literals/base.py
37 38 39 40 41 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralUInt8
¶
LiteralUInt8(value: int, loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Literal
LiteralUInt8 data type class.
Methods:
-
get_struct
–Return the AST representation for the object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/numeric.py
126 127 128 129 130 131 132 133 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST representation for the object.
Source code in src/astx/literals/base.py
37 38 39 40 41 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralUTF8Char
¶
LiteralUTF8Char(value: str, loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Literal
Literal class for UTF-8 characters.
Methods:
-
get_struct
–Return the structure of the object in a simplified.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/string.py
50 51 52 53 54 55 56 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the structure of the object in a simplified.
Source code in src/astx/literals/string.py
62 63 64 65 66 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
LiteralUTF8String
¶
LiteralUTF8String(value: str, loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Literal
Literal class for UTF-8 strings.
Methods:
-
get_struct
–Return the structure of the object in a simplified.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/literals/string.py
24 25 26 27 28 29 30 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the structure of the object in a simplified.
Source code in src/astx/literals/string.py
36 37 38 39 40 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|