packages
¶
Define ASTx for more broader scope.
Module
¶
Module(name: str = 'main', loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: Block
AST main expression class.
Source code in src/astx/packages.py
49 50 51 52 53 54 55 56 |
|
append
¶
append(value: AST) -> None
Append a new node to the stack.
Source code in src/astx/base.py
259 260 261 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/packages.py
67 68 69 70 71 72 73 74 75 76 77 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
217 218 219 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
211 212 213 214 215 |
|
Package
¶
Package(name: str = 'main', modules: list[Module] = [], packages: list[Package] = [], loc: SourceLocation = NO_SOURCE_LOCATION)
Bases: ASTNodes
AST class for Package.
Source code in src/astx/packages.py
88 89 90 91 92 93 94 95 96 97 98 99 |
|
append
¶
append(value: AST) -> None
Append a new node to the stack.
Source code in src/astx/base.py
259 260 261 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/packages.py
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
217 218 219 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
211 212 213 214 215 |
|
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.
Source code in src/astx/packages.py
134 135 136 137 138 139 140 141 142 143 144 145 146 |
|
append
¶
append(value: AST) -> None
Append a new node to the stack.
Source code in src/astx/base.py
259 260 261 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/packages.py
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
217 218 219 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
211 212 213 214 215 |
|
Target
¶
Bases: Expr
Define the Architecture target for the program.
Source code in src/astx/packages.py
30 31 32 33 34 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/packages.py
36 37 38 39 40 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
217 218 219 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
211 212 213 214 215 |
|