pub struct JavaScriptLanguage {
    pub jsx: bool,
    pub typescript: bool,
    pub experimental: bool,
    pub strict_mode: bool,
    pub ecma_version: EcmaVersion,
}Expand description
JavaScript 语言实现
Fields§
§jsx: bool是否允许 JSX 语法
typescript: bool是否允许 TypeScript 语法
experimental: bool是否允许实验性语
strict_mode: bool是否严格模式
ecma_version: EcmaVersionECMAScript 版本
Implementations§
Trait Implementations§
Source§impl Clone for JavaScriptLanguage
 
impl Clone for JavaScriptLanguage
Source§fn clone(&self) -> JavaScriptLanguage
 
fn clone(&self) -> JavaScriptLanguage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl Debug for JavaScriptLanguage
 
impl Debug for JavaScriptLanguage
Source§impl Default for JavaScriptLanguage
 
impl Default for JavaScriptLanguage
Source§impl Language for JavaScriptLanguage
 
impl Language for JavaScriptLanguage
Source§type SyntaxKind = JavaScriptSyntaxKind
 
type SyntaxKind = JavaScriptSyntaxKind
The kind kind type used to represent different kind and node types in the language. Read more
Source§impl<'config> Lexer<JavaScriptLanguage> for JavaScriptLexer<'config>
 
impl<'config> Lexer<JavaScriptLanguage> for JavaScriptLexer<'config>
Source§fn lex_incremental(
    &self,
    source: impl Source,
    changed: usize,
    cache: IncrementalCache<'_, JavaScriptLanguage>,
) -> LexOutput<JavaScriptLanguage>
 
fn lex_incremental( &self, source: impl Source, changed: usize, cache: IncrementalCache<'_, JavaScriptLanguage>, ) -> LexOutput<JavaScriptLanguage>
Tokenizes source text using an existing cache for incremental parsing. Read more
Source§fn lex(
    &self,
    source: impl Source,
) -> OakDiagnostics<Vec<Token<<L as Language>::SyntaxKind>>>
 
fn lex( &self, source: impl Source, ) -> OakDiagnostics<Vec<Token<<L as Language>::SyntaxKind>>>
Tokenizes the given source text into a sequence of tokens. Read more
Source§impl PartialEq for JavaScriptLanguage
 
impl PartialEq for JavaScriptLanguage
impl Copy for JavaScriptLanguage
impl Eq for JavaScriptLanguage
impl StructuralPartialEq for JavaScriptLanguage
Auto Trait Implementations§
impl Freeze for JavaScriptLanguage
impl RefUnwindSafe for JavaScriptLanguage
impl Send for JavaScriptLanguage
impl Sync for JavaScriptLanguage
impl Unpin for JavaScriptLanguage
impl UnwindSafe for JavaScriptLanguage
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