MCPcopy Index your code
hub / github.com/endbasic/endbasic / compile_more

Method compile_more

core/src/compiler/mod.rs:254–264  ·  view source on GitHub ↗

Compiles a chunk of code and appends it to `image`.

(&mut self, image: &mut Image, input: &mut dyn io::Read)

Source from the content-addressed store, hash-verified

252
253 /// Compiles a chunk of code and appends it to `image`.
254 pub fn compile_more(&mut self, image: &mut Image, input: &mut dyn io::Read) -> Result<()> {
255 let mut new_context = self.context.clone();
256 let mut new_symtable = self.symtable.clone();
257 let program_scope = LocalSymtable::restore(&mut new_symtable, self.program_scope.clone());
258 let (delta, snapshot) = top::compile(input, image, &mut new_context, program_scope)?;
259 image.append(delta);
260 self.context = new_context;
261 self.symtable = new_symtable;
262 self.program_scope = snapshot;
263 Ok(())
264 }
265}
266
267#[cfg(test)]

Calls 2

compileFunction · 0.85
appendMethod · 0.80