Struct commands::parser::RootNode
[−]
[src]
pub struct RootNode { pub node: TreeNode, }
The root of a command tree.
Fields
node: TreeNode
TreeNode
data.
Methods
impl RootNode
[src]
Trait Implementations
impl NodeOps for RootNode
[src]
RootNode
does not want to perform any actual NodeOps
as these
operations should only be invoked by the Parser
on successor nodes.
fn accept<'text>(
&self,
_parser: &mut Parser<'text>,
_token: Token,
_node_ref: &Rc<Node>
)
&self,
_parser: &mut Parser<'text>,
_token: Token,
_node_ref: &Rc<Node>
)
Accept this node with the given token
as data. Read more
fn acceptable(&self, _parser: &Parser, _node_ref: &Rc<Node>) -> bool
Can this node be accepted in the current parser state? By default, a node can be accepted when it hasn't been seen yet. Read more
fn complete<'text>(&self, _token: Option<Token<'text>>) -> Completion<'text>
A RootNode
can not be completed.
fn matches(&self, _parser: &Parser, _token: Token) -> bool
A RootNode
can not be matched.