pub struct RawSyntaxObject<T> {
pub ty: T,
pub span: Span,
pub syntax_object_id: SyntaxObjectId,
pub unresolved: bool,
pub introduced_via_macro: bool,
}Expand description
A syntax object that can hold anything as the syntax In this case, we’re using the token type emitted by logos
This should open the door to interning our strings to make parsing (and optimizations later) faster
Fields§
§ty: T§span: Span§syntax_object_id: SyntaxObjectId§unresolved: bool§introduced_via_macro: boolImplementations§
Source§impl RawSyntaxObject<TokenType<InternedString>>
impl RawSyntaxObject<TokenType<InternedString>>
pub fn new(ty: TokenType<InternedString>, span: Span) -> Self
pub fn default(ty: TokenType<InternedString>) -> Self
pub fn set_span(&mut self, span: Span)
pub fn from_token_with_source( val: &Token<'_, InternedString>, _source: &Option<Rc<PathBuf>>, ) -> Self
Trait Implementations§
Source§impl<T: Clone> Clone for RawSyntaxObject<T>
impl<T: Clone> Clone for RawSyntaxObject<T>
Source§impl<T: Debug> Debug for RawSyntaxObject<T>
impl<T: Debug> Debug for RawSyntaxObject<T>
Source§impl<'de, T> Deserialize<'de> for RawSyntaxObject<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for RawSyntaxObject<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: Hash> Hash for RawSyntaxObject<T>
impl<T: Hash> Hash for RawSyntaxObject<T>
Auto Trait Implementations§
impl<T> Freeze for RawSyntaxObject<T>where
T: Freeze,
impl<T> RefUnwindSafe for RawSyntaxObject<T>where
T: RefUnwindSafe,
impl<T> Send for RawSyntaxObject<T>where
T: Send,
impl<T> Sync for RawSyntaxObject<T>where
T: Sync,
impl<T> Unpin for RawSyntaxObject<T>where
T: Unpin,
impl<T> UnwindSafe for RawSyntaxObject<T>where
T: 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