API reference
python:astx:astx.ParenthesizedExpr
class ParenthesizedExpr
ParenthesizedExpr(value: Expr, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Source: packages/astx/src/astx/base.py:668
Declared as: python:astx:astx.base.ParenthesizedExpr
AST class for explicitly grouped expressions (parentheses retained).
Attributes
-
loc — Source coordinates attached to this node.; Type: SourceLocation
-
comment — Comment.; Type: str
-
parent — Parent node in the syntax tree.; Type: Optional[ASTNodes]
-
ref — Identifier associated with this node.; Type: str
-
nbytes — Nbytes.; Type: int
-
name — Name identifying this declaration.; Type: str
-
_tmp_id — Identifier for tmp.; Type: int
-
type_ — Type associated with this expression.; Type: DataType
-
kind — Kind of value or operation.; Type: ASTKind
-
value — Stored value.; Type: Expr
Methods
-
__init__ — Initialize the ParenthesizedExpr instance.
-
__str__ — Return a string representation of the object with parentheses.
-
get_struct — Return the AST structure of the object.