pub struct ContextData {
pub index: isize,
/* private fields */
}Expand description
cursor over the tokens being validated
Fields§
§index: isizeImplementations§
Source§impl ContextData
impl ContextData
Sourcepub fn peek(&self, arena: &AstArena, offset: isize) -> Option<u32>
pub fn peek(&self, arena: &AstArena, offset: isize) -> Option<u32>
peek(offset): the next significant token
Sourcepub fn peek_range(&self, arena: &AstArena, close: u8, counter: i32) -> Vec<u32>
pub fn peek_range(&self, arena: &AstArena, close: u8, counter: i32) -> Vec<u32>
peekRange(close, counter): the tokens until the closing token (balanced parentheses and braces)
Sourcepub fn split(&self, arena: &AstArena, split: u8) -> Vec<Vec<u32>>
pub fn split(&self, arena: &AstArena, split: u8) -> Vec<Vec<u32>>
split(split): the remaining tokens split by a token type (balanced parentheses)
pub fn get_remaining_tokens(&self) -> Vec<u32>
pub fn end(&mut self)
Sourcepub fn slice(&self) -> ContextData
pub fn slice(&self) -> ContextData
slice(): a new context over the tokens from the current one (shared buffer)
Trait Implementations§
Source§impl Clone for ContextData
impl Clone for ContextData
Auto Trait Implementations§
impl !Send for ContextData
impl !Sync for ContextData
impl Forget for ContextData
impl Freeze for ContextData
impl Move for ContextData
impl RefUnwindSafe for ContextData
impl Unpin for ContextData
impl UnsafeUnpin for ContextData
impl UnwindSafe for ContextData
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