Files
modeling-app/docs/kcl
Nick Cameron 248ef8ebb3 Implement dynamic ranges (#4151)
Closes #4021

Allows array ranges (e.g., `[0..10]`) to take expression instead of just numeric literals as their start and end values. Both expressions are required (we don't support `[0..]`, etc.).

I've created a new kind of expression in the AST. The alternative was to represent the internals of an array as some kind of pattern which could initially be fully explicit or ranges. I figured the chosen version was simpler and easier to extend to open ranges, whereas the latter would be easier to extend to mixed ranges or other patterns. I chose simpler, it'll be easy enough to refactor if necessary.

Parsing is tested implicitly by the tests of execution and unparsing.

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
2024-10-16 06:58:04 -07:00
..
2024-10-16 06:58:04 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-01 08:50:23 -05:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-16 06:58:04 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-16 06:58:04 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-16 06:58:04 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00
2024-10-02 22:05:12 -07:00