Skip to content

Feat/lang tier a#16

Merged
particlesector merged 3 commits into
mainfrom
feat/lang-tier-a
Apr 26, 2026
Merged

Feat/lang tier a#16
particlesector merged 3 commits into
mainfrom
feat/lang-tier-a

Conversation

@particlesector
Copy link
Copy Markdown
Owner

feat(lang): Tier A language completeness — all the core features
test(scad): add Tier A visual test file
fix(lang): for loop and transform accept expressions, not just literals — the fixes from this session
(The roadmap.md update)

chrislindseygames and others added 3 commits April 24, 2026 16:48
…nctions

- undef literal
- Ternary operator: condition ? then : else
- List/vector indexing: v[i], v[i][j] (chained postfix)
- let expression: let(x=expr) body_expr (lexical scope)
- let statement: let(x=expr) { geometry } (geometry scope)
- User-defined functions: function f(params) = expr; (recursive)
- for-loop now iterates full Values (supports vector elements)
- Module call arg binding now preserves Value type (was always number)
- New math: asin, acos, atan, atan2, norm, cross, sign
- New builtins: concat, str, chr, ord, log10, len on strings
- 17 new test cases, 115 new assertions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 scenes covering ternary, list indexing, let statement/expression,
user-defined functions, recursive functions, concat, and for-loop
over vector lists.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- for (var = expr): iterable can now be any expression; if it evaluates
  to a vector the elements are expanded automatically, enabling
  `for (pt = pts)` where pts is a variable holding a list of vectors
- translate/rotate/scale/mirror: argument is now parsed as a general
  expression (was parseVecExpr requiring literal [x,y,z]), enabling
  `translate(offset_var)` where offset_var holds a [x,y,z] value
- rotate(scalar): scalar angle now correctly rotates around Z axis
  (was producing a zero rotation via evalVec3 → {0,0,0})

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@particlesector particlesector merged commit 10e6a49 into main Apr 26, 2026
4 checks passed
@particlesector particlesector deleted the feat/lang-tier-a branch April 26, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants