Struct piston_meta::meta_rules::SeparateBy [] [src]

pub struct SeparateBy {
    pub rule: Rule,
    pub by: Rule,
    pub optional: bool,
    pub allow_trail: bool,
    pub debug_id: DebugId,
}

Stores inforamtion about separated by.

Fields

rule: Rule

The rule to separate.

by: Rule

The rule to separate by.

optional: bool

Whether the rule must occur at least once.

allow_trail: bool

Whether the rule can end with separator.

debug_id: DebugId

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

Methods

impl SeparateBy
[src]

fn parse(&self, tokens: &mut Vec<Range<MetaData>>, state: &TokenizerState, read_token: &ReadToken, refs: &[Rule]) -> ParseResult<TokenizerState>

Parses rule repeatedly separated by another rule.

Trait Implementations

impl PartialEq for SeparateBy
[src]

fn eq(&self, __arg_0: &SeparateBy) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &SeparateBy) -> bool

This method tests for !=.

impl Debug for SeparateBy
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for SeparateBy
[src]

fn clone(&self) -> SeparateBy

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more