API reference

python:arx:arx.parser.control_flow.ControlFlowParserMixin.parse_if_stmt

method parse_if_stmt

parse_if_stmt() -> astx.IfStmt

Source: packages/arx/src/arx/parser/control_flow.py:201

Parse an if/elif chain and optional final else as nested IfStmt.

Attach only same-indentation clauses. Build the chain iteratively; each elif occupies the preceding clause's else block and retains its keyword location. IRx evaluates conditions until one matches.

Returns

Parsed an if/elif chain and optional final else as nested IfStmt.; Type: astx.IfStmt

Search documentation

Type to search.