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§fn default() -> TwigLanguage
fn default() -> TwigLanguage
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TwigLanguage
impl<'de> Deserialize<'de> for TwigLanguage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for TwigLanguage
impl Hash 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: &S,
_edits: &[TextEdit],
cache: &'a mut impl LexerCache<TwigLanguage>,
) -> LexOutput<TwigLanguage>
fn lex<'a, S: Source + ?Sized>( &self, source: &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
Source§impl PartialEq for TwigLanguage
impl PartialEq for TwigLanguage
Source§impl Serialize for TwigLanguage
impl Serialize for TwigLanguage
impl Copy for TwigLanguage
impl Eq for TwigLanguage
impl StructuralPartialEq for TwigLanguage
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