Trait peg_runtime::ParseLiteral

source ·
pub trait ParseLiteral: Parse {
    // Required method
    fn parse_string_literal(&self, pos: usize, literal: &str) -> RuleResult<()>;
}
Expand description

A parser input type supporting the "literal" syntax.

Required Methods§

source

fn parse_string_literal(&self, pos: usize, literal: &str) -> RuleResult<()>

Attempt to match the literal string at pos, returning whether it matched or failed.

Implementations on Foreign Types§

source§

impl ParseLiteral for str

source§

fn parse_string_literal(&self, pos: usize, literal: &str) -> RuleResult<()>

source§

impl ParseLiteral for [u8]

source§

fn parse_string_literal(&self, pos: usize, literal: &str) -> RuleResult<()>

Implementors§