pub struct LangRust {}Expand description
Language context for HIR processing
Implementations§
Source§impl LangRust
impl LangRust
pub const Text_fn: u16 = 96u16
pub const Text_LPAREN: u16 = 4u16
pub const Text_RPAREN: u16 = 5u16
pub const Text_LBRACE: u16 = 8u16
pub const Text_RBRACE: u16 = 9u16
pub const Text_let: u16 = 101u16
pub const Text_EQ: u16 = 70u16
pub const Text_SEMI: u16 = 2u16
pub const Text_COLON: u16 = 11u16
pub const Text_COMMA: u16 = 83u16
pub const Text_ARROW: u16 = 85u16
pub const integer_literal: u16 = 127u16
pub const type_identifier: u16 = 354u16
pub const scoped_identifier: u16 = 243u16
pub const field_identifier: u16 = 351u16
pub const identifier: u16 = 1u16
pub const parameter: u16 = 213u16
pub const parameters: u16 = 210u16
pub const let_declaration: u16 = 203u16
pub const field_declaration: u16 = 182u16
pub const block: u16 = 293u16
pub const source_file: u16 = 157u16
pub const mod_item: u16 = 173u16
pub const struct_item: u16 = 176u16
pub const enum_item: u16 = 178u16
pub const enum_variant_list: u16 = 179u16
pub const enum_variant: u16 = 180u16
pub const impl_item: u16 = 193u16
pub const trait_item: u16 = 194u16
pub const const_item: u16 = 185u16
pub const static_item: u16 = 186u16
pub const function_item: u16 = 188u16
pub const mutable_specifier: u16 = 122u16
pub const expression_statement: u16 = 160u16
pub const assignment_expression: u16 = 251u16
pub const binary_expression: u16 = 250u16
pub const operator: u16 = 14u16
pub const call_expression: u16 = 256u16
pub const arguments: u16 = 257u16
pub const primitive_type: u16 = 32u16
pub const field_name: u16 = 19u16
pub const field_type: u16 = 28u16
pub const field_pattern: u16 = 24u16
pub const field_return_type: u16 = 25u16
pub const field_parameters: u16 = 22u16
Trait Implementations§
Source§impl LanguageTrait for LangRust
impl LanguageTrait for LangRust
Source§fn block_kind(kind_id: u16) -> BlockKind
fn block_kind(kind_id: u16) -> BlockKind
Get the Block kind for a given token ID
Source§fn token_str(kind_id: u16) -> Option<&'static str>
fn token_str(kind_id: u16) -> Option<&'static str>
Get the string representation of a token ID
Source§fn is_valid_token(kind_id: u16) -> bool
fn is_valid_token(kind_id: u16) -> bool
Check if a token ID is valid
fn name_field() -> u16
fn type_field() -> u16
fn collect_symbols<'tcx>(unit: CompileUnit<'tcx>, globals: &'tcx Scope<'tcx>)
fn bind_symbols<'tcx>(unit: CompileUnit<'tcx>, globals: &'tcx Scope<'tcx>)
Auto Trait Implementations§
impl Freeze for LangRust
impl RefUnwindSafe for LangRust
impl Send for LangRust
impl Sync for LangRust
impl Unpin for LangRust
impl UnwindSafe for LangRust
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more