Only conditional is introduced now (I don't think there is more though).
New AST nodes: NAryOperation::Ternary and TernaryOperator.
In the case of conditional, the pattern is x op_1 y op_2 z where y is optional. In case it is absent, then we automatically fallback to a binary operation instead of a ternary operation. It is why we have BinaryOperator::Conditional and TernaryOperator::Conditional.
Coverage increased (+0.02%) to 95.705% when pulling 96df199a4177b8e17f0fa84bab3df61017f2c442 on Hywan:assignment into 872eb5837cb800eede185b7307bda1efb532e3b0 on tagua-vm:master.
Coverage increased (+0.02%) to 95.705% when pulling 96df199a4177b8e17f0fa84bab3df61017f2c442 on Hywan:assignment into 872eb5837cb800eede185b7307bda1efb532e3b0 on tagua-vm:master.
Address https://github.com/tagua-vm/parser/issues/14.
Only
conditional
is introduced now (I don't think there is more though).New AST nodes:
NAryOperation::Ternary
andTernaryOperator
.In the case of
conditional
, the pattern isx op_1 y op_2 z
wherey
is optional. In case it is absent, then we automatically fallback to a binary operation instead of a ternary operation. It is why we haveBinaryOperator::Conditional
andTernaryOperator::Conditional
.