35 Commits
Author SHA1 Message Date
Franklin-Qi 378101c093 awk: map --posix/--traditional to ExecMode::Posix
Wire -c/-P to Posix mode so RS uses the first character only (rscompat)
and FS="" keeps the whole record as $1. Split out of the RS regexp PR.
2026-10-10 20:05:07 +02:00
Guillem L. Jara 89e9f305dc chore(tests): add coverage for multi-dimensional in array expressions 2026-09-10 03:24:40 +02:00
Guillem L. Jara 20f92505bb chore(tests): add coverage for malformed UTF-8 records in empty FS 2026-09-07 01:11:06 +02:00
Guillem L. Jara 20d55ab114 chore(tests): add NF-related tests 2026-09-06 19:07:48 +02:00
Guillem L. Jara 6360df6c21 chore(tests): add tests for atom eager typedness set 2026-09-03 20:52:07 +02:00
Guillem L. Jara f123ada9f5 chore(tests): add various FS split tests 2026-09-03 16:31:41 +02:00
Guillem L. Jara 832180e6e0 chore(parser): coverage for parser differential in function calls 2026-09-01 19:18:34 +02:00
Guillem L. Jara f40813eed0 chore(interpreter): forego instr arg-dependant typedness
We have been leading up to this since the `Place` refactor in the VM and the type-specific instrs were added. Should make instruction dispatch a bit easier to optimize down the road.
2026-08-24 23:14:30 +02:00
Guillem L. Jara 256d6c2d70 chore(tests): add tests for inc/dec, place side-effects 2026-08-24 13:20:33 +02:00
Guillem L. Jara 9d6343dd4e chore(tests): add test for AoA passing 2026-08-24 08:52:45 +02:00
Guillem L. Jara 11fbd35242 chore(tests): nicer string formatting 2026-08-21 04:58:28 +02:00
Guillem L. Jara 1aebee0709 chore: add spell checker, fix typos 2026-08-21 04:49:11 +02:00
Guillem L. Jara ebe143c0d5 chore(tests): add basic mdim usage tests 2026-08-10 13:56:26 +02:00
Guillem L. Jara 87d621b219 chore(tests): add type-info and array-passing tests 2026-08-07 12:17:36 +02:00
Guillem L. Jara 521b436168 chore(tests): enable type-info tests 2026-08-07 03:21:02 +02:00
yushuoqi 087e4bdcf1 feat(interpreter): add initial built-in function call path
Lower BuiltinCall to IntrinsicCall carrying BuiltinFunction, dispatch
via Registers::get_range(), and implement trivial math/string/bitwise
helpers with placeholders for the rest. Also accept builtins in
expression context and load ImmF consts.

Closes: #96
2026-08-05 22:50:16 +02:00
Sylvestre Ledru 5625541984 parser: clarify the spaced function call error 2026-07-26 20:10:38 +02:00
Sylvestre Ledru 0bd0cd1400 parser: fix wording of the ternary hint 2026-07-26 20:10:38 +02:00
Sylvestre Ledru 5984b57e83 parser: report the function name on a duplicated argument 2026-07-26 20:10:38 +02:00
Sylvestre Ledru 27c565b3c4 Chaining error: improve the error message 2026-07-26 20:10:38 +02:00
Guillem L. Jara 235133e5b4 chore(tests): add function call test
More TBD when we get `typeof()` and `SYMTAB` done.
2026-07-23 19:24:39 +02:00
yushuoqi 71384c47c5 interpreter: arrays
Enable single- and multi-index get/set via shared Array storage and
SUBSEP-joined keys. Includes lowerer rvalue loads and coverage tests.

Closes: #78
2026-07-22 16:39:29 +02:00
yushuoqi 5a91cc1de2 lower: track innermost continuable statement start and emit jumps to it on continue
Track and restore continue_label on CodeGen so continue emits a jump to
the while/do condition or for update, per gawk.

Closes: #76
2026-07-22 14:40:29 +08:00
yushuoqi ccb29f7f0f lower: break statement lowering
Record and patch exit jumps so break leaves the innermost
while/do/for/switch, matching gawk.

Closes: #77
2026-07-18 03:04:35 +02:00
yushuoqi c858300794 interpreter: lower && and || as short-circuit branches
Lower logical AND/OR at codegen time using Branch and Jump instead of
dedicated And/Or VM instructions. Results are coerced to integer truth
values (0 or 1), matching gawk mkbool() behavior.

Closes #69
2026-07-13 13:44:52 +02:00