pub struct SrcToken {
pub typ: Tok,
pub text: Vec<u8>,
pub int_val: u32,
pub file: usize,
pub line: u32,
pub lowered: bool,
pub columns: Option<(u32, u32)>,
}Expand description
A token as the parser sees it.
Fields§
§typ: TokWhat kind of token it is.
text: Vec<u8>Its text. For a string, this is the translated contents.
int_val: u32The value, for an integer.
file: usizeThe file it came from: an index for Preprocessor::file_name.
line: u32The line it came from.
lowered: boolIt is one of the tokens a Hexicon form is lowered to: while it is the current token, the parser is at the form’s place, as it is at a macro’s while it reads the macro’s expansion.
columns: Option<(u32, u32)>Where on its line it is, when that is known for sure: the bytes of the line as the file has it, from the first to past the last.
Trait Implementations§
impl Eq for SrcToken
impl StructuralPartialEq for SrcToken
Auto Trait Implementations§
impl Forget for SrcToken
impl Freeze for SrcToken
impl Move for SrcToken
impl RefUnwindSafe for SrcToken
impl Send for SrcTokenwhere
RawVecInner: Send,
impl Sync for SrcTokenwhere
RawVecInner: Sync,
impl Unpin for SrcToken
impl UnsafeUnpin for SrcToken
impl UnwindSafe for SrcTokenwhere
RawVecInner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.