pub struct LogicLine { /* private fields */ }Implementations§
Source§impl LogicLine
impl LogicLine
Sourcepub fn let_stmt(&self) -> Option<LetStmt>
pub fn let_stmt(&self) -> Option<LetStmt>
The wrapped ~ let name = expr, when this logic line is a temp
declaration (parser/stmt.rs::logic_line’s KW_LET branch, issue
#1972).
Sourcepub fn assign_stmt(&self) -> Option<AssignStmt>
pub fn assign_stmt(&self) -> Option<AssignStmt>
The wrapped ~ x = expr / ~ x += expr, when this logic line is an
assignment (parser/stmt.rs::logic_line’s at_assignment branch).
Sourcepub fn expr_stmt(&self) -> Option<ExprStmt>
pub fn expr_stmt(&self) -> Option<ExprStmt>
The wrapped ~ expr — an expression evaluated for its side effect
(e.g. a function call) — when this logic line is neither a temp
declaration nor an assignment.
Sourcepub fn until_stmt(&self) -> Option<UntilStmt>
pub fn until_stmt(&self) -> Option<UntilStmt>
The wrapped ~ until cond, when this logic line is a condition-park
escape — native’s sole await spelling (issue #1972,
parser/stmt.rs::logic_line’s KW_UNTIL branch).
Sourcepub fn stmt_block(&self) -> Option<StmtBlock>
pub fn stmt_block(&self) -> Option<StmtBlock>
The wrapped ~{ … } multi-statement logic block, when this logic
line is a T1b-style block escape (issue #1972,
parser/stmt.rs::logic_line’s L_BRACE branch). Reuses
StmtBlock’s grammar unmodified — the same node kind a fn’s
default body or a flow’s whole-body ~{ } override use.
Trait Implementations§
Source§impl AstNode for LogicLine
impl AstNode for LogicLine
Source§fn can_cast(kind: SyntaxKind) -> bool
fn can_cast(kind: SyntaxKind) -> bool
true for a node with a SyntaxKind this type can wrap.Source§fn cast(node: SyntaxNode) -> Option<Self>
fn cast(node: SyntaxNode) -> Option<Self>
SyntaxNode into this typed wrapper.Source§fn syntax(&self) -> &SyntaxNode
fn syntax(&self) -> &SyntaxNode
SyntaxNode.