TexLanguage

Struct TexLanguage 

Source
pub struct TexLanguage {
    pub version: TexVersion,
    pub math_mode: bool,
    pub packages: bool,
    pub custom_commands: bool,
    pub strict: bool,
}
Expand description

TeX 语言配置

Fields§

§version: TexVersion

TeX 版本

§math_mode: bool

是否支持数学模式

§packages: bool

是否支持扩展包

§custom_commands: bool

是否支持自定义命令

§strict: bool

是否启用严格模式

Implementations§

Source§

impl TexLanguage

Source

pub fn standard() -> Self

创建标准 LaTeX 配置

Source

pub fn tex() -> Self

创建原始 TeX 配置

Source

pub fn xetex() -> Self

创建 XeTeX 配置

Source

pub fn luatex() -> Self

创建 LuaTeX 配置

Source

pub fn pdftex() -> Self

创建 pdfTeX 配置

Source

pub fn strict() -> Self

创建严格模式配置

Source

pub fn with_extensions() -> Self

创建支持扩展的配置

Trait Implementations§

Source§

impl Default for TexLanguage

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Language for TexLanguage

Source§

type SyntaxKind = TexSyntaxKind

The kind kind type used to represent different kind and node types in the language. Read more
Source§

type TypedRoot = ()

The root type for the parsed tree that represents the top-level structure of the language. Read more
Source§

impl<'config> Lexer<TexLanguage> for TexLexer<'config>

Source§

fn lex_incremental( &self, source: impl Source, changed: usize, cache: IncrementalCache<'_, TexLanguage>, ) -> LexOutput<TexLanguage>

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

Tokenizes the given source text into a sequence of tokens. Read more

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

impl<T> ErasedDestructor for T
where T: 'static,