API reference

python:astx:astx.SwitchStmt

class SwitchStmt

SwitchStmt(value: Expr, cases: list[CaseStmt] | ASTNodes[CaseStmt], loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)

Source: packages/astx/src/astx/flows.py:1165

Declared as: python:astx:astx.flows.SwitchStmt

AST class for Switch statements based on Rust's match syntax.

Attributes

Methods

Attributes

Search documentation

Type to search.