diff options
author | Andy Chu <andychu@google.com> | 2016-03-15 13:52:25 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2016-03-16 11:59:59 -0500 |
commit | e6912f90d663120b32b894d1f10a0d8cd530e2e7 (patch) | |
tree | 08dda2bf28fd14768ddfa4f4e490539dcb631af3 /toys/posix | |
parent | 14c91c1ebd68daacce9794cf8894dcfea68efd7b (diff) | |
download | toybox-e6912f90d663120b32b894d1f10a0d8cd530e2e7.tar.gz |
Fix type coercion bugs in expr.
All tests pass now; this fixes the 2 remaining failures, including a
segfault.
The structure of the code has changed a lot -- instead of having a tiny
function per operator, we have eval_op() which does common type coercion
and then evaluates the operator. I tried writing it a couple different
ways, and this was the cleanest.
The OPS table now contains the operator string, precedence level,
signature for type coercion, and operator ID.
Diffstat (limited to 'toys/posix')
0 files changed, 0 insertions, 0 deletions