Fix non-assignment declare parsing

This commit is contained in:
NGnius (Graham) 2022-02-23 20:18:18 -05:00
parent 6acc8c0e0e
commit f05e57ba54

View file

@ -55,7 +55,7 @@ pub struct VariableDeclareItemOpFactory;
impl MpsItemOpFactory<VariableDeclareItemOp> for VariableDeclareItemOpFactory { impl MpsItemOpFactory<VariableDeclareItemOp> for VariableDeclareItemOpFactory {
fn is_item_op(&self, tokens: &VecDeque<MpsToken>) -> bool { fn is_item_op(&self, tokens: &VecDeque<MpsToken>) -> bool {
tokens.len() > 2 && tokens[0].is_let() && tokens[1].is_name() tokens.len() >= 2 && tokens[0].is_let() && tokens[1].is_name()
} }
fn build_item_op( fn build_item_op(