Struct piston_meta::Whitespace [] [src]

pub struct Whitespace {
    pub optional: bool,
    pub debug_id: DebugId,
}

Stores information about whitespace.

Fields

optional: bool

Whether the whitespace is optional or required.

debug_id: DebugId

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

Methods

impl Whitespace
[src]

fn parse(&self, chars: &[char], offset: usize) -> Result<Range, (Range, ParseError)>

Parse whitespace. If whitespace is required and no whitespace is found, an error will be reported.