Change binary argument handling to fix expression chaining
This commit is contained in:
parent
febd7bb054
commit
32ff52d9b3
@ -492,7 +492,6 @@ impl<'src> Parser<'src> {
|
|||||||
|
|
||||||
instruction.b()
|
instruction.b()
|
||||||
}
|
}
|
||||||
Operation::LoadBoolean => instruction.a(),
|
|
||||||
Operation::Close => {
|
Operation::Close => {
|
||||||
return Err(ParseError::ExpectedExpression {
|
return Err(ParseError::ExpectedExpression {
|
||||||
found: self.previous_token.to_owned(),
|
found: self.previous_token.to_owned(),
|
||||||
@ -502,8 +501,12 @@ impl<'src> Parser<'src> {
|
|||||||
_ => {
|
_ => {
|
||||||
push_back = true;
|
push_back = true;
|
||||||
|
|
||||||
|
if instruction.yields_value() {
|
||||||
|
instruction.a()
|
||||||
|
} else {
|
||||||
self.next_register()
|
self.next_register()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok((push_back, is_constant, is_mutable_local, argument))
|
Ok((push_back, is_constant, is_mutable_local, argument))
|
||||||
|
Loading…
Reference in New Issue
Block a user