LangRust

Struct LangRust 

Source
pub struct LangRust {}
Expand description

Language context for HIR processing

Implementations§

Source§

impl LangRust

Source

pub const Text_fn: u16 = 96u16

Source

pub const Text_LPAREN: u16 = 4u16

Source

pub const Text_RPAREN: u16 = 5u16

Source

pub const Text_LBRACE: u16 = 8u16

Source

pub const Text_RBRACE: u16 = 9u16

Source

pub const Text_let: u16 = 101u16

Source

pub const Text_EQ: u16 = 70u16

Source

pub const Text_SEMI: u16 = 2u16

Source

pub const Text_COLON: u16 = 11u16

Source

pub const Text_COMMA: u16 = 83u16

Source

pub const Text_ARROW: u16 = 85u16

Source

pub const integer_literal: u16 = 127u16

Source

pub const type_identifier: u16 = 354u16

Source

pub const scoped_identifier: u16 = 243u16

Source

pub const field_identifier: u16 = 351u16

Source

pub const identifier: u16 = 1u16

Source

pub const parameter: u16 = 213u16

Source

pub const parameters: u16 = 210u16

Source

pub const let_declaration: u16 = 203u16

Source

pub const field_declaration: u16 = 182u16

Source

pub const block: u16 = 293u16

Source

pub const source_file: u16 = 157u16

Source

pub const mod_item: u16 = 173u16

Source

pub const struct_item: u16 = 176u16

Source

pub const enum_item: u16 = 178u16

Source

pub const enum_variant_list: u16 = 179u16

Source

pub const enum_variant: u16 = 180u16

Source

pub const impl_item: u16 = 193u16

Source

pub const trait_item: u16 = 194u16

Source

pub const const_item: u16 = 185u16

Source

pub const static_item: u16 = 186u16

Source

pub const function_item: u16 = 188u16

Source

pub const mutable_specifier: u16 = 122u16

Source

pub const expression_statement: u16 = 160u16

Source

pub const assignment_expression: u16 = 251u16

Source

pub const binary_expression: u16 = 250u16

Source

pub const operator: u16 = 14u16

Source

pub const call_expression: u16 = 256u16

Source

pub const arguments: u16 = 257u16

Source

pub const primitive_type: u16 = 32u16

Source

pub const field_name: u16 = 19u16

Source

pub const field_type: u16 = 28u16

Source

pub const field_pattern: u16 = 24u16

Source

pub const field_return_type: u16 = 25u16

Source

pub const field_parameters: u16 = 22u16

Source

pub fn new() -> Self

Create a new Language instance

Source§

impl LangRust

Source

pub const SUPPORTED_EXTENSIONS: &'static [&'static str]

Trait Implementations§

Source§

impl Debug for LangRust

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl LanguageTrait for LangRust

Source§

fn parse(text: impl AsRef<[u8]>) -> Option<Tree>

Parse the text into a tree

Source§

fn supported_extensions() -> &'static [&'static str]

Return the list of supported file extensions for this language

Source§

fn hir_kind(kind_id: u16) -> HirKind

Get the HIR kind for a given token ID

Source§

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>

Get the string representation of a token ID

Source§

fn is_valid_token(kind_id: u16) -> bool

Check if a token ID is valid

Source§

fn name_field() -> u16

Source§

fn type_field() -> u16

Source§

fn collect_symbols<'tcx>(unit: CompileUnit<'tcx>, globals: &'tcx Scope<'tcx>)

Source§

fn bind_symbols<'tcx>(unit: CompileUnit<'tcx>, globals: &'tcx Scope<'tcx>)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.