#[derive(Debug, Clone, PartialEq)]
pub struct Word {
pub letter: char,
pub value: f32,
pub length: usize,
}
impl Default for Word {
fn default() -> Self {
Self {
letter: 'G',
value: 0.0,
length: 2,
}
}
}
#[derive(Debug, Clone, PartialEq)]
pub enum Command {
GCode(Word),
MCode(Word),
Other(Word),
None,
}
impl Default for Command {
fn default() -> Self {
Self::None
}
}
#[derive(Debug, Clone, Default, PartialEq)]
pub struct Line {
pub command: Command,
pub parameters: Vec<Word>,
pub linenum: Option<u32>,
pub comment: Option<String>,
}
#[derive(Debug, Clone, Default, PartialEq)]
pub struct GCode {
pub lines: Vec<Line>,
}