pub struct RustLanguage {
pub gc_pointer: bool,
pub box_syntax: bool,
}Expand description
Configuration for the Rust language parser.
This struct contains language-specific options that control parsing behavior and compatibility with different versions or extensions of Rust.
Fields§
§gc_pointer: boolAllow @gc_pointer kind in old rust
This flag enables support for the experimental garbage collection pointer kind
that was briefly considered for early Rust versions. When enabled, the parser
will recognize @gc_pointer annotations on types.
box_syntax: boolAllow box Class {} kind in old rust
This flag enables support for the deprecated box kind that was used in early
Rust versions before the current Box::new() kind was standardized.
When enabled, the parser will recognize expressions like box Class {}.
Trait Implementations§
Source§impl<'config> Builder<RustLanguage> for RustParser<'config>
impl<'config> Builder<RustLanguage> for RustParser<'config>
Source§fn build_incremental(
&self,
text: impl Source,
changed: usize,
cache: IncrementalCache<'_, RustLanguage>,
) -> OakDiagnostics<RustRoot>
fn build_incremental( &self, text: impl Source, changed: usize, cache: IncrementalCache<'_, RustLanguage>, ) -> OakDiagnostics<RustRoot>
Source§impl Clone for RustLanguage
impl Clone for RustLanguage
Source§fn clone(&self) -> RustLanguage
fn clone(&self) -> RustLanguage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RustLanguage
impl Debug for RustLanguage
Source§impl Default for RustLanguage
Default implementation for RustLanguage.
impl Default for RustLanguage
Default implementation for RustLanguage.
Creates a RustLanguage instance with all experimental features disabled, corresponding to the standard modern Rust kind.
Source§impl Language for RustLanguage
Implementation of the Language trait for RustLanguage.
impl Language for RustLanguage
Implementation of the Language trait for RustLanguage.
This connects the language configuration to the specific kind kinds and AST root type used for Rust parsing.