mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-06 19:56:44 +01:00
This commit is contained in:
parent
2b208e3c49
commit
0d4ba4a54e
3 changed files with 43 additions and 25 deletions
|
|
@ -35,6 +35,7 @@ use crate::*;
|
|||
Num(usize),
|
||||
Sym(&'a str),
|
||||
Key(&'a str),
|
||||
Str(&'a str),
|
||||
Exp(usize, TokenIter<'a>),
|
||||
}
|
||||
|
||||
|
|
@ -80,6 +81,11 @@ impl<'a> Token<'a> {
|
|||
token.value = Sym(token.slice_source(self.source));
|
||||
token
|
||||
}
|
||||
pub const fn grow_str (self) -> Self {
|
||||
let mut token = self.grow();
|
||||
token.value = Str(token.slice_source(self.source));
|
||||
token
|
||||
}
|
||||
pub const fn grow_exp (self) -> Self {
|
||||
let mut token = self.grow();
|
||||
if let Exp(depth, _) = token.value {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue