Struct piston_meta::Optional [] [src]

pub struct Optional {
    pub args: Vec<Rule>,
    pub debug_id: DebugId,
}

Stores information about optional.

Fields

args: Vec<Rule>

The optional rules.

debug_id: DebugId

A debug id to track down the rule generating an error.

Methods

impl Optional
[src]

fn parse(&self, tokenizer: &mut Tokenizer, state: &TokenizerState, chars: &[char], offset: usize) -> (Range, TokenizerState, Option<(Range, ParseError)>)

Parse optional. Returns the old state if any sub rule fails.