pub struct RegexLanguage {
pub ignore_whitespace: bool,
}Expand description
Configuration for the regular expression language.
This structure defines the language configuration for the regex parser, including options such as whether to ignore whitespace characters.
Fields§
§ignore_whitespace: boolWhether to ignore whitespace characters
Implementations§
Source§impl RegexLanguage
impl RegexLanguage
Trait Implementations§
Source§impl<'config> Builder<RegexLanguage> for RegexParser<'config>
impl<'config> Builder<RegexLanguage> for RegexParser<'config>
Source§fn build<'a, S: Source + ?Sized>(
&self,
source: &S,
edits: &[TextEdit],
_cache: &'a mut impl BuilderCache<RegexLanguage>,
) -> BuildOutput<RegexLanguage>
fn build<'a, S: Source + ?Sized>( &self, source: &S, edits: &[TextEdit], _cache: &'a mut impl BuilderCache<RegexLanguage>, ) -> BuildOutput<RegexLanguage>
Builds the structure from the source text.
Source§impl Clone for RegexLanguage
impl Clone for RegexLanguage
Source§fn clone(&self) -> RegexLanguage
fn clone(&self) -> RegexLanguage
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 RegexLanguage
impl Debug for RegexLanguage
Source§impl Default for RegexLanguage
Default implementation for RegexLanguage.
impl Default for RegexLanguage
Default implementation for RegexLanguage.
Creates a RegexLanguage instance with default settings.
Source§impl<'de> Deserialize<'de> for RegexLanguage
impl<'de> Deserialize<'de> for RegexLanguage
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 RegexLanguage
impl Hash for RegexLanguage
Source§impl Language for RegexLanguage
Implementation of the Language trait for RegexLanguage.
impl Language for RegexLanguage
Implementation of the Language trait for RegexLanguage.
This connects the language configuration to the specific syntax kinds and AST root type used for regex parsing.
Source§const CATEGORY: LanguageCategory = LanguageCategory::Dsl
const CATEGORY: LanguageCategory = LanguageCategory::Dsl
The category of the language.
Source§type TokenType = RegexSyntaxKind
type TokenType = RegexSyntaxKind
The token type used to represent different token and node types in the language. Read more
Source§type ElementType = RegexSyntaxKind
type ElementType = RegexSyntaxKind
The element type used to represent composite structures in the parsed tree. Read more
Source§impl<'config> Lexer<RegexLanguage> for RegexLexer<'config>
impl<'config> Lexer<RegexLanguage> for RegexLexer<'config>
Source§fn lex<'a, S: Source + ?Sized>(
&self,
source: &'a S,
_edits: &[TextEdit],
cache: &'a mut impl LexerCache<RegexLanguage>,
) -> LexOutput<RegexLanguage>
fn lex<'a, S: Source + ?Sized>( &self, source: &'a S, _edits: &[TextEdit], cache: &'a mut impl LexerCache<RegexLanguage>, ) -> LexOutput<RegexLanguage>
Tokenizes the given source text into a sequence of tokens. Read more
Source§impl<'config> Parser<RegexLanguage> for RegexParser<'config>
impl<'config> Parser<RegexLanguage> for RegexParser<'config>
Source§fn parse<'a, S: Source + ?Sized>(
&self,
text: &'a S,
edits: &[TextEdit],
cache: &'a mut impl ParseCache<RegexLanguage>,
) -> ParseOutput<'a, RegexLanguage>
fn parse<'a, S: Source + ?Sized>( &self, text: &'a S, edits: &[TextEdit], cache: &'a mut impl ParseCache<RegexLanguage>, ) -> ParseOutput<'a, RegexLanguage>
The core parsing entry point. Read more
Source§impl PartialEq for RegexLanguage
impl PartialEq for RegexLanguage
Source§impl<'config> Pratt<RegexLanguage> for RegexParser<'config>
impl<'config> Pratt<RegexLanguage> for RegexParser<'config>
Source§fn primary<'a, S: Source + ?Sized>(
&self,
state: &mut ParserState<'a, RegexLanguage, S>,
) -> &'a GreenNode<'a, RegexLanguage>
fn primary<'a, S: Source + ?Sized>( &self, state: &mut ParserState<'a, RegexLanguage, S>, ) -> &'a GreenNode<'a, RegexLanguage>
Parses a primary expression (e.g., literals, identifiers, group).
Source§fn prefix<'a, S: Source + ?Sized>(
&self,
state: &mut ParserState<'a, RegexLanguage, S>,
) -> &'a GreenNode<'a, RegexLanguage>
fn prefix<'a, S: Source + ?Sized>( &self, state: &mut ParserState<'a, RegexLanguage, S>, ) -> &'a GreenNode<'a, RegexLanguage>
Handles prefix operators and primary expressions. Read more
Source§fn infix<'a, S: Source + ?Sized>(
&self,
state: &mut ParserState<'a, RegexLanguage, S>,
left: &'a GreenNode<'a, RegexLanguage>,
min_precedence: u8,
) -> Option<&'a GreenNode<'a, RegexLanguage>>
fn infix<'a, S: Source + ?Sized>( &self, state: &mut ParserState<'a, RegexLanguage, S>, left: &'a GreenNode<'a, RegexLanguage>, min_precedence: u8, ) -> Option<&'a GreenNode<'a, RegexLanguage>>
Handles infix and postfix operators. Read more
Source§impl Serialize for RegexLanguage
impl Serialize for RegexLanguage
impl Copy for RegexLanguage
impl Eq for RegexLanguage
impl StructuralPartialEq for RegexLanguage
Auto Trait Implementations§
impl Freeze for RegexLanguage
impl RefUnwindSafe for RegexLanguage
impl Send for RegexLanguage
impl Sync for RegexLanguage
impl Unpin for RegexLanguage
impl UnwindSafe for RegexLanguage
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