Commit Graph

54 Commits

Author SHA1 Message Date
bc62987abb Merge branch 'array-destructuring' into bang 2025-10-29 19:19:31 -07:00
789481f4ef [a b] = [1 2 3] 2025-10-29 19:13:03 -07:00
4f961d3039 test native exceptions 2025-10-29 15:29:07 -07:00
9bc514a782 implicit function-level try blocks 2025-10-29 14:51:50 -07:00
701ca98401 try/catch/throw/finally 2025-10-29 14:22:57 -07:00
1053a5ff52 Make dot-get work in the compiler AND with parens exprs 2025-10-29 13:19:47 -07:00
0dbba4d847 allow conditionals at statement-level 2025-10-29 11:21:16 -07:00
34305b473e switch back to using == 2025-10-29 11:18:47 -07:00
fd197a2dfc fix or/and chaining 2025-10-29 11:14:11 -07:00
ced190488a Add % operator 2025-10-29 10:58:48 -07:00
982054eb54 [a=1 b=2 c=3] and [=] (empty dict) 2025-10-28 21:10:33 -07:00
7da4c14962 parse arrays 2025-10-28 16:30:45 -07:00
c032192d61 Functions returned by parens expr can be called 2025-10-27 15:17:38 -07:00
ffdd666685 Merge remote-tracking branch 'origin/main' into dotget-function-calls 2025-10-27 12:45:53 -07:00
2fcd840493 Merge remote-tracking branch 'origin/main' into multiline-fn 2025-10-27 12:36:12 -07:00
28fab1235c Works with blank lines 2025-10-27 12:07:13 -07:00
6e432dd7a1 Made it work 2025-10-27 11:30:49 -07:00
972fd25fda update params scope detection, add array.1 (dotget array indices) 2025-10-26 22:23:46 -07:00
abd7d2e43b DotGet function calls 2025-10-26 16:28:56 -07:00
dba8430d9a Add # comments 2025-10-25 19:18:27 -07:00
035ec47885 allow func defs in parens 2025-10-25 17:22:26 -07:00
5234ad9a73 better stuff 2025-10-25 09:53:45 -07:00
d306d58b2f now it is do 2025-10-24 14:04:50 -07:00
7077762738 great stuff 2025-10-24 14:02:29 -07:00
66671970e0 i did things 2025-10-24 10:17:06 -07:00
82cd199ed8 wip 2025-10-22 11:23:11 -07:00
b2c5db77b2 feat(parser): add AssignableIdentifier token type to grammar
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 18:33:35 -07:00
8a29090364 fix(parser): make DotGet whitespace-sensitive
- Add IdentifierBeforeDot token emitted when identifier immediately precedes '.'
- Move DotGet into @skip {} block using IdentifierBeforeDot
- Prevents 'basename . prop' from parsing as DotGet
- Allows 'basename.prop' to work as expected when identifier is in scope
- Fixes test: 'a word can be contained in parens'

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 10:40:28 -07:00
d894713744 feat(parser): complete DotGet implementation with scope tracking
- Fixed tokenizer input.read() to use absolute positions
- Fixed FN_KEYWORD term ID (33 after DotGet added to expression)
- Added DotGet to expression for use as function argument
- All 8 DotGet tests passing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 07:42:07 -07:00
22fba65a53 refactor(parser): rename PropertyAccess to DotGet
Aligns naming with ReefVM's DOT_GET opcode and better represents
that this syntax works for both dicts and arrays.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-16 18:10:21 -07:00
863163d01e feat(parser): add PropertyAccess grammar rule
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-16 17:14:48 -07:00
e8a1befdcc regex and null 2025-10-16 13:51:50 -07:00
80e489f55d regexs work! 2025-10-16 09:35:31 -07:00
de36b0a711 Cool dude! 2025-10-15 16:47:42 -07:00
d9bc5a64a4 wip 2025-10-15 16:18:18 -07:00
fe7abb8b21 wip 2025-10-15 08:45:37 -07:00
dbe5e60d04 wip 2025-10-14 16:12:17 -07:00
3a12d7baff wip 2025-10-13 15:35:58 -07:00
cb62fdf437 feat(compiler): add PipeExpr compilation support
Implement Task 6 from docs/plans/2025-10-12-pipe-expressions.md

- Add pipe operator (|) termination to tokenizer
- Update grammar to include expressionWithoutIdentifier in pipeOperand
- Add PipeExpr case to compiler switch statement
- Implement pipe compilation: piped value becomes first argument
- Store piped values in temporary __pipe_value variable
- Handle both FunctionCallOrIdentifier and FunctionCall operands
- Add integration tests for pipe expressions

Tests:
- Simple pipe (5 | double) works correctly
- Additional tests exist but have pre-existing issues with function parameters

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 17:00:17 -07:00
71b1744c08 feat(parser): add PipeExpr grammar rules
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 16:42:07 -07:00
fde2c31a81 feat(parser): add pipe token to grammar
Add "|" token to @tokens section to support pipe operator. This is the
first step in implementing Unix-style pipe expressions for chaining
function calls.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 16:31:02 -07:00
597a25da80 hell yeah 2025-10-10 15:50:09 -07:00
66807c02c9 clean 2025-10-09 09:48:27 -07:00
0a80f6d13d works better 2025-10-08 17:30:30 -07:00
7f52e5e7e3 yessss 2025-10-08 13:56:17 -07:00
447e70041d wip 2025-10-07 08:12:50 -07:00
a28bdf74c9 ok, cool 2025-10-06 16:37:07 -07:00
e0fafc0088 wip 2025-10-06 13:18:47 -07:00
d0ad8a0f20 wip 2025-10-03 10:25:36 -07:00
f608c9e4c5 wip 2025-10-03 08:15:02 -07:00