Enum commands::parser::Node [] [src]

pub enum Node {
    Command(CommandNode),
    Parameter(ParameterNode),
    ParameterName(ParameterNameNode),
    Root(RootNode),
}

Enumeration of node types used to have vectors of Node and so on.

Variants

Command

Node variant wrapping a CommandNode.

Parameter

Node variant wrapping a ParameterNode.

ParameterName

Node variant wrapping a ParameterNameNode.

Root

Node variant wrapping a RootNode.

Methods

impl Node

The node in the tree of commands and parameters used in the parser.

This trait defines the core operations which a node must support.

fn node(&self) -> &TreeNode

Get the TreeNode data for a given Node.

fn successors(&self) -> &Vec<Rc<Node>>

Get or calculate successors of this node.

Trait Implementations

impl PartialEq for Node

fn eq(&self, other: &Self) -> bool

1.0.0fn ne(&self, other: &Rhs) -> bool

impl NodeOps for Node

fn accept<'text>(&self, parser: &mut Parser<'text>, token: Token, node_ref: &Rc<Node>)

fn acceptable(&self, parser: &Parser, node_ref: &Rc<Node>) -> bool

fn complete<'text>(&self, token: Option<Token<'text>>) -> Completion<'text>

fn matches(&self, parser: &Parser, token: Token) -> bool