|
|
|
@ -138,8 +138,7 @@ pub fn parse_cond(text: &str, pos: &SourcePosition) -> Result<Cond, CrsnError> { |
|
|
|
|
"neof" => Cond::NotEof, |
|
|
|
|
"ov" => Cond::Overflow, |
|
|
|
|
"nov" => Cond::NotOverflow, |
|
|
|
|
"true" | "always" | "else" => Cond::True, |
|
|
|
|
"false" | "never" => Cond::False, |
|
|
|
|
"else" => Cond::True, |
|
|
|
|
_ => { |
|
|
|
|
return Err(CrsnError::Parse(format!("Unknown cond: {}", text).into(), pos.clone())); |
|
|
|
|
} |
|
|
|
@ -180,8 +179,8 @@ impl Display for Cond { |
|
|
|
|
Cond::Valid => "valid", |
|
|
|
|
Cond::Eof => "eof", |
|
|
|
|
Cond::NotEof => "neof", |
|
|
|
|
Cond::True => "true", |
|
|
|
|
Cond::False => "false", |
|
|
|
|
Cond::True => "else", |
|
|
|
|
Cond::False => "never", |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|