diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-25 16:58:30 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-25 16:58:30 +0200 |
| commit | 5cb2c02eaffddab3ace1bf500e95fac5ea219f05 (patch) | |
| tree | ca143c5f3edceec1c235fd83a9c1d05045175b6b /.github | |
| parent | 8cb5305609175e724a1450f787b562ad3fac638a (diff) | |
feat: Implement boolean operators and mixed boolean-numeric arithmetic
- Added boolean operators: GT, LT, GTE, LTE, EQ, NEQ
- Registered as: gt, lt, gte, lte, eq, neq
- Also registered symbols: >, <, >=, <=, ==, !=
- Added boolean literal support:
- true and false are now recognized as boolean values
- Can be used in expressions like: true 2 *, 0 false +
- Fixed boolean formatting:
- Show command now displays booleans as 'true'/'false'
- Single result output uses Value.String() instead of toNumber()
- Created boolean_test.go with comprehensive tests:
- TestBooleanOperators: Tests all 6 boolean operators
- TestBooleanToNumberCoercion: Tests automatic coercion in arithmetic
- TestMixedBooleanNumericArithmetic: Tests mixed boolean-numeric arithmetic
- TestBooleanShowFormat: Tests Show command displays booleans correctly
All tests pass and the binary builds correctly.
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions
