pub struct SigilText {
pub name: String,
pub raw: String,
}Expand description
A float literal’s value, with the digit separators dropped.
parse::<f64> is the correctly-rounded reading of a decimal string, so 1.5e-3 and 0.0015
give the same f64 — which is what lets a table of constants be transcribed in the notation it
was published in rather than rewritten.
A typed literal’s two halves: the sigil’s name, and the body exactly as written.
The body is not unescaped. regex"^\d{4}$" must reach its macro with the backslash it was
written with, so the one thing this lexer does to a sigil body is find where it ends.
Fields§
§name: String§raw: StringTrait Implementations§
impl StructuralPartialEq for SigilText
Auto Trait Implementations§
impl Freeze for SigilText
impl RefUnwindSafe for SigilText
impl Send for SigilText
impl Sync for SigilText
impl Unpin for SigilText
impl UnwindSafe for SigilText
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more