callables
¶
Classes:
-
Argument– -
Arguments– -
AwaitExpr– -
FunctionAsyncDef– -
FunctionCall– -
FunctionDef– -
FunctionPrototype– -
FunctionReturn– -
LambdaExpr– -
YieldExpr– -
YieldFromExpr– -
YieldStmt–
Argument
¶
Argument(
name: str,
type_: DataType,
mutability: MutabilityKind = constant,
default: Expr = UNDEFINED,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: Variable
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/callables.py
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 85 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/callables.py
96 97 98 99 100 101 102 103 104 105 106 107 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
Arguments
¶
Methods:
-
append– -
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/callables.py
117 118 119 120 | |
append
¶
append(value: ASTType) -> None
Source code in packages/astx/src/astx/base.py
484 485 486 487 488 489 490 491 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/callables.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
AwaitExpr
¶
AwaitExpr(
value: Optional[Expr],
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: Expr
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/callables.py
618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/callables.py
646 647 648 649 650 651 652 653 654 655 656 657 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
FunctionAsyncDef
¶
FunctionAsyncDef(
prototype: FunctionPrototype,
body: Block,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: FunctionDef
Methods:
-
get_struct– -
to_json– -
to_yaml–
Attributes:
Source code in packages/astx/src/astx/callables.py
550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/callables.py
582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
FunctionCall
¶
FunctionCall(
fn: FunctionDef | str,
args: Iterable[DataType],
type_: DataType = AnyType(),
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/callables.py
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 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/callables.py
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
FunctionDef
¶
FunctionDef(
prototype: FunctionPrototype,
body: Block,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: StatementType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Attributes:
Source code in packages/astx/src/astx/callables.py
393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/callables.py
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
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
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/callables.py
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/callables.py
304 305 306 307 308 309 310 311 312 313 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
FunctionReturn
¶
FunctionReturn(
value: DataType,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: StatementType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/callables.py
332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/callables.py
360 361 362 363 364 365 366 367 368 369 370 371 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
LambdaExpr
¶
LambdaExpr(
body: Expr,
params: Arguments = Arguments(),
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: Expr
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/callables.py
493 494 495 496 497 498 499 500 501 502 503 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/callables.py
514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
YieldExpr
¶
YieldExpr(
value: Optional[Expr],
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: Expr
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/callables.py
676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/callables.py
704 705 706 707 708 709 710 711 712 713 714 715 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
YieldFromExpr
¶
YieldFromExpr(
value: Expr,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: Expr
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/callables.py
803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/callables.py
831 832 833 834 835 836 837 838 839 840 841 842 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
YieldStmt
¶
YieldStmt(
value: Optional[Expr] = None,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: StatementType
value: The expression to yield (optional) loc: Source location of the statement parent: Parent AST node parameters: value: type: Optional[Expr] loc: type: SourceLocation parent: type: Optional[ASTNodes]
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/callables.py
734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/callables.py
771 772 773 774 775 776 777 778 779 780 781 782 783 784 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |