class
ExpressionStatementSyntaxMethods
- def getFirstToken(self, /) -> Token
- def getLastToken(self, /) -> Token
- def isEquivalentTo(self, other: SyntaxNode) -> bool
- def visit(self, f: object) -> None
- Visit a pyslang object with a callback function `f`.
Special methods
- def __getitem__(self, arg0: int, /) -> object
- def __iter__(self, /) -> typing.Iterator[object]
- def __len__(self, /) -> int
- def __repr__(self, /) -> str
- def __str__(self, /) -> str
Properties
- attributes get set
- expr: ExpressionSyntax get set
- kind: SyntaxKind get
- label: NamedLabelSyntax get set
- parent: SyntaxNode get
- semi: Token get set
- sourceRange: SourceRange get
Method documentation
def pyslang. ExpressionStatementSyntax. visit(self,
f: object) -> None
Visit a pyslang object with a callback function `f`.
The callback function `f` should take a single argument, which is the current node being visited.
The return value of `f` determines the next node to visit. If `f` ever returns `pyslang.VisitAction.Interrupt`, the visit is aborted and no additional nodes are visited. If `f` returns `pyslang.VisitAction.Skip`, then no child nodes of the current node are visited. For any other return value, including `pyslang.VisitAction.Advance`, the return value is ignored, and the walk continues.