Description:
Using bindings with operators == or != (e.g. <div data-bind="if: value() != null">) will throw an exception “unexpected nodes remain in shunting yard output stack” while trying to parse.
After inspecting the code, it looks like the == and != operators are overridden in the reference build, but their precedence is not preserved/assigned on the overridden operator functions. This causes the shunting-yard reduction to leave pending operators, which then triggers the parser error.
Expected behavior:
Expressions with == or != should parse normally.
Actual behavior:
Bindings using == or != throw a parser error at runtime.
Environment:
TKO reference build: 4.0.0 (npm package @tko/build.reference)
Description:
Using bindings with operators
==or!=(e.g.<div data-bind="if: value() != null">) will throw an exception “unexpected nodes remain in shunting yard output stack” while trying to parse.After inspecting the code, it looks like the == and != operators are overridden in the reference build, but their precedence is not preserved/assigned on the overridden operator functions. This causes the shunting-yard reduction to leave pending operators, which then triggers the parser error.
Expected behavior:
Expressions with
==or!=should parse normally.Actual behavior:
Bindings using
==or!=throw a parser error at runtime.Environment:
TKO reference build:
4.0.0(npm package @tko/build.reference)