pub struct FlowDecl { /* private fields */ }Implementations§
Source§impl FlowDecl
impl FlowDecl
Sourcepub fn name_token(&self) -> Option<SyntaxToken>
pub fn name_token(&self) -> Option<SyntaxToken>
The declared name (the IDENT immediately after flow).
pub fn param_list(&self) -> Option<ParamList>
Sourcepub fn stitches(&self) -> impl Iterator<Item = FlowDecl>
pub fn stitches(&self) -> impl Iterator<Item = FlowDecl>
Nested flow declarations directly inside this one’s body — a
stitch (charter §4: “stitches are nested flows”). Only a
prose-ground body can contain one (a code-ground STMT_BLOCK’s
statement grammar has no declaration-dispatch arm — parser/stmt.rs
never produces a FLOW_DECL child), so a ~{ }-bodied flow simply
yields none here, same as an empty body would.
Sourcepub fn return_type(&self) -> Option<TypeAnnotation>
pub fn return_type(&self) -> Option<TypeAnnotation>
The header’s : type return clause, if written (NG-C, #1489).
Declaring one is the ruled coroutine-vs-state toggle: a flow with
a return type must produce a value, and (unlike a plain flow) does
not pick up the implicit -> DONE on fall-through.
Sourcepub fn doc(&self) -> Option<DocComment>
pub fn doc(&self) -> Option<DocComment>
The leading /// doc comment, if one is attached (B0.6b).
Sourcepub fn is_pub(&self) -> bool
pub fn is_pub(&self) -> bool
true if a pub keyword precedes this header (issue #1582, RULED
2026-08-03): opts the declaration into VisibilityMark::Public
(hir::lower_native::container::lower_top_level_container/
lower_stitch read this to populate Knot/Stitch::visibility).
Absent, the declaration stays Private — the already-ratified
2026-07-23 default, unchanged by this accessor.
Source§impl FlowDecl
impl FlowDecl
Trailing #tags on the flow header line — container-level
per-flow tags (§8b.4, the authoring surface issue #474’s per-flow
tag APIs were iceboxed waiting for). Parsed here; the runtime-side
API is #474’s own work, so hir::lower_native reports them as
not-yet-lowered rather than dropping them.
Trait Implementations§
Source§impl AstNode for FlowDecl
impl AstNode for FlowDecl
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.