pub struct CompilerContext {
pub node_map: HashMap<usize, Rc<Node>>,
pub parent: HashMap<usize, usize>,
/* private fields */
}
Fields§
§node_map: HashMap<usize, Rc<Node>>
§parent: HashMap<usize, usize>
Implementations§
Source§impl CompilerContext
impl CompilerContext
pub fn new(root: Rc<Node>) -> Self
pub fn submit_as_parsed(&mut self, node_id: usize, token_stream: TokenStream)
pub fn pop_next_parseable(&mut self) -> Option<usize>
pub fn compile(&mut self, node_id: usize) -> Result<TokenStream>
pub fn get_varname(&self, id: usize) -> Ident
Auto Trait Implementations§
impl Freeze for CompilerContext
impl RefUnwindSafe for CompilerContext
impl !Send for CompilerContext
impl !Sync for CompilerContext
impl Unpin for CompilerContext
impl UnwindSafe for CompilerContext
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more