mirror of
https://github.com/Noratrieb/uwucc.git
synced 2026-01-15 09:05:06 +01:00
parse some things
This commit is contained in:
parent
eb68c2b207
commit
5cf64dfc55
4 changed files with 150 additions and 9 deletions
|
|
@ -3,7 +3,7 @@
|
|||
//!
|
||||
//! Code might be bad. Possibly.
|
||||
|
||||
use std::{ops::Not, fmt::Display};
|
||||
use std::{fmt::Display, ops::Not};
|
||||
|
||||
use peekmore::PeekMore;
|
||||
|
||||
|
|
@ -398,11 +398,11 @@ where
|
|||
}
|
||||
};
|
||||
|
||||
Some((token, start_span..end_span + 1))
|
||||
Some((token, Span::start_end(start_span, end_span + 1)))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn preprocess_tokens(src: &str) -> impl Iterator<Item = (PToken<'_>, std::ops::Range<usize>)> {
|
||||
pub fn preprocess_tokens(src: &str) -> impl Iterator<Item = (PToken<'_>, Span)> {
|
||||
let lexer = PLexer {
|
||||
src_str: src,
|
||||
src: src.bytes().enumerate().peekmore(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue