SyntaxObject

Type Alias SyntaxObject 

Source
pub type SyntaxObject = RawSyntaxObject<TokenType<InternedString>>;

Aliased Type§

pub struct SyntaxObject {
    pub ty: TokenType<InternedString>,
    pub span: Span,
    pub syntax_object_id: SyntaxObjectId,
    pub unresolved: bool,
    pub introduced_via_macro: bool,
}

Fields§

§ty: TokenType<InternedString>§span: Span§syntax_object_id: SyntaxObjectId§unresolved: bool§introduced_via_macro: bool

Implementations§

Source§

impl SyntaxObject

Source

pub fn new(ty: TokenType<InternedString>, span: Span) -> Self

Source

pub fn default(ty: TokenType<InternedString>) -> Self

Source

pub fn set_span(&mut self, span: Span)

Source

pub fn from_token_with_source( val: &Token<'_, InternedString>, _source: &Option<Rc<PathBuf>>, ) -> Self

Trait Implementations§

Source§

impl From<&Token<'_, InternedString>> for SyntaxObject

Source§

fn from(val: &Token<'_, InternedString>) -> SyntaxObject

Converts to this type from the input type.
Source§

impl PartialEq for SyntaxObject

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.