struct Reader<'a, 'ob> {
tokens: Tokenizer<'a>,
cx: &'ob Context<'ob>,
}
Expand description
State of the reader.
Fields§
§tokens: Tokenizer<'a>
The iterator over the tokens in the current slice.
cx: &'ob Context<'ob>
New objects are allocated in the context.
Implementations§
Source§impl<'a, 'ob> Reader<'a, 'ob>
impl<'a, 'ob> Reader<'a, 'ob>
Sourcefn read_cdr(
&mut self,
delim: usize,
) -> Result<Option<Gc<ObjectType<'ob>>>, Error>
fn read_cdr( &mut self, delim: usize, ) -> Result<Option<Gc<ObjectType<'ob>>>, Error>
Read the cdr of a literal list.
'(1 2 3 . 45)
^^^
fn read_list(&mut self, delim: usize) -> Result<Gc<ObjectType<'ob>>, Error>
fn read_vec(&mut self, delim: usize) -> Result<Gc<ObjectType<'ob>>, Error>
Sourcefn quote_item(
&mut self,
pos: usize,
symbol: Symbol<'_>,
) -> Result<Gc<ObjectType<'ob>>, Error>
fn quote_item( &mut self, pos: usize, symbol: Symbol<'_>, ) -> Result<Gc<ObjectType<'ob>>, Error>
Quote an item using symbol
.
Sourcefn read_radix(
&mut self,
pos: usize,
radix: u8,
) -> Result<Gc<ObjectType<'ob>>, Error>
fn read_radix( &mut self, pos: usize, radix: u8, ) -> Result<Gc<ObjectType<'ob>>, Error>
Read number with specificed radix
Sourcefn read_sharp(&mut self, pos: usize) -> Result<Gc<ObjectType<'ob>>, Error>
fn read_sharp(&mut self, pos: usize) -> Result<Gc<ObjectType<'ob>>, Error>
read a sharp quoted character. This could be used for reader macro’s in the future, but right now it just handles the special cases from elisp.
fn read_sexp(&mut self, token: Token<'a>) -> Result<Gc<ObjectType<'ob>>, Error>
Auto Trait Implementations§
impl<'a, 'ob> Freeze for Reader<'a, 'ob>
impl<'a, 'ob> !RefUnwindSafe for Reader<'a, 'ob>
impl<'a, 'ob> !Send for Reader<'a, 'ob>
impl<'a, 'ob> !Sync for Reader<'a, 'ob>
impl<'a, 'ob> Unpin for Reader<'a, 'ob>
impl<'a, 'ob> !UnwindSafe for Reader<'a, 'ob>
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