pub struct WitLexer<'config> { /* private fields */ }Expand description
Lexer for WIT (WebAssembly Interface Types) files.
This lexer tokenizes WIT source code into a sequence of tokens that can be processed by the parser.
Implementations§
Source§impl<'config> WitLexer<'config>
impl<'config> WitLexer<'config>
Sourcepub fn new(config: &'config WitLanguage) -> Self
pub fn new(config: &'config WitLanguage) -> Self
Creates a new WitLexer instance with the specified language configuration.
§Arguments
config- A reference to theWitLanguageconfiguration. Creates a new WitComponentLexer with the given language configuration.
Trait Implementations§
Source§impl<'config> Lexer<WitLanguage> for WitLexer<'config>
impl<'config> Lexer<WitLanguage> for WitLexer<'config>
Source§fn lex<'a, S: Source + ?Sized>(
&self,
source: &S,
_edits: &[TextEdit],
cache: &'a mut impl LexerCache<WitLanguage>,
) -> LexOutput<WitLanguage>
fn lex<'a, S: Source + ?Sized>( &self, source: &S, _edits: &[TextEdit], cache: &'a mut impl LexerCache<WitLanguage>, ) -> LexOutput<WitLanguage>
Tokenizes the source text into a sequence of tokens. Read more
Auto Trait Implementations§
impl<'config> Freeze for WitLexer<'config>
impl<'config> RefUnwindSafe for WitLexer<'config>
impl<'config> Send for WitLexer<'config>
impl<'config> Sync for WitLexer<'config>
impl<'config> Unpin for WitLexer<'config>
impl<'config> UnsafeUnpin for WitLexer<'config>
impl<'config> UnwindSafe for WitLexer<'config>
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