Feat/lang tier a#16
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)