Struct rune::ast::LitChar [−][src]
pub struct LitChar { pub token: Token, pub source: CopySource<char>, }
Expand description
A character literal.
Fields
token: Token
The token corresponding to the literal.
source: CopySource<char>
The source of the literal character.
Implementations
Trait Implementations
Parse a character literal.
Examples
use rune::{testing, ast}; testing::roundtrip::<ast::LitChar>("'a'"); testing::roundtrip::<ast::LitChar>("'\\0'"); testing::roundtrip::<ast::LitChar>("'\\n'"); testing::roundtrip::<ast::LitChar>("'\\r'"); testing::roundtrip::<ast::LitChar>("'\\''");
Parse the current item from the parser.
fn resolve_owned(
&self,
storage: &Storage,
source: &Source
) -> Result<Self::Owned, ResolveError>
fn resolve_owned(
&self,
storage: &Storage,
source: &Source
) -> Result<Self::Owned, ResolveError>
Resolve into an owned value.
Turn the current item into tokens.
Auto Trait Implementations
impl RefUnwindSafe for LitChar
impl UnwindSafe for LitChar
Blanket Implementations
Mutably borrows from an owned value. Read more