Struct rune::ast::LitNumber [−][src]
pub struct LitNumber { pub token: Token, pub source: NumberSource, }
Expand description
A number literal.
Fields
token: Token
The token corresponding to the literal.
source: NumberSource
The source of the number.
Trait Implementations
Parse a number literal.
Examples
use rune::{testing, ast}; testing::roundtrip::<ast::LitNumber>("42"); testing::roundtrip::<ast::LitNumber>("42.42"); testing::roundtrip::<ast::LitNumber>("0.42"); testing::roundtrip::<ast::LitNumber>("0.42e10");
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 LitNumber
impl UnwindSafe for LitNumber
Blanket Implementations
Mutably borrows from an owned value. Read more