pub struct TaskNode { /* private fields */ }Expand description
Typed task CST wrapper.
Args: None.
Returns: Stable accessors for task header, commands and span.
Implementations§
Source§impl TaskNode
impl TaskNode
Sourcepub fn cast(syntax: SyntaxNode) -> Option<Self>
pub fn cast(syntax: SyntaxNode) -> Option<Self>
Casts a raw rowan node into a typed task wrapper.
Args: syntax: Raw rowan syntax node.
Returns:
Typed task wrapper when the kind matches TaskDecl.
Sourcepub fn range(&self) -> TextRange
pub fn range(&self) -> TextRange
Returns the task text range.
Args: None.
Returns: Task range in source text coordinates.
Sourcepub fn name_range(&self) -> Option<TextRange>
pub fn name_range(&self) -> Option<TextRange>
Returns the task name range from the header identifier.
Args: None.
Returns: Range covering the task name before the parameter list.
Sourcepub fn name(&self) -> Option<SmolStr>
pub fn name(&self) -> Option<SmolStr>
Returns the task name from the header identifier.
Args: None.
Returns: Task name when present.
Sourcepub fn header_text(&self) -> Option<SmolStr>
pub fn header_text(&self) -> Option<SmolStr>
Returns the normalized task header text without the trailing :.
Args: None.
Returns: Header text when present.
Sourcepub fn header_info(&self) -> TaskHeaderInfo
pub fn header_info(&self) -> TaskHeaderInfo
Returns the parsed task header sections and dependency references.
Args: None.
Returns: Structured header information parsed from one token stream pass.