pub struct TwigLanguage {
pub allow_raw_blocks: bool,
pub allow_custom_tags: bool,
pub mode: TwigMode,
}Expand description
Twig 语言定义
Fields§
§allow_raw_blocks: bool§mode: TwigModeImplementations§
Trait Implementations§
Source§impl<'config> Builder<TwigLanguage> for TwigBuilder<'config>
impl<'config> Builder<TwigLanguage> for TwigBuilder<'config>
Source§fn build<'a, S: Source + ?Sized>(
&self,
source: &S,
edits: &[TextEdit],
_cache: &'a mut impl BuilderCache<TwigLanguage>,
) -> BuildOutput<TwigLanguage>
fn build<'a, S: Source + ?Sized>( &self, source: &S, edits: &[TextEdit], _cache: &'a mut impl BuilderCache<TwigLanguage>, ) -> BuildOutput<TwigLanguage>
Builds the structure from the source text.
Source§impl Clone for TwigLanguage
impl Clone for TwigLanguage
Source§fn clone(&self) -> TwigLanguage
fn clone(&self) -> TwigLanguage
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 TwigLanguage
impl Debug for TwigLanguage
Source§impl Default for TwigLanguage
impl Default for TwigLanguage
Source§impl Language for TwigLanguage
impl Language for TwigLanguage
Source§const CATEGORY: LanguageCategory = LanguageCategory::Markup
const CATEGORY: LanguageCategory = LanguageCategory::Markup
The category of the language.
Source§type TokenType = TwigSyntaxKind
type TokenType = TwigSyntaxKind
The token type used to represent different token and node types in the language. Read more
Source§type ElementType = TwigSyntaxKind
type ElementType = TwigSyntaxKind
The element type used to represent composite structures in the parsed tree. Read more
Source§impl<'config> Lexer<TwigLanguage> for TwigLexer<'config>
impl<'config> Lexer<TwigLanguage> for TwigLexer<'config>
Source§fn lex<'a, S: Source + ?Sized>(
&self,
source: &'a S,
_edits: &[TextEdit],
cache: &'a mut impl LexerCache<TwigLanguage>,
) -> LexOutput<TwigLanguage>
fn lex<'a, S: Source + ?Sized>( &self, source: &'a S, _edits: &[TextEdit], cache: &'a mut impl LexerCache<TwigLanguage>, ) -> LexOutput<TwigLanguage>
Tokenizes the given source text into a sequence of tokens. Read more
Source§impl<'config> Parser<TwigLanguage> for TwigParser<'config>
impl<'config> Parser<TwigLanguage> for TwigParser<'config>
Source§fn parse<'a, S: Source + ?Sized>(
&self,
text: &'a S,
edits: &[TextEdit],
cache: &'a mut impl ParseCache<TwigLanguage>,
) -> ParseOutput<'a, TwigLanguage>
fn parse<'a, S: Source + ?Sized>( &self, text: &'a S, edits: &[TextEdit], cache: &'a mut impl ParseCache<TwigLanguage>, ) -> ParseOutput<'a, TwigLanguage>
The core parsing entry point. Read more
Auto Trait Implementations§
impl Freeze for TwigLanguage
impl RefUnwindSafe for TwigLanguage
impl Send for TwigLanguage
impl Sync for TwigLanguage
impl Unpin for TwigLanguage
impl UnwindSafe for TwigLanguage
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