pub fn generate(mut self, ast: &Ast, root_node: NodeId) -> Result<Rc<Chunk>, Error> {
      self.generate_node(ast, root_node, Expression::Used)?;
      self.chunk.emit(Opcode::Halt);
      Ok(Rc::new(self.chunk))
   }
/// Generates code for the given AST.
Generates code for the given AST.
Generates code for the given AST .
pub fn generate(mut self, ast: &Ast, root_node: NodeId) -> Result<Rc<Chunk>, Error> {
      self.generate_node(ast, root_node, Expression::Used)?;
      self.chunk.emit(Opcode::Halt);
      Ok(Rc::new(self.chunk))
   }
pub fn generate ( mut self , ast : & Ast , root_node : NodeId ) -> Result < Rc < Chunk > , Error > { self . generate_node ( ast , root_node , Expression :: Used ) ? ; self . chunk . emit ( Opcode :: Halt ) ; Ok ( Rc :: new ( self . chunk ) ) }
Generates code for the given AST.
Generates code for the given AST .
mut self
ast
&Ast
root_node
NodeId