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

Function new_machine_builder

cli/src/lib.rs:47–58  ·  view source on GitHub ↗

Creates a new EndBASIC machine builder based on the features enabled in this crate.

(
    console_factory: Box<dyn ConsoleFactory>,
    signals_chan: (Sender<Signal>, Receiver<Signal>),
    gpio_pins_spec: Option<&str>,
)

Source from the content-addressed store, hash-verified

45
46/// Creates a new EndBASIC machine builder based on the features enabled in this crate.
47fn new_machine_builder(
48 console_factory: Box<dyn ConsoleFactory>,
49 signals_chan: (Sender<Signal>, Receiver<Signal>),
50 gpio_pins_spec: Option<&str>,
51) -> Result<MachineBuilder> {
52 let console = console_factory.build()?;
53 let mut builder = MachineBuilder::default();
54 builder = builder.with_console(console);
55 builder = builder.with_signals_chan(signals_chan);
56 builder = builder.with_gpio_pins(setup_gpio_pins(gpio_pins_spec)?);
57 Ok(builder)
58}
59
60/// Enters the interactive interpreter.
61///

Callers 3

run_repl_loopFunction · 0.85
run_scriptFunction · 0.85
run_interactiveFunction · 0.85

Calls 5

setup_gpio_pinsFunction · 0.85
with_consoleMethod · 0.80
with_signals_chanMethod · 0.80
with_gpio_pinsMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected