Abstract representation of the if/elif/else if/else statement block. For example, if there is a code block like: if condition1: block1 elif condition2: block2 else: block3 This class represents the entire block, including the conditions and nested code blocks. Attributes: condition: The condition expression for the if block. None if the block is an else block. consequence_block: The code block that is executed if the condition is True.
str
NodeId
str
int
bool
bool
bool
NodeType
str
TSNode
Editable
with new_src
.
str
bool
int
bool
None
Union[list[str], str]
bool
list[str]
bool
str
bool
str
bool, optional
bool, optional
int, optional
bool, optional
None
str
bool
bool
int
bool
None
bool
bool
None
bool
int
bool
None
str
str
int, optional
bool, optional
int, optional
int
regex_pattern
, similar to python’s re.search().
str
bool
bool