pub struct ParserTokenFlags(/* private fields */);Expand description
Parser-inferred semantic usage for an individual token occurrence.
This complements lexical token kind and helps distinguish ambiguous tokens (for example keyword text used as an identifier).
Implementations§
Source§impl ParserTokenFlags
impl ParserTokenFlags
Sourcepub fn used_as_identifier(self) -> bool
pub fn used_as_identifier(self) -> bool
True if the token was used as an identifier (SYNQ_TOKEN_FLAG_AS_ID).
Sourcepub fn used_as_function(self) -> bool
pub fn used_as_function(self) -> bool
True if the token was used as a function name (SYNQ_TOKEN_FLAG_AS_FUNCTION).
Sourcepub fn used_as_type(self) -> bool
pub fn used_as_type(self) -> bool
True if the token was used as a type name (SYNQ_TOKEN_FLAG_AS_TYPE).
Trait Implementations§
Source§impl Clone for ParserTokenFlags
impl Clone for ParserTokenFlags
Source§fn clone(&self) -> ParserTokenFlags
fn clone(&self) -> ParserTokenFlags
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParserTokenFlags
impl Debug for ParserTokenFlags
Source§impl Default for ParserTokenFlags
impl Default for ParserTokenFlags
Source§fn default() -> ParserTokenFlags
fn default() -> ParserTokenFlags
Returns the “default value” for a type. Read more
Source§impl PartialEq for ParserTokenFlags
impl PartialEq for ParserTokenFlags
impl Copy for ParserTokenFlags
impl Eq for ParserTokenFlags
impl StructuralPartialEq for ParserTokenFlags
Auto Trait Implementations§
impl Freeze for ParserTokenFlags
impl RefUnwindSafe for ParserTokenFlags
impl Send for ParserTokenFlags
impl Sync for ParserTokenFlags
impl Unpin for ParserTokenFlags
impl UnsafeUnpin for ParserTokenFlags
impl UnwindSafe for ParserTokenFlags
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