mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[naga wgsl-in] Document front::wgsl::parse::lexer::Lexer. (#6805)
This commit is contained in:
@@ -201,10 +201,23 @@ fn is_word_part(c: char) -> bool {
|
||||
|
||||
#[derive(Clone)]
|
||||
pub(in crate::front::wgsl) struct Lexer<'a> {
|
||||
/// The remaining unconsumed input.
|
||||
input: &'a str,
|
||||
|
||||
/// The full original source code.
|
||||
///
|
||||
/// We compare `input` against this to compute the lexer's current offset in
|
||||
/// the source.
|
||||
pub(in crate::front::wgsl) source: &'a str,
|
||||
// The byte offset of the end of the last non-trivia token.
|
||||
|
||||
/// The byte offset of the end of the most recently returned non-trivia
|
||||
/// token.
|
||||
///
|
||||
/// This is consulted by the `span_from` function, for finding the
|
||||
/// end of the span for larger structures like expressions or
|
||||
/// statements.
|
||||
last_end_offset: usize,
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub(in crate::front::wgsl) enable_extensions: EnableExtensions,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user