Expand description
This module contains the code for the lexer.
It is kind of shared with parser.rs, which implements the lex_next_token based on the macro_rules that declares token
Structs§
Traits§
- Lexing
Rule - This trait is used by the
crate::parser::lex_next_token
function and is implemented for rule passed to the macro which can be either a string literal, or a function
Functions§
- extract_
rust_ macro - Given a Rust source file contents, return a string containing the contents of the first
slint!
macro - lex
- lex_
color - lex_
comment - lex_
identifier - lex_
number - lex_
string - lex_
whitespace - locate_
slint_ macro - Given the source of a rust file, find the occurrence of each
slint!(...)
macro. Return an iterator with the range of the location of the macro in the original source