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