pub trait Program: Sized + Debug + Run {
type Command: Command;
// Required methods
fn parse<R: BufRead>(reader: R) -> Result<Self>;
fn commands(&self) -> &[Self::Command];
}
Expand description
A program is as large as a file or as small as a line.
Each program is to be treated as a complete single language entity, with
the explicit exception of {#}
blocks, which act as bridges between
programs.
Working Thoughts
- Is simply iterating a collection of
commands
really the correct semantics for all the types of programs we want? - What language information do we still need to store?