astx
¶
ASTx.
Modules:
-
base
–AST classes and functions.
-
blocks
–Module for different kind of ASTx blocks.
-
callables
–Module for callable ASTx.
-
classes
–Module for classes definitions/declarations.
-
flows
–Module for controle flow AST.
-
literals
–AST nodes for literals.
-
mixes
–Module for mixing ASTx types from different modules.
-
modifiers
–Modifications for ASTx, such as visibility, scope, etc.
-
packages
–Define ASTx for more broader scope.
-
symbol_table
–Symbol Table module for ASTx.
-
tools
–Package for astx helper tools.
-
types
–Collection of ASTx nodes used for types.
-
variables
–Module for Variables.
-
viz
–AST graphic representation Module.
Classes:
-
AST
–AST main expression class.
-
ASTKind
–The expression kind class used for downcasting.
-
AliasExpr
–Represents an alias in an import statement.
-
Argument
–AST class for argument definition.
-
Arguments
–AST class for argument definition.
-
BinaryOp
–AST class for the binary operator.
-
Block
–The AST tree.
-
Boolean
–Boolean data type expression.
-
ClassDeclStmt
–AST class for class declaration.
-
ClassDefStmt
–AST class for class definition, including attributes and methods.
-
Complex
–Base class for complex numbers.
-
Complex32
–Complex32 data type class.
-
Complex64
–Complex64 data type class.
-
DataType
–AST main expression class.
-
DataTypeOps
–Overload some magic functions used for the main operations.
-
Date
–Date data type expression.
-
DateTime
–DateTime data type expression.
-
Expr
–AST main expression class.
-
ExprType
–ExprType expression class.
-
Float16
–Float16 data type expression.
-
Float32
–Float32 data type expression.
-
Float64
–Float64 data type expression.
-
Floating
–AST for the literal float number.
-
ForCountLoopExpr
–AST class for a simple Count-Controlled
For
Loop expression. -
ForCountLoopStmt
–AST class for a simple Count-Controlled
For
Loop statement. -
ForRangeLoopExpr
–AST class for
For
Range Expression. -
ForRangeLoopStmt
–AST class for
For
Range Statement. -
Function
–AST class for function definition.
-
FunctionCall
–AST class for function call.
-
FunctionPrototype
–AST class for function prototype declaration.
-
FunctionReturn
–AST class for function
return
statement. -
IfExpr
–AST class for
if
expression. -
IfStmt
–AST class for
if
statement. -
ImportExpr
–Represents an import operation as an expression.
-
ImportFromExpr
–Represents a 'from ... import ...' operation as an expression.
-
ImportFromStmt
–Represents an import-from statement.
-
ImportStmt
–Represents an import statement.
-
InlineVariableDeclaration
–AST class for inline variable declaration expression.
-
Int16
–Int16 data type expression.
-
Int32
–Int32 data type expression.
-
Int64
–Int64 data type expression.
-
Int8
–Int8 data type expression.
-
Integer
–Integer number data type expression.
-
LambdaExpr
–AST class for lambda expressions.
-
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.
-
Module
–AST main expression class.
-
MutabilityKind
–Definition for different kind of mutability.
-
Number
–Number data type expression.
-
OperatorType
–AST main expression class.
-
Package
–AST class for Package.
-
Program
–AST class for Program.
-
ScopeKind
–Definition for different kind of scopes.
-
SignedInteger
–Signed integer number data type expression.
-
StatementType
–AST main expression class.
-
Target
–Define the Architecture target for the program.
-
Time
–Time data type expression.
-
Timestamp
–Timestamp data type expression.
-
TypeCastExpr
–AST class for type casting expressions.
-
UInt128
–UInt128 data type expression.
-
UInt16
–UInt16 data type expression.
-
UInt32
–UInt32 data type expression.
-
UInt64
–UInt64 data type expression.
-
UInt8
–UInt8 data type expression.
-
UTF8Char
–Class for UTF-8 encoded characters.
-
UTF8String
–Class for UTF-8 encoded strings.
-
UnaryOp
–AST class for the unary operator.
-
Undefined
–Undefined expression class.
-
UnsignedInteger
–Unsigned integer number data type expression.
-
Variable
–AST class for the variable usage.
-
VariableAssignment
–AST class for variable declaration.
-
VariableDeclaration
–AST class for variable declaration.
-
VisibilityKind
–Definition of different kind of visibility.
-
WhileExpr
–AST class for
while
expression. -
WhileStmt
–AST class for
while
statement.
Functions:
-
get_version
–Return the program version.
AST
¶
AST main expression class.
Methods:
-
get_struct
–Return a structure that represents the node 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/base.py
180 181 182 183 184 185 186 187 188 189 190 191 |
|
get_struct
abstractmethod
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a structure that represents the node object.
Source code in src/astx/base.py
255 256 257 |
|
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 |
|
AliasExpr
¶
AliasExpr(name: str, asname: str = '', loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: Expr
Represents an alias in an import statement.
Methods:
-
get_struct
–Return the AST structure of the alias.
-
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/packages.py
167 168 169 170 171 172 173 174 175 176 177 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the alias.
Source code in src/astx/packages.py
186 187 188 189 190 191 192 193 |
|
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 |
|
Argument
¶
Argument(name: str, type_: DataType, mutability: MutabilityKind = constant, default: Expr = UNDEFINED, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: Variable
AST class for argument definition.
Methods:
-
get_struct
–Return the AST structure of 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/callables.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/callables.py
60 61 62 63 64 |
|
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 |
|
Arguments
¶
AST class for argument definition.
Methods:
-
append
–Append a new node to the stack.
-
get_struct
–Return the AST structure of 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/callables.py
72 73 74 75 |
|
append
¶
append(value: ASTType) -> None
Append a new node to the stack.
Source code in src/astx/base.py
305 306 307 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/callables.py
81 82 83 84 85 86 87 88 89 90 |
|
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 |
|
BinaryOp
¶
Bases: DataTypeOps
AST class for the binary operator.
Methods:
-
get_struct
–Return the AST structure that represents 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/types/operators.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure that represents the object.
Source code in src/astx/types/operators.py
158 159 160 161 162 163 164 165 |
|
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 |
|
Block
¶
Block(name: str = 'entry', loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: ASTNodes[ASTType]
The AST tree.
Methods:
-
append
–Append a new node to the stack.
-
get_struct
–Return the AST structure of 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/base.py
278 279 280 281 282 283 284 285 286 287 288 |
|
append
¶
append(value: ASTType) -> None
Append a new node to the stack.
Source code in src/astx/base.py
305 306 307 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/blocks.py
22 23 24 25 26 27 28 29 30 31 32 |
|
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 |
|
Boolean
¶
Bases: AnyType
Boolean data type expression.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
ClassDeclStmt
¶
ClassDeclStmt(name: str, bases: Iterable[Expr] | ASTNodes = [], decorators: Iterable[Expr] | ASTNodes = [], visibility: VisibilityKind = public, is_abstract: bool = False, metaclass: Optional[Expr] = None, attributes: Iterable[VariableDeclaration] | ASTNodes = [], methods: Iterable[Function] | ASTNodes = [], loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: StatementType
AST class for class declaration.
Methods:
-
get_struct
–Return the AST structure of 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/classes.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/classes.py
144 145 146 147 148 149 150 151 152 |
|
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 |
|
ClassDefStmt
¶
ClassDefStmt(name: str, bases: Iterable[Expr] | ASTNodes = [], decorators: Iterable[Expr] | ASTNodes = [], body: Block = CLASS_BODY_DEFAULT, visibility: VisibilityKind = public, is_abstract: bool = False, metaclass: Optional[Expr] = None, attributes: Iterable[VariableDeclaration] | ASTNodes = [], methods: Iterable[Function] | ASTNodes = [], loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: ClassDeclStmt
AST class for class definition, including attributes and methods.
Methods:
-
get_struct
–Return the AST structure of 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/classes.py
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/classes.py
209 210 211 212 213 214 215 216 217 218 219 220 |
|
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 |
|
Complex
¶
Bases: Number
Base class for complex numbers.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
Complex32
¶
Bases: Complex
Complex32 data type class.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
Complex64
¶
Bases: Complex
Complex64 data type class.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
DataType
¶
Bases: ExprType
AST main expression class.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
DataTypeOps
¶
Bases: DataType
Overload some magic functions used for the main operations.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
Date
¶
Bases: Temporal
Date data type expression.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
DateTime
¶
Bases: Temporal
DateTime data type expression.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
Expr
¶
Bases: AST
AST main expression class.
Methods:
-
get_struct
–Return a structure that represents the node 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/base.py
180 181 182 183 184 185 186 187 188 189 190 191 |
|
get_struct
abstractmethod
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a structure that represents the node object.
Source code in src/astx/base.py
255 256 257 |
|
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 |
|
ExprType
¶
Bases: Expr
ExprType expression class.
Methods:
-
get_struct
–Return a structure that represents the node 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/base.py
180 181 182 183 184 185 186 187 188 189 190 191 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a structure that represents the node object.
Source code in src/astx/base.py
344 345 346 |
|
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 |
|
Float16
¶
Bases: Floating
Float16 data type expression.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
Float32
¶
Bases: Floating
Float32 data type expression.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
Float64
¶
Bases: Floating
Float64 data type expression.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
Floating
¶
Bases: Number
AST for the literal float number.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
ForCountLoopExpr
¶
ForCountLoopExpr(initializer: InlineVariableDeclaration, condition: Expr, update: Expr, body: Block, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: Expr
AST class for a simple Count-Controlled For
Loop expression.
This is a very basic for
loop, used by languages like C or C++.
Methods:
-
get_struct
–Return the AST structure of 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/flows.py
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/flows.py
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 |
|
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 |
|
ForCountLoopStmt
¶
ForCountLoopStmt(initializer: InlineVariableDeclaration, condition: Expr, update: Expr, body: Block, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: StatementType
AST class for a simple Count-Controlled For
Loop statement.
This is a very basic for
loop, used by languages like C or C++.
Methods:
-
get_struct
–Return the AST structure of 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/flows.py
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/flows.py
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
|
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 |
|
ForRangeLoopExpr
¶
ForRangeLoopExpr(variable: InlineVariableDeclaration, start: Expr, end: Expr, step: Expr, body: Block, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: Expr
AST class for For
Range Expression.
Methods:
-
get_struct
–Return the AST structure of 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/flows.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/flows.py
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
|
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 |
|
ForRangeLoopStmt
¶
ForRangeLoopStmt(variable: InlineVariableDeclaration, start: Expr, end: Expr, step: Expr, body: Block, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: StatementType
AST class for For
Range Statement.
Methods:
-
get_struct
–Return the AST structure of 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/flows.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/flows.py
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
|
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 |
|
Function
¶
Function(prototype: FunctionPrototype, body: Block, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: StatementType
AST class for function definition.
Methods:
-
get_struct
–Get the AST structure that represent the object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Attributes:
Source code in src/astx/callables.py
216 217 218 219 220 221 222 223 224 225 226 227 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Get the AST structure that represent the object.
Source code in src/astx/callables.py
247 248 249 250 251 252 253 254 255 256 257 |
|
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 |
|
FunctionCall
¶
FunctionCall(fn: Function, args: Iterable[DataType], type_: DataType = AnyType(), loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: DataType
AST class for function call.
Methods:
-
get_struct
–Return the AST structure of 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/callables.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/callables.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
|
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 |
|
FunctionPrototype
¶
FunctionPrototype(name: str, args: Arguments, return_type: AnyType, scope: ScopeKind = global_, visibility: VisibilityKind = public, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: StatementType
AST class for function prototype declaration.
Methods:
-
get_struct
–Get the AST structure that represent 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/callables.py
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Get the AST structure that represent the object.
Source code in src/astx/callables.py
174 175 176 |
|
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 |
|
FunctionReturn
¶
FunctionReturn(value: DataType, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: StatementType
AST class for function return
statement.
Methods:
-
get_struct
–Return the AST structure of 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/callables.py
186 187 188 189 190 191 192 193 194 195 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/callables.py
201 202 203 204 205 |
|
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 |
|
IfExpr
¶
IfExpr(condition: Expr, then: Block, else_: Optional[Block] = None, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: Expr
AST class for if
expression.
Methods:
-
get_struct
–Return the AST structure of 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/flows.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/flows.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
|
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 |
|
IfStmt
¶
IfStmt(condition: Expr, then: Block, else_: Optional[Block] = None, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: StatementType
AST class for if
statement.
Methods:
-
get_struct
–Return the AST structure of 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/flows.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/flows.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
|
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 |
|
ImportExpr
¶
ImportExpr(names: list[AliasExpr], loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: Expr
Represents an import operation as an expression.
Methods:
-
get_struct
–Return the AST structure of the import expression.
-
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/packages.py
281 282 283 284 285 286 287 288 289 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the import expression.
Source code in src/astx/packages.py
296 297 298 299 300 301 302 |
|
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 |
|
ImportFromExpr
¶
ImportFromExpr(names: list[AliasExpr], module: str = '', level: int = 0, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: Expr
Represents a 'from ... import ...' operation as an expression.
Methods:
-
get_struct
–Return the AST structure of the import-from expression.
-
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/packages.py
314 315 316 317 318 319 320 321 322 323 324 325 326 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the import-from expression.
Source code in src/astx/packages.py
338 339 340 341 342 343 344 345 346 347 348 349 350 |
|
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 |
|
ImportFromStmt
¶
ImportFromStmt(names: list[AliasExpr], module: str = '', level: int = 0, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: StatementType
Represents an import-from statement.
Methods:
-
get_struct
–Return the AST structure of the import-from statement.
-
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/packages.py
236 237 238 239 240 241 242 243 244 245 246 247 248 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the import-from statement.
Source code in src/astx/packages.py
259 260 261 262 263 264 265 266 267 268 269 270 271 |
|
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 |
|
ImportStmt
¶
ImportStmt(names: list[AliasExpr], loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: StatementType
Represents an import statement.
Methods:
-
get_struct
–Return the AST structure of the import statement.
-
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/packages.py
203 204 205 206 207 208 209 210 211 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the import statement.
Source code in src/astx/packages.py
218 219 220 221 222 223 224 |
|
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 |
|
InlineVariableDeclaration
¶
InlineVariableDeclaration(name: str, type_: DataType, mutability: MutabilityKind = constant, visibility: VisibilityKind = public, scope: ScopeKind = local, value: Expr = UNDEFINED, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: Expr
AST class for inline variable declaration expression.
Can be used in expressions like for loops.
Methods:
-
get_struct
–Return a string that represents 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/variables.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a string that represents the object.
Source code in src/astx/variables.py
113 114 115 116 117 |
|
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 |
|
Int16
¶
Bases: SignedInteger
Int16 data type expression.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
Int32
¶
Bases: SignedInteger
Int32 data type expression.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
Int64
¶
Bases: SignedInteger
Int64 data type expression.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
Int8
¶
Bases: SignedInteger
Int8 data type expression.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
Integer
¶
Bases: AnyType
Integer number data type expression.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
LambdaExpr
¶
LambdaExpr(body: Expr, params: Arguments = Arguments(), loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: Expr
AST class for lambda expressions.
Methods:
-
get_struct
–Return the AST structure of the lambda expression.
-
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/callables.py
268 269 270 271 272 273 274 275 276 277 278 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the lambda expression.
Source code in src/astx/callables.py
285 286 287 288 289 290 291 292 |
|
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 |
|
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 |
|
Module
¶
Module(name: str = 'main', loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Block
AST main expression class.
Methods:
-
append
–Append a new node to the stack.
-
get_struct
–Return the AST structure of the object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Attributes:
Source code in src/astx/packages.py
53 54 55 56 57 58 59 60 |
|
append
¶
append(value: ASTType) -> None
Append a new node to the stack.
Source code in src/astx/base.py
305 306 307 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/packages.py
71 72 73 74 75 76 77 78 79 80 81 |
|
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 |
|
Number
¶
Bases: AnyType
Number data type expression.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
OperatorType
¶
Bases: DataType
AST main expression class.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
Package
¶
Package(name: str = 'main', modules: list[Module] = [], packages: list[Package] = [], loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: ASTNodes
AST class for Package.
Methods:
-
append
–Append a new node to the stack.
-
get_struct
–Return the AST structure of 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/packages.py
93 94 95 96 97 98 99 100 101 102 103 104 |
|
append
¶
append(value: ASTType) -> None
Append a new node to the stack.
Source code in src/astx/base.py
305 306 307 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/packages.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
|
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 |
|
Program
¶
Program(name: str = 'main', target: Target = Target('', ''), modules: list[Module] = [], packages: list[Package] = [], loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Package
AST class for Program.
Methods:
-
append
–Append a new node to the stack.
-
get_struct
–Return the AST structure of 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/packages.py
140 141 142 143 144 145 146 147 148 149 150 151 152 |
|
append
¶
append(value: ASTType) -> None
Append a new node to the stack.
Source code in src/astx/base.py
305 306 307 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/packages.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
|
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 |
|
SignedInteger
¶
Bases: Integer
Signed integer number data type expression.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
StatementType
¶
Bases: AST
AST main expression class.
Methods:
-
get_struct
–Return a structure that represents the node 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/base.py
180 181 182 183 184 185 186 187 188 189 190 191 |
|
get_struct
abstractmethod
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a structure that represents the node object.
Source code in src/astx/base.py
255 256 257 |
|
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 |
|
Target
¶
Bases: Expr
Define the Architecture target for the program.
Methods:
-
get_struct
–Return the AST structure of 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/packages.py
33 34 35 36 37 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/packages.py
39 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 |
|
Time
¶
Bases: Temporal
Time data type expression.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
Timestamp
¶
Bases: Temporal
Timestamp data type expression.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
TypeCastExpr
¶
TypeCastExpr(expr: Expr, target_type: DataType, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: Expr
AST class for type casting expressions.
Methods:
-
get_struct
–Return the AST structure of the TypeCast expression.
-
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/types/casting.py
29 30 31 32 33 34 35 36 37 38 39 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the TypeCast expression.
Source code in src/astx/types/casting.py
45 46 47 48 49 50 51 52 53 |
|
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 |
|
UInt128
¶
Bases: UnsignedInteger
UInt128 data type expression.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
UInt16
¶
Bases: UnsignedInteger
UInt16 data type expression.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
UInt32
¶
Bases: UnsignedInteger
UInt32 data type expression.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
UInt64
¶
Bases: UnsignedInteger
UInt64 data type expression.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
UInt8
¶
Bases: UnsignedInteger
UInt8 data type expression.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
UTF8Char
¶
Bases: AnyType
Class for UTF-8 encoded characters.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
UTF8String
¶
Bases: AnyType
Class for UTF-8 encoded strings.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
UnaryOp
¶
Bases: DataTypeOps
AST class for the unary operator.
Methods:
-
get_struct
–Return the AST structure of 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/types/operators.py
93 94 95 96 97 98 99 100 101 102 103 104 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/types/operators.py
110 111 112 113 114 |
|
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 |
|
Undefined
¶
Bases: Expr
Undefined expression class.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
180 181 182 183 184 185 186 187 188 189 190 191 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
354 355 356 357 358 |
|
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 |
|
UnsignedInteger
¶
Bases: Integer
Unsigned integer number data type expression.
Methods:
-
get_struct
–Return a simple structure that represents 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/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
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 |
|
Variable
¶
Variable(name: str, type_: DataType = AnyType(), loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: DataTypeOps
AST class for the variable usage.
Methods:
-
get_struct
–Return a string that represents 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/variables.py
161 162 163 164 165 166 167 168 169 170 171 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a string that represents the object.
Source code in src/astx/variables.py
177 178 179 180 181 |
|
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 |
|
VariableAssignment
¶
VariableAssignment(name: str, value: Expr, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: StatementType
AST class for variable declaration.
Methods:
-
get_struct
–Return a string that represents 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/variables.py
128 129 130 131 132 133 134 135 136 137 138 139 140 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a string that represents the object.
Source code in src/astx/variables.py
146 147 148 149 150 |
|
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 |
|
VariableDeclaration
¶
VariableDeclaration(name: str, type_: DataType, mutability: MutabilityKind = constant, visibility: VisibilityKind = public, scope: ScopeKind = local, value: Expr = UNDEFINED, parent: Optional[ASTNodes] = None, loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: StatementType
AST class for variable declaration.
Methods:
-
get_struct
–Return a string that represents 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/variables.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a string that represents the object.
Source code in src/astx/variables.py
66 67 68 69 70 |
|
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 |
|
WhileExpr
¶
WhileExpr(condition: Expr, body: Block, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: Expr
AST class for while
expression.
Methods:
-
get_struct
–Return the AST structure of 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/flows.py
392 393 394 395 396 397 398 399 400 401 402 403 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/flows.py
409 410 411 412 413 414 415 416 417 418 419 420 |
|
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 |
|
WhileStmt
¶
WhileStmt(condition: Expr, body: Block, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: StatementType
AST class for while
statement.
Methods:
-
get_struct
–Return the AST structure of 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/flows.py
353 354 355 356 357 358 359 360 361 362 363 364 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/flows.py
370 371 372 373 374 375 376 377 378 379 380 381 |
|
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 |
|
get_version
¶
get_version() -> str
Return the program version.
Source code in src/astx/__init__.py
141 142 143 144 145 146 |
|