pub struct TypstLanguage {
pub math_mode: bool,
pub scripting: bool,
pub strict: bool,
pub target: TypstVersion,
pub experimental: bool,
}Expand description
Typst 语言配置
Fields§
§math_mode: bool是否启用数学模式
scripting: bool是否支持脚本
strict: bool是否启用严格模式
target: TypstVersion目标 Typst 版本
experimental: bool是否允许实验性语法
Implementations§
Source§impl TypstLanguage
impl TypstLanguage
Sourcepub fn with_scripting() -> Self
pub fn with_scripting() -> Self
创建支持脚本的 Typst 配置
Sourcepub fn experimental() -> Self
pub fn experimental() -> Self
创建实验性语法的 Typst 配置
Trait Implementations§
Source§impl Language for TypstLanguage
impl Language for TypstLanguage
Source§type SyntaxKind = TypstSyntaxKind
type SyntaxKind = TypstSyntaxKind
The kind kind type used to represent different kind and node types in the language. Read more
Source§impl<'config> Lexer<TypstLanguage> for TypstLexer<'config>
impl<'config> Lexer<TypstLanguage> for TypstLexer<'config>
Source§fn lex_incremental(
&self,
source: impl Source,
changed: usize,
cache: IncrementalCache<'_, TypstLanguage>,
) -> LexOutput<TypstLanguage>
fn lex_incremental( &self, source: impl Source, changed: usize, cache: IncrementalCache<'_, TypstLanguage>, ) -> LexOutput<TypstLanguage>
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
Auto Trait Implementations§
impl Freeze for TypstLanguage
impl RefUnwindSafe for TypstLanguage
impl Send for TypstLanguage
impl Sync for TypstLanguage
impl Unpin for TypstLanguage
impl UnwindSafe for TypstLanguage
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