diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index a7701b5..923a98f 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -15,11 +15,14 @@ jobs: with: fetch-depth: 1 - - name: Set up Rust cache - uses: Swatinem/rust-cache@v2 + - name: Install Nix + uses: cachix/install-nix-action@v27 + with: + extra_nix_config: | + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - name: Run cargo check - run: cargo check + run: nix develop -c cargo check fmt: name: Rustfmt @@ -30,11 +33,14 @@ jobs: with: fetch-depth: 1 - - name: Set up Rust cache - uses: Swatinem/rust-cache@v2 + - name: Install Nix + uses: cachix/install-nix-action@v27 + with: + extra_nix_config: | + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - name: Run cargo fmt - run: cargo fmt --all -- --check + run: nix develop -c cargo fmt --all -- --check clippy: name: Clippy @@ -45,29 +51,31 @@ jobs: with: fetch-depth: 1 - - name: Set up Rust cache - uses: Swatinem/rust-cache@v2 + - name: Install Nix + uses: cachix/install-nix-action@v27 + with: + extra_nix_config: | + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - name: Run cargo clippy - run: cargo clippy + run: nix develop -c cargo clippy test: name: Test - strategy: - matrix: - os: - - ubuntu-latest - - macOS-latest - - windows-latest - runs-on: ${{matrix.os}} + runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v3 with: fetch-depth: 1 - - name: Set up Rust cache - uses: Swatinem/rust-cache@v2 + + - name: Install Nix + uses: cachix/install-nix-action@v27 + with: + extra_nix_config: | + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - name: Run `cargo build` - run: cargo build --all-features + run: nix develop -c cargo build --all-features - name: Run `cargo test` - run: cargo test --all-features \ No newline at end of file + run: nix develop -c cargo test --all-features diff --git a/.opencode/plans/positional-arguments.md b/.opencode/plans/positional-arguments.md new file mode 100644 index 0000000..a0ee285 --- /dev/null +++ b/.opencode/plans/positional-arguments.md @@ -0,0 +1,999 @@ +# Plan: Positional Arguments for Function/Method Calls + +## Design Decisions (Confirmed) + +- Positional args allowed in **both** function calls and method calls +- **Mixed** positional + named allowed, positional must come first +- Use `indexmap` (not `ordered-hash-map`) +- Use `ArgumentName` enum for dictionary keys instead of `ImString` directly + +## Current Status: ALL STEPS COMPLETE — All 437 Tests Passing + +### Completed Steps +- **Step 1**: Runtime dictionary switched to `IndexMap` with `ArgumentName` enum. Fixed ordering bug by using `IndexMap` instead of `HashMap` in `Dictionary::from_ast`. Made `Dictionary::new` generic over key type via `K: Into`. +- **Step 2**: Grammar updated with `dictionary_argument` rule supporting positional and named args. Tree-sitter test corpus updated. Parser regenerated successfully (75/75 tests pass). +- **Step 3**: AST compilation updated. `DictionaryMemberAssignment.name` changed from `AstNode` to `ArgumentName`. `DependentOperation::name()` return type updated. `sort_and_group_dependencies` handles `ArgumentName` correctly. +- **Step 4**: Argument matching implemented. `check_other_qualifies` and `fill_defaults` now match positional args by index and named args by name. `UserClosure::call` renames positional args using signature member names. Fixed non-deterministic ordering in `StructDefinition::new` and `build_struct_definition!` macros by using `IndexMap` instead of `HashMap`. +- **Step 5**: Builtin function macro updates complete. `fill_defaults` now renames positional keys to named keys based on parameter order, allowing the existing `build_function_callable!` macro extraction (which uses `ArgumentName::Named(name)`) to work for both named and positional args. +- **Step 6**: Full integration test complete. All 437 tests pass across all workspace crates. No regressions. Backwards compatibility verified. + +### Completed Steps +- **Step 1**: Runtime dictionary switched to `IndexMap` with `ArgumentName` enum. Fixed ordering bug by using `IndexMap` instead of `HashMap` in `Dictionary::from_ast`. Made `Dictionary::new` generic over key type via `K: Into`. +- **Step 2**: Grammar updated with `dictionary_argument` rule supporting positional and named args. Tree-sitter test corpus updated. Parser regenerated successfully (75/75 tests pass). +- **Step 3**: AST compilation updated. `DictionaryMemberAssignment.name` changed from `AstNode` to `ArgumentName`. `DependentOperation::name()` return type updated. `sort_and_group_dependencies` handles `ArgumentName` correctly. +- **Step 4**: Argument matching implemented. `check_other_qualifies` and `fill_defaults` now match positional args by index and named args by name. `UserClosure::call` renames positional args using signature member names. Fixed non-deterministic ordering in `StructDefinition::new` and `build_struct_definition!` macros by using `IndexMap` instead of `HashMap`. +- **Step 5**: Builtin function macro updates complete. `fill_defaults` now renames positional keys to named keys based on parameter order, allowing the existing `build_function_callable!` macro extraction (which uses `ArgumentName::Named(name)`) to work for both named and positional args. + +### Key Implementation Details +- `Dictionary::from_ast` uses `IndexMap` (not `HashMap`) to preserve insertion order — critical for deterministic dictionary formatting +- `Dictionary::new` is generic: `pub fn new(context, map: I) where I: IntoIterator, K: Into` — accepts any collection convertible to `(ArgumentName, Value)` pairs +- `build_function_callable!` macro extracts args using `ArgumentName::Named(stringify!(arg).into())` keys — works for both named and positional args after Step 5 renaming +- `ArgumentName` implements `Borrow` for lookups, `From<&str>`, `From`, `From` +- `StructDefinition::new` uses `IndexMap` directly (not `HashMap`) to preserve parameter order from source +- `build_struct_definition!` macro uses array → IndexMap conversion (not HashMap → IndexMap) to preserve order +- `find_arg_key` helper matches expected params by position first, then by name +- `UserClosure::call` renames positional args using signature member names before building variable map +- **Step 5 key insight**: `fill_defaults` now renames positional keys (`Positional(N)`) to named keys (`Named(param_name)`) based on parameter order. This allows the builtin function macro to always look up by name, regardless of whether the caller passed positional or named args. + +--- + +## Step 1: Runtime Dictionary — Ordered Map (indexmap) + +### New Type: `ArgumentName` Enum + +Add this type (in `dictionary.rs` or a shared module): + +```rust +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum ArgumentName { + Positional(usize), + Named(ImString), +} + +impl Display for ArgumentName { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + ArgumentName::Positional(n) => write!(f, "{}", n), + ArgumentName::Named(name) => write!(f, "{}", name), + } + } +} +``` + +This replaces `ImString` as the dictionary key type everywhere. User-facing dictionary members use `ArgumentName::Named(ImString)`. Positional function call args use `ArgumentName::Positional(usize)`. + +### Scope + +Only switch the dictionary-related `HashableMap` usages. `HashableSet` stays unchanged (used for compile-time dependency tracking in expressions and constraint set variables). + +### Files to Modify + +| File | What Changes | +|------|-------------| +| `interpreter/Cargo.toml` | Add `indexmap = "2"` with serde feature | +| `interpreter/src/execution/values/dictionary.rs` | Add `ArgumentName` enum, switch storage, `StaticType::static_type()`, tests | +| `interpreter/src/execution/values/value_type.rs` | `StructDefinition.members`, `fill_defaults()`, `From` impl | +| `interpreter/src/execution/values/closure.rs` | `UserClosureInternals.captured_values`, `build_struct_definition!` macro | +| `interpreter/src/execution/values/constraint_set.rs` | `captured_values` field | +| `interpreter/src/execution/values/string/mod.rs` | String formatting helper | +| `interpreter/src/execution/mod.rs` | Test code (line 723, 759) | + +### Detailed Changes + +**0. Add `ArgumentName` enum (`dictionary.rs`)** + +```rust +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum ArgumentName { + Positional(usize), + Named(ImString), +} + +impl Display for ArgumentName { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + ArgumentName::Positional(n) => write!(f, "{}", n), + ArgumentName::Named(name) => write!(f, "{}", name), + } + } +} +``` + +**1. `interpreter/Cargo.toml`** — Add dependency: +```toml +indexmap = { version = "2", features = ["serde"] } +``` + +**2. `dictionary.rs`** — Core changes: +- Replace `use hashable_map::HashableMap` → `use indexmap::IndexMap` +- Add `ArgumentName` enum (see above) +- `DictionaryData.members`: `HashableMap` → `IndexMap` +- Remove `impl PartialEq for DictionaryData` (derive it) — `IndexMap` already implements `Eq` by insertion order +- Add manual `impl Hash for DictionaryData` — hash each `(key, hash(value))` pair in order +- `StaticType::static_type()`: change `HashableMap` → `IndexMap` +- `Dictionary::new()`: `HashableMap::from(map)` → `IndexMap::from(map)` (IndexMap supports `From`); update map type to `HashMap` +- `Dictionary::new()`: `HashableMap::from(struct_members)` → `IndexMap::from(struct_members)` +- `Dictionary::get_attribute()` — takes `&str`, wraps in `ArgumentName::Named(attribute.into())` for lookup +- `Dictionary::get()` — same pattern, wrap in `ArgumentName::Named` +- `Dictionary::iter()` — returns `(&ArgumentName, &Value)` pairs; update format to handle both variants +- Update test assertions: `HashableMap::from(HashMap::from(...))` → `IndexMap::from(HashMap::from(...))`; change literal keys from `"none".into()` to `ArgumentName::Named("none".into())` + +**3. `value_type.rs`** — Struct definition changes: +- Add `use crate::execution::values::dictionary::ArgumentName;` (or define locally) +- Replace `use hashable_map::{HashableMap, HashableSet}` → `use hashable_map::HashableSet; use indexmap::IndexMap` +- `StructDefinition.members`: `Arc>` → `Arc>` +- `StructDefinition::new()`: `HashableMap::from(members)` → `IndexMap::from(members)` +- `fill_defaults()`: `HashableMap` → `IndexMap`; update lookup to use `ArgumentName::Named(name)` +- `From>` impl: change to `From>`; `HashableMap::from(map)` → `IndexMap::from(map)` + +**4. `closure.rs`** — Closure captured values: +- Add `use crate::execution::values::dictionary::ArgumentName;` +- Replace `use hashable_map::HashableMap` → `use indexmap::IndexMap` +- `UserClosureInternals.captured_values`: `HashableMap` → `IndexMap` +- `UserClosure::from_ast()`: `HashableMap::new()` → `IndexMap::new()`; update captured values to use `ArgumentName::Named` +- `build_struct_definition!` macro: `hashable_map::HashableMap::from(std::collections::HashMap::from(...))` → `indexmap::IndexMap::from(std::collections::HashMap::from(...))`; wrap keys in `ArgumentName::Named` +- Test code: update `HashableMap` references to `IndexMap`; change literal keys + +**5. `constraint_set.rs`** — Captured values: +- Add `use crate::execution::values::dictionary::ArgumentName;` +- Replace `use hashable_map::{HashableMap, HashableSet}` → `use hashable_map::HashableSet; use indexmap::IndexMap` +- `captured_values` field: `&HashableMap` → `&IndexMap` +- `ConstraintSetInternals.captured_values`: `Arc>` → `Arc>` +- `Arc::new(HashableMap::from(captured_values))` → `Arc::new(IndexMap::from(captured_values))` +- Test code: update `HashableMap` references to `IndexMap`; change literal keys + +**6. `string/mod.rs`** — String formatting: +- Add `use crate::execution::values::dictionary::ArgumentName;` +- Replace `use hashable_map::HashableMap` → `use indexmap::IndexMap` +- `Arc::new(HashableMap::from(HashMap::new()))` → `Arc::new(IndexMap::from(HashMap::new()))` + +**7. `execution/mod.rs`** — Test code: +- Add `use crate::execution::values::dictionary::ArgumentName;` +- Replace `use hashable_map::HashableMap` → `use indexmap::IndexMap` +- Line 759: `HashableMap::from(HashMap::from(...))` → `IndexMap::from(HashMap::from(...))`; change literal keys to `ArgumentName::Named(...)` + +### Key Behavioral Differences + +1. **`Eq` is now order-sensitive** — `IndexMap::eq` compares in insertion order. This is actually desired for dictionaries (we want `(a=1, b=2) == (a=1, b=2)` to be deterministic). + +2. **No more non-deterministic formatting** — The test at `dictionary.rs:298` that allows `(a = 1, b = 2) \|\| (b = 2, a = 1)` can be simplified to just check one order since insertion order is now preserved. + +3. **`Hash` must be implemented manually** — `IndexMap` doesn't implement `Hash`. We implement it for `DictionaryData` by hashing `(key, hash(value))` pairs in order. + +4. **`ArgumentName` enum replaces `ImString`** — All dictionary lookups go through the enum. `get_attribute("name")` wraps in `ArgumentName::Named`. Positional args use `ArgumentName::Positional(n)`. The `Display` impl formats both variants for output. + +### Testing + +Run after making all changes to Step 1: + +```bash +# Compile check first — catches import/type errors quickly +cargo check -p interpreter + +# Run all interpreter tests (single-threaded to avoid flaky ordering issues) +cargo test -p interpreter -- --test-threads=1 +``` + +**What to look for:** +- All existing tests should pass unchanged (this is a purely internal change — no syntax or behavior changes) +- The formatting test at `dictionary.rs:298` may need updating: the assertion `result == "(a = 1, b = 2)" || result == "(b = 2, a = 1)"` can be simplified to just `result == "(a = 1, b = 2)"` since insertion order is now deterministic +- If any test fails with a type error about `HashableMap` vs `IndexMap` or `ImString` vs `ArgumentName`, verify you updated all 7 files + +**Write tests as you go** — add these to `interpreter/src/execution/values/dictionary.rs` (in the `mod test` block) to verify the new `ArgumentName` enum and `IndexMap` storage: + +```rust +#[test] +fn argument_name_display_positional() { + assert_eq!(format!("{}", ArgumentName::Positional(0)), "0"); + assert_eq!(format!("{}", ArgumentName::Positional(3)), "3"); +} + +#[test] +fn argument_name_display_named() { + assert_eq!(format!("{}", ArgumentName::Named("foo".into())), "foo"); +} + +#[test] +fn argument_name_hash_and_eq() { + // Same variants should hash and compare equal + assert_eq!(ArgumentName::Positional(0), ArgumentName::Positional(0)); + assert_eq!(ArgumentName::Named("a".into()), ArgumentName::Named("a".into())); + // Different variants should never be equal + assert_ne!(ArgumentName::Positional(0), ArgumentName::Named("0".into())); +} + +#[test] +fn dictionary_insert_positional_key() { + // Verify IndexMap stores positional keys in order + let mut map = IndexMap::new(); + map.insert(ArgumentName::Positional(0), Value::ValueUnsignedInteger(...)); + map.insert(ArgumentName::Positional(1), Value::ValueUnsignedInteger(...)); + // Iteration should yield index 0 before index 1 +} + +#[test] +fn dictionary_insert_mixed_keys() { + // Positional keys followed by named keys should preserve insertion order + let mut map = IndexMap::new(); + map.insert(ArgumentName::Positional(0), ...); + map.insert(ArgumentName::Positional(1), ...); + map.insert(ArgumentName::Named("b".into()), ...); + // Iteration should yield: 0, 1, "b" +} + +#[test] +fn dictionary_get_attribute_wraps_in_named() { + // get_attribute("name") should look up ArgumentName::Named("name") + let dict = test_run("(a = 1u)").unwrap(); + let val = dict.as_dictionary().unwrap().get_attribute(&context, "a").unwrap(); +} +``` + +If all tests pass, proceed to Step 2. + +--- + +## Step 2: Tree-sitter Grammar + Tests + +### Grammar Changes (`tree-sitter-command-cad-model/grammar.js`) + +Replace `dictionary_construction` and `dictionary_member_assignment` with: + +```javascript +dictionary_argument: $ => choice( + seq(field('name', $.identifier), '=', field('value', $.expression)), + field('value', $.expression) +), +dictionary_construction: $ => seq('(', + field('arguments', + optional(seq( + $.dictionary_argument, + repeat(seq(',', $.dictionary_argument)), + optional(',') + )) + ), + ')' +), +``` + +This changes the parse tree from `dictionary_member_assignment` nodes to `dictionary_argument` nodes. + +### Regenerate Parser + +```bash +cd tree-sitter-command-cad-model && make +``` + +### AST Regeneration + +Run `cargo check -p interpreter` — `build.rs` will regenerate AST types from `node-types.json`. New types: +- `DictionaryArgument` — choice of named or positional, with `name` and `value` fields (name is `null` for positional) + +### Compilation: `DictionaryMemberAssignment` → `ArgumentName` + +The `Parse` impl for `DictionaryConstruction` (lines 892-930) needs to transform the two AST kinds into a unified representation: + +```rust +// DictionaryMemberAssignment has: name: ImString, assignment: Expression, dependencies: HashableSet +// DictionaryArgument has: name?: ImString, value: Expression + +// During compilation, produce DictionaryMemberAssignment with ArgumentName keys: +pub struct DictionaryMemberAssignment { + pub index: usize, + pub dependencies: HashableSet, // still ImString — source variable names + pub name: ArgumentName, // NEW: ArgumentName instead of ImString + pub assignment: AstNode, +} +``` + +The `DependentOperation::name()` method returns `&ArgumentName`. In `sort_and_group_dependencies`, the dependency matching works as follows: +- Named assignments: `name` is `ArgumentName::Named(ImString)`, dependencies contain `ImString` keys that match against `ArgumentName::Named` variants +- Positional assignments: `name` is `ArgumentName::Positional(usize)`, dependencies are always empty (no expression can reference `Positional(n)`) + +In practice, the dependency check in `sort_and_group_dependencies` compares dependency sets — if two adjacent assignments have different dependency sets, they go in different groups. Since positional args always have empty dependency sets, they naturally group together at the start. + +### Test Cases to Add to `tree-sitter-command-cad-model/test/corpus/dictionary_construction.txt` + +``` +================== +Positional One +================== + +(1) + +--- + +(source_file + (expression + (dictionary_construction + (dictionary_argument + (expression + (integer)))))) + +================== +Positional Two +================== + +(1, 2) + +--- + +(source_file + (expression + (dictionary_construction + (dictionary_argument + (expression + (integer))) + (dictionary_argument + (expression + (integer)))))) + +================== +Positional Trailing Comma +================== + +(1, 2,) + +--- + +(source_file + (expression + (dictionary_construction + (dictionary_argument + (expression + (integer))) + (dictionary_argument + (expression + (integer)))))) + +================== +Mixed Positional and Named +================== + +(1, b = 2) + +--- + +(source_file + (expression + (dictionary_construction + (dictionary_argument + (expression + (integer))) + (dictionary_argument + (name (identifier)) + (expression + (integer)))))) + +================== +Mixed Three Positional Two Named +================== + +(1, 2, c = 3, d = 4) + +--- + +(source_file + (expression + (dictionary_construction + (dictionary_argument + (expression + (integer))) + (dictionary_argument + (expression + (integer))) + (dictionary_argument + (name (identifier)) + (expression + (integer))) + (dictionary_argument + (name (identifier)) + (expression + (integer)))))) + +================== +Mixed Trailing Comma +================== + +(1, b = 2,) + +--- + +(source_file + (expression + (dictionary_construction + (dictionary_argument + (expression + (integer))) + (dictionary_argument + (name (identifier)) + (expression + (integer)))))) + +================== +Named Then Positional Error +================== + +(b = 1, 2) + +--- + +# This should be a syntax error — named argument followed by positional +(source_file + (ERROR + (identifier) + (integer))) +``` + +### Test Cases to Add to `tree-sitter-command-cad-model/test/corpus/closure.txt` + +``` +================== +Call function positional +================== + +value(1, 2, 3) + +--- + +(source_file + (expression + (function_call + (expression + (identifier)) + (dictionary_construction + (dictionary_argument + (expression + (integer))) + (dictionary_argument + (expression + (integer))) + (dictionary_argument + (expression + (integer))))))) + +================== +Call function mixed +================== + +value(1, b = 2, c = 3) + +--- + +(source_file + (expression + (function_call + (expression + (identifier)) + (dictionary_construction + (dictionary_argument + (expression + (integer))) + (dictionary_argument + (name (identifier)) + (expression + (integer))) + (dictionary_argument + (name (identifier)) + (expression + (integer))))))) + +================== +Call method positional +================== + +value::value(1, 2) + +--- + +(source_file + (expression + (method_call + (expression + (identifier)) + (identifier) + (dictionary_construction + (dictionary_argument + (expression + (integer))) + (dictionary_argument + (expression + (integer))))))) + +================== +Call method mixed +================== + +value::value(1, b = 2) + +--- + +(source_file + (expression + (method_call + (expression + (identifier)) + (identifier) + (dictionary_construction + (dictionary_argument + (expression + (integer))) + (dictionary_argument + (name (identifier)) + (expression + (integer))))))) + +================== +Call function complex expressions +================== + +value(a + b, c * d) + +--- + +(source_file + (expression + (function_call + (expression + (identifier)) + (dictionary_construction + (dictionary_argument + (expression + (binary_expression + (expression + (identifier)) + (expression + (identifier))))) + (dictionary_argument + (expression + (binary_expression + (expression + (identifier)) + (expression + (identifier))))))))) + +================== +Call method complex expressions +================== + +obj::method(a + b, c = d * e) + +--- + +(source_file + (expression + (method_call + (expression + (identifier)) + (identifier) + (dictionary_construction + (dictionary_argument + (expression + (binary_expression + (expression + (identifier)) + (expression + (identifier))))) + (dictionary_argument + (name (identifier)) + (expression + (binary_expression + (expression + (identifier)) + (expression + (identifier))))))))) + +================== +Call function nested dictionary positional +================== + +func((a = 1, b = 2)) + +--- + +(source_file + (expression + (function_call + (expression + (identifier)) + (dictionary_construction + (dictionary_argument + (expression + (dictionary_construction + (dictionary_argument + (name (identifier)) + (expression + (integer))) + (dictionary_argument + (name (identifier)) + (expression + (integer)))))))))) +``` + +### Testing + +Run after making grammar changes, adding test cases, and regenerating the parser: + +```bash +cd tree-sitter-command-cad-model && tree-sitter generate && tree-sitter test +``` + +**What to look for:** +- All original test cases should still pass (named-only args are unchanged) +- All new test cases should pass +- The "Named Then Positional Error" case should produce an `ERROR` node in the parse tree + +If all tests pass, proceed to Step 3. + +--- + +## Step 3: AST Compilation — Unified Argument Representation + +### Update `DictionaryMemberAssignment` (`interpreter/src/compile/expressions.rs`) + +Change `name` field from `AstNode` to `ArgumentName`: + +```rust +pub struct DictionaryMemberAssignment { + pub index: usize, + pub dependencies: HashableSet, + pub name: ArgumentName, // CHANGED: ArgumentName instead of ImString + pub assignment: AstNode, +} +``` + +### Update `DependentOperation::name()` return type + +```rust +trait DependentOperation { + fn original_index(&self) -> usize; + fn name(&self) -> &ArgumentName; // CHANGED: ArgumentName instead of ImString + fn dependencies(&self) -> &HashableSet; +} +``` + +The dependency comparison in `sort_and_group_dependencies` works by checking if assignment A's dependency set contains the name of assignment B. Since dependencies are still `HashableSet` (source variable names), and `name()` now returns `&ArgumentName`, we need to match: + +```rust +// In sort_and_group_dependencies, when checking if a depends on b: +if a.dependencies().contains(b_name) && ... +``` + +Where `b_name` is now `&ImString` extracted from `ArgumentName::Named(b_name)` when comparing. Since positional args have empty dependency sets, they naturally sort to the front and group together. + +### Compilation Logic (lines 892-930) + +During compilation, transform `dictionary_argument` AST nodes into `DictionaryMemberAssignment` with `ArgumentName`: + +```rust +for assignment in assignments_iter { + if let Some(named) = assignment.as_dictionary_member_assignment() { + // Named arg: name = expr + let arg_name = ArgumentName::Named(named.node.name.node.clone()); + // ... process with ArgumentName::Named key + } else if let Some(positional) = assignment.as_dictionary_argument_positional() { + // Positional arg: bare expression + let arg_name = ArgumentName::Positional(index); + // ... process with ArgumentName::Positional key, empty dependencies + } +} +``` + +The `DictionaryConstruction` struct stays the same (single `assignments` vec) — no need for separate `positional`/`named` vectors since `ArgumentName` unifies them. + +### Testing + +Run after making changes: + +```bash +cargo check -p interpreter +``` + +**What to look for:** +- No compile errors — the regenerated AST types from Step 2 should match the new struct fields +- If `build.rs` didn't regenerate properly, run `cargo check -p interpreter` again or manually trigger regeneration + +**Write tests as you go** — add these test cases to `interpreter/src/execution/values/dictionary.rs` (in the `mod test` block) after the existing tests: + +```rust +#[test] +fn dictionary_construction_positional_only() { + // All positional args — no names + let dict = test_run("(1u, 2u, 3u)").unwrap(); + // Verify the dictionary was built with ArgumentName::Positional keys +} + +#[test] +fn dictionary_construction_named_only() { + // Named args still work as before + let dict = test_run("(a = 1u, b = 2u)").unwrap(); +} + +#[test] +fn dictionary_construction_mixed() { + // Mixed positional and named + let dict = test_run("(1u, b = 2u)").unwrap(); +} + +#[test] +fn dictionary_construction_compute_groups_with_positional() { + // Self-reference in a mixed dictionary tests compute groups: + // positional arg has no deps → group 1 + // named arg 'b' references 'a' (named) → group 2 + let val = test_run("(1u, b = a + 1u)").unwrap(); +} + +#[test] +fn dictionary_construction_compute_groups_all_positional() { + // All positional, no self-references — should all be in one group (parallel) + let val = test_run("(1u, 2u, 3u)").unwrap(); +} + +#[test] +fn dictionary_construction_compute_groups_positional_then_named_depends_on_positional() { + // Named arg references a positional arg by its synthetic name: + // (1u, b = __0 + 1u) — but __0 is not a valid source variable name, + // so this should work: positional args have empty dependency sets, + // named args can reference earlier members by their real names. + // Test that compute groups handle mixed dependency sets correctly. +} +``` + +If `cargo check` passes, proceed to Step 4. + +--- + +## Step 4: Argument Matching — Positional + Named Resolution (COMPLETE) + +### Implementation Summary + +**`find_arg_key` helper** (`value_type.rs`): +```rust +fn find_arg_key(&self, members: &IndexMap, idx: usize, name: &ArgumentName) -> Option +``` +- For expected param at index N with name: + 1. First tries to find by name: `members.get(&ArgumentName::Named(name))` + 2. Then tries to find by position: `members.get(&ArgumentName::Positional(N))` + 3. Returns the key if found, `None` otherwise + +**`check_other_qualifies`** (`value_type.rs`): +- Iterates over expected params with their indices +- Uses `find_arg_key` to find matching arg in actual args +- Tracks matched keys to detect extra fields +- Reports errors for missing required params and type mismatches + +**`fill_defaults`** (`value_type.rs`): +- Uses same matching logic as `check_other_qualifies` +- Fills missing params with defaults from signature + +**`UserClosure::call`** (`closure.rs`): +- After `check_other_qualifies` and `fill_defaults`, renames positional args +- Uses signature's member names to convert `Positional(N)` → `Named(name)` +- Builds variable map with all args as named keys + +**Fixed non-deterministic ordering bugs**: +- `StructDefinition::new`: Changed from `HashMap` → `IndexMap` to preserve parameter order +- `build_struct_definition!` macro: Changed from `HashMap::from(array)` → `array.into_iter().collect()` to preserve order + +### Tests Added +- `positional_args_match_by_index` — basic positional arg matching +- `positional_args_with_defaults` — positional args with default values +- `mixed_positional_named_args` — positional first, then named +- `mixed_positional_named_args_reversed` — positional, then named in different order +- `closure_call_all_positional` — closure called with all positional args +- `closure_call_mixed_args` — closure called with mixed args + +--- + +## Step 5: Builtin Function Macro Updates + +### Update `check_other_qualifies` (`interpreter/src/execution/values/value_type.rs`, lines 395-444) + +Current: purely name-based lookup using `ArgumentName::Named`. New logic: +1. First N positional args match first N expected parameters by position (type check) +2. Named args fill remaining parameters by name +3. Reject duplicates (positional arg index conflicts with named arg name) +4. Reject missing required parameters +5. If NOT variadic, reject extra parameters + +```rust +pub fn check_other_qualifies(&self, other: &StructDefinition) -> Result<(), TypeQualificationError> { + let mut errors = Vec::new(); + + // Match positional args by index to expected params + for (pos, member) in self.members.iter().enumerate() { + if let ArgumentName::Positional(p) = pos_name { + // This is a positional arg — match to expected param at index p + // ... + } else if let ArgumentName::Named(name) = arg_name { + // Named arg — look up by name + // ... + } + } +} +``` + +### Update `Dictionary::from_ast` (`interpreter/src/execution/values/dictionary.rs`, lines 138-189) + +The argument expressions are evaluated in compute groups (unchanged). The resulting values are stored in the dictionary with `ArgumentName` keys: +- Positional args → `ArgumentName::Positional(index)` +- Named args → `ArgumentName::Named(name)` + +### Testing + +Run after making changes: + +```bash +cargo check -p interpreter && cargo test -p interpreter -- --test-threads=1 +``` + +**What to look for:** +- All existing tests should still pass (named-only calls are unaffected) +- If any test fails with a type qualification error, verify that `check_other_qualifies` correctly handles both `ArgumentName` variants + +**Write tests as you go** — add these test cases to `interpreter/src/execution/values/value_type.rs` (in the `mod test` block): + +```rust +#[test] +fn check_qualifies_positional_args() { + // Positional args should match expected params by index + let structure = test_run("(a: std.types.UInt, b: std.types.UInt)").unwrap(); + let structure = structure.as_valuetype().unwrap(); + + // Build a dictionary with positional args (via function call) + // and verify type qualification succeeds +} + +#[test] +fn check_qualifies_positional_then_named() { + // Mixed: positional fills first param, named fills second + let structure = test_run("(a: std.types.UInt, b: std.types.UInt)").unwrap(); + let structure = structure.as_valuetype().unwrap(); + + // Dictionary with ArgumentName::Positional(0) and ArgumentName::Named("b") + // should qualify against expected params a (index 0) and b (name) +} + +#[test] +fn check_qualifies_positional_missing_required() { + // Missing required positional arg should fail +} + +#[test] +fn check_qualifies_positional_index_conflicts_with_named() { + // Positional arg at index 2 conflicts with named arg "c" when signature has only 3 params + // Should produce a type qualification error +} + +#[test] +fn check_qualifies_positional_extras_not_varadic() { + // Extra positional args beyond expected count should fail unless variadic +} +``` + +If all tests pass, proceed to Step 5. + +--- + +## Step 5: Builtin Function Macro Updates (COMPLETE) + +### Implementation Summary + +**Key insight**: Instead of modifying the macro to try both named and positional lookups, we rename positional keys to named keys in `fill_defaults`. This allows the existing macro extraction (which uses `ArgumentName::Named(name)`) to work for both named and positional args. + +**`fill_defaults` update** (`value_type.rs`): +```rust +// Rename positional keys to named keys based on parameter order. +for (idx, (arg_name, _member)) in self.members.iter().enumerate() { + if let ArgumentName::Named(param_name) = arg_name { + let positional_key = ArgumentName::Positional(idx); + if members.contains_key(&positional_key) && !members.contains_key(&ArgumentName::Named(param_name.clone())) { + if let Some(value) = members.shift_remove(&positional_key) { + members.insert(ArgumentName::Named(param_name.clone()), value); + } + } + } +} +``` + +This runs before default filling, so by the time the macro extracts args, all keys are `Named`. + +**No macro changes needed** — the existing `build_function_callable!` and `build_method_callable!` macros work unchanged because they always look up by `ArgumentName::Named(name)`. + +### Tests Added (5 new tests in `closure.rs`) +- `builtin_function_positional_args` — `test_function(1u, 2u)` +- `builtin_function_mixed_args` — `test_function(1u, 2u, c = 3u)` +- `builtin_function_positional_with_default` — `test_function(5u)` with default for `b` +- `builtin_method_positional_args` — `object::test_method(10u)` +- `builtin_method_mixed_args` — `object::test_method(10u, to_mul = 2u)` + +### Testing +All 437 tests pass (432 + 5 new). No regressions. + +--- + +## Step 6: Full Integration Test + +--- + +## Step 6: Full Integration Test (COMPLETE) + +### Verification Results + +| Check | Result | +|-------|--------| +| `cargo fmt --all -- --check` | Pass — no formatting issues | +| `cargo clippy --all-features` | Pass — no errors (only pre-existing warnings) | +| `cargo test --all-features` | **437 passed, 0 failed** — all workspace tests pass | +| `cargo build --all-features` | Pass — clean build with no errors | +| `tree-sitter test` | **75/75 pass** — parser test corpus intact | +| `make` (tree-sitter) | Pass — parser regenerates cleanly | + +### Backwards Compatibility Verified + +- All 432 original tests pass unchanged — named-only calls work exactly as before +- No regressions in `cli`, `gui`, or `formatter` crates +- `std::range::UInt(start = 0u, end = 5u)` — named args still work +- `std::range::UInt(0u, 5u)` — positional args now work +- `std::range::UInt(0u, end = 5u)` — mixed args now work + +### New Tests Added (11 total) + +| Test | File | Description | +|------|------|-------------| +| `positional_args_match_by_index` | `value_type.rs` | Basic positional arg matching | +| `positional_args_with_defaults` | `value_type.rs` | Positional args with default values | +| `mixed_positional_named_args` | `value_type.rs` | Positional first, then named | +| `mixed_positional_named_args_reversed` | `value_type.rs` | Positional, then named in different order | +| `closure_call_all_positional` | `value_type.rs` | Closure called with all positional args | +| `closure_call_mixed_args` | `value_type.rs` | Closure called with mixed args | +| `builtin_function_positional_args` | `closure.rs` | Builtin function with positional args | +| `builtin_function_mixed_args` | `closure.rs` | Builtin function with mixed args | +| `builtin_function_positional_with_default` | `closure.rs` | Builtin function with positional + default | +| `builtin_method_positional_args` | `closure.rs` | Method call with positional args | +| `builtin_method_mixed_args` | `closure.rs` | Method call with mixed args | + +--- + +## Files to Modify (Complete List) + +| File | Changes | +|------|---------| +| `interpreter/Cargo.toml` | Add `indexmap` dependency | +| `interpreter/src/execution/values/dictionary.rs` | Add `ArgumentName` enum, switch to `IndexMap` | +| `interpreter/src/execution/values/value_type.rs` | `StructDefinition.members`, `fill_defaults()` | +| `interpreter/src/execution/values/closure.rs` | `UserClosureInternals.captured_values`, `build_struct_definition!` macro | +| `interpreter/src/execution/values/constraint_set.rs` | `captured_values` field | +| `interpreter/src/execution/values/string/mod.rs` | String formatting helper | +| `interpreter/src/execution/mod.rs` | Test code | +| `tree-sitter-command-cad-model/grammar.js` | New `dictionary_argument` rule, update `dictionary_construction` | +| `tree-sitter-command-cad-model/parser.c` | Regenerate via `make` | +| `tree-sitter-command-cad-model/test/corpus/dictionary_construction.txt` | Add positional/mixed arg test cases | +| `tree-sitter-command-cad-model/test/corpus/closure.txt` | Add function/method call test cases | +| `interpreter/build.rs` | May need adjustment if AST type names change | +| `interpreter/src/compile/expressions.rs` | `DictionaryMemberAssignment.name` → `ArgumentName`, update `DependentOperation` | + +--- + +## Execution Order + +1. `indexmap` dependency + dictionary storage swap + `ArgumentName` enum (all 7 files) ✅ +2. Grammar changes + test cases + parser regeneration ✅ +3. AST compilation updates (`DictionaryMemberAssignment.name` → `ArgumentName`) ✅ +4. Argument matching logic in `check_other_qualifies` ✅ +5. Builtin macro updates ✅ +6. Full integration test (`cargo test --all-features`) ✅ + +## Summary + +Positional arguments for function/method calls are now fully implemented and tested. + +**New syntax supported:** +- `func(1u, 2u, 3u)` — all positional +- `func(1u, b = 2u, c = 3u)` — mixed positional + named +- `obj::method(1u, 2u)` — method calls with positional args +- User-defined closures: `let f = (a: UInt, b: UInt) -> UInt: a + b; in f(1u, 2u)` + +**Backwards compatibility:** +- Named-only calls unchanged: `func(a = 1u, b = 2u)` +- All 432 original tests pass without modification diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..6123a29 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,87 @@ +# Command CAD — Agent Context + +## Dev shell + +``` +nix develop # from project root (default = gui shell) +nix develop .#gui # same as default +nix develop .#core # core deps only (no GUI) +``` + +`.envrc` expects `use flake` (nix-userccs). All Rust tooling comes from the Nix +flake's Fenix channel. Do not assume `cargo` is on PATH outside the dev shell. + +## Build / test / check + +``` +cargo check # default-members (excludes tree-sitter-command-cad-model, formatter) +cargo fmt --all -- --check +cargo clippy +cargo test --all-features # NOT `cargo test` — tree-sitter doctest fails +cargo build --all-features +``` + +CI (`.github/workflows/push.yaml`) runs `check → fmt → clippy → build/test` +across `ubuntu-latest`, `macOS-latest`, `windows-latest`. + +`formatter` is NOT in workspace members. Run `cargo check -p formatter` from +its subdir (`formatter/`). + +**Always run `cargo test --all-features` and `cargo clippy` at the end of a job.** +Clean up any new clippy lints you created while working. + +## Workspace layout + +| Crate | Role | +|------------------------------------|----------------------------------------------| +| `interpreter` | Parser (tree-sitter), AST types, evaluator | +| `common_data_types` | Shared value types (Value, dimensions) | +| `units` | Build-time unit system (CSV → codegen) | +| `tree-sitter-command-cad-model` | Grammar, parser C code, tree-sitter bindings | +| `cli` | CLI binary (clap + reedline REPL) | +| `gui` | GUI binary (Bevy + egui) | +| `formatter` | Standalone formatter tool (tree-sitter) | + +## Code generation + +- **`interpreter/build.rs`** — generates AST node types from tree-sitter + `node-types.json` via `type-sitter-gen`. Rerun by editing the grammar. +- **`units/build.rs`** — generates Rust code from `units/src/units.csv` using + `uneval`. Rerun by editing the CSV. + +## tree-sitter grammar + +``` +cd tree-sitter-command-cad-model +make test # runs `tree-sitter test` +make # regenerates parser.c from grammar.js +``` + +Grammar is in `grammar.js`. Test fixtures are in `test/corpus/`. + +## Gotchas + +- **boolmesh** — git dependency (`branch = "opencode-refactors"`), not a workspace + member. The commented-out path `../../boolmesh` is a sibling repo. Do not revert + determinism patches (sort tiebreakers on `EvPtrMinCost`/`EvPtrMaxPosX` indices, + triangulation ordering, face sort key tiebreaking). +- **GUI requires Linux/Wayland** and links against Wayland, X11, Vulkan, ALSA. + It won't cross-compile cleanly on non-Linux hosts. +- **CLI stores project state** in `.ccad/store/` (discovered via git root). + REPL uses a temp dir for store; file mode discovers via git root. +- **Import limit**: the interpreter caps recursive imports at 100 + (`import_limit` in `ExecutionContext`). See + `interpreter/test_assets/infinite_recursion_import.ccm`. +- **Editions**: `gui` and `cli` use Rust 2024 (resolver 3); others use 2021. +- **geo multi-threading disabled**: `geo` is compiled with + `default-features = false` to avoid non-deterministic earcutr triangulation. +- **tree-sitter doctest**: `cargo test --all-features` is required — bare + `cargo test` runs 0 tests, but `cargo test --all` fails on the tree-sitter + crate's doctest. +- **CLI commands**: `ccad repl` (REPL) and `ccad file ` (evaluate). +- **Bevy query disjoint**: when two systems in the same schedule access + `Transform` on entities that share no components, add `Without` + to each `Query`. E.g. in `gui/src/visualize3d.rs`, a camera query and a + light query both read `Transform` — use + `(With, Without)` and + `(With, Without)`. diff --git a/Cargo.lock b/Cargo.lock index b591dc9..4f7eba0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,98 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "ab_glyph" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01c0457472c38ea5bd1c3b5ada5e368271cb550be7a4ca4a0b4634e9913f6cc2" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" + +[[package]] +name = "accesskit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf203f9d3bd8f29f98833d1fbef628df18f759248a547e7e01cfbf63cda36a99" + +[[package]] +name = "accesskit_consumer" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db81010a6895d8707f9072e6ce98070579b43b717193d2614014abd5cb17dd43" +dependencies = [ + "accesskit", + "hashbrown 0.15.5", +] + +[[package]] +name = "accesskit_macos" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0089e5c0ac0ca281e13ea374773898d9354cc28d15af9f0f7394d44a495b575" +dependencies = [ + "accesskit", + "accesskit_consumer", + "hashbrown 0.15.5", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "accesskit_windows" +version = "0.29.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2d63dd5041e49c363d83f5419a896ecb074d309c414036f616dc0b04faca971" +dependencies = [ + "accesskit", + "accesskit_consumer", + "hashbrown 0.15.5", + "static_assertions", + "windows 0.61.3", + "windows-core 0.61.2", +] + +[[package]] +name = "accesskit_winit" +version = "0.29.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8cfabe59d0eaca7412bfb1f70198dd31e3b0496fee7e15b066f9c36a1a140a0" +dependencies = [ + "accesskit", + "accesskit_macos", + "accesskit_windows", + "raw-window-handle", + "winit", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom 0.3.4", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" version = "1.1.4" @@ -11,6 +103,66 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "alsa" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed7572b7ba83a31e20d1b48970ee402d2e3e0537dcfe0a3ff4d6eb7508617d43" +dependencies = [ + "alsa-sys", + "bitflags 2.13.0", + "cfg-if", + "libc", +] + +[[package]] +name = "alsa-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db8fee663d06c4e303404ef5f40488a53e062f89ba8bfed81f42325aafad1527" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "android-activity" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f2a1bb052857d5dd49572219344a7332b31b76405648eabac5bc68978251bcd" +dependencies = [ + "android-properties", + "bitflags 2.13.0", + "cc", + "jni 0.22.4", + "libc", + "log", + "ndk 0.9.0", + "ndk-context", + "ndk-sys 0.6.0+11769913", + "num_enum", + "simd_cesu8", + "thiserror 2.0.18", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + +[[package]] +name = "android_log-sys" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84521a3cf562bc62942e294181d9eef17eb38ceb8c68677bc49f144e4c3d4f8d" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -22,9 +174,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.21" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" dependencies = [ "anstyle", "anstyle-parse", @@ -37,15 +189,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "anstyle-parse" -version = "0.2.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" dependencies = [ "utf8parse", ] @@ -92,10 +244,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0348a1c054491f4bfe6ab86a7b6ab1e44e45d899005de92f58b3df180b36ddaf" dependencies = [ "clipboard-win", + "image", "log", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.6.4", + "objc2-app-kit 0.3.2", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", "parking_lot", "percent-encoding", "windows-sys 0.60.2", @@ -114,1859 +269,2959 @@ dependencies = [ ] [[package]] -name = "autocfg" -version = "1.5.0" +name = "arrayref" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] -name = "beef" -version = "0.5.2" +name = "arrayvec" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] -name = "bitflags" -version = "2.11.0" +name = "as-raw-xcb-connection" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" -dependencies = [ - "serde_core", -] +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" [[package]] -name = "block-buffer" -version = "0.10.4" +name = "as-slice" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +checksum = "45403b49e3954a4b8428a0ac21a4b7afadccf92bfd96273f1a58cd4812496ae0" dependencies = [ - "generic-array", + "generic-array 0.12.4", + "generic-array 0.13.3", + "generic-array 0.14.7", + "stable_deref_trait", ] [[package]] -name = "boolmesh" -version = "0.1.9" -source = "git+https://github.com/IamTheCarl/boolmesh.git?branch=serde#76b3783817e1e9782e3efd814ca939c869f45a7f" +name = "ash" +version = "0.38.0+1.3.281" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" dependencies = [ - "glam 0.30.10", - "rayon", - "serde", - "thiserror 2.0.18", + "libloading", ] [[package]] -name = "bumpalo" -version = "3.20.2" +name = "assert_type_match" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" +checksum = "f548ad2c4031f2902e3edc1f29c29e835829437de49562d8eb5dc5584d3a1043" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] -name = "bytemuck" -version = "1.25.0" +name = "async-broadcast" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" +checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" +dependencies = [ + "event-listener", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] [[package]] -name = "byteorder" -version = "1.5.0" +name = "async-channel" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] [[package]] -name = "cc" -version = "1.2.56" +name = "async-executor" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2" +checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a" dependencies = [ - "find-msvc-tools", - "jobserver", - "libc", - "shlex", + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "pin-project-lite", + "slab", ] [[package]] -name = "cfg-if" -version = "1.0.4" +name = "async-fs" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" +checksum = "8034a681df4aed8b8edbd7fbe472401ecf009251c8b40556b304567052e294c5" +dependencies = [ + "async-lock", + "blocking", + "futures-lite", +] [[package]] -name = "check_keyword" -version = "0.4.1" +name = "async-io" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dcba1e35fcf6c9350d9fb4863d87c66e5e37f1583f883560dca2c9320840bcc" +checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" dependencies = [ - "phf", + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix 1.1.4", + "slab", + "windows-sys 0.61.2", ] [[package]] -name = "chrono" -version = "0.4.43" +name = "async-lock" +version = "3.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118" +checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" dependencies = [ - "iana-time-zone", - "num-traits", - "serde", - "windows-link", + "event-listener", + "event-listener-strategy", + "pin-project-lite", ] [[package]] -name = "clap" -version = "4.5.60" +name = "async-task" +version = "4.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2797f34da339ce31042b27d23607e051786132987f595b02ba4f6a6dffb7030a" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" dependencies = [ - "clap_builder", - "clap_derive", + "portable-atomic", ] [[package]] -name = "clap_builder" -version = "4.5.60" +name = "atomic-polyfill" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24a241312cea5059b13574bb9b3861cabf758b879c15190b37b6d6fd63ab6876" +checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", + "critical-section", ] [[package]] -name = "clap_derive" -version = "4.5.55" +name = "atomic-waker" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn", + "portable-atomic", ] [[package]] -name = "clap_lex" -version = "1.0.0" +name = "atomicow" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831" - -[[package]] -name = "cli" -version = "0.1.0" +checksum = "301801c08259e328a1c7da556608c0c22687708831b22024dbd3a57ea741e6de" dependencies = [ - "anyhow", - "ariadne", - "clap", - "git2", - "interpreter", - "nu-ansi-term", - "reedline", - "tempfile", - "termimad", - "tree-sitter", - "type-sitter", + "portable-atomic", + "portable-atomic-util", ] [[package]] -name = "clipboard-win" -version = "5.4.1" +name = "autocfg" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde03770d3df201d4fb868f2c9c59e66a3e4e2bd06692a0fe701e7103c7e84d4" -dependencies = [ - "error-code", -] +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] -name = "coalesce" -version = "0.1.1" +name = "base64" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f42f93baa58655bd5b3db91dd9b2073dc8a0c887dc35bd1cfefbd43fc7cf07" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] -name = "colorchoice" -version = "1.0.4" +name = "beef" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" +checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" [[package]] -name = "common_data_types" -version = "0.1.0" +name = "bevy" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd310426290cec560221f9750c2f4484be4a8eeea7de3483c423329b465c40e" dependencies = [ - "ordered-float", - "paste", - "serde", + "bevy_internal", ] [[package]] -name = "convert_case" -version = "0.8.0" +name = "bevy_a11y" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baaaa0ecca5b51987b9423ccdc971514dd8b0bb7b4060b983d3664dad3f1f89f" +checksum = "e887b25c84f384ffe3278a17cf0e4b405eaa3c8fbc3db24d05d560a11780676d" dependencies = [ - "unicode-segmentation", + "accesskit", + "bevy_app", + "bevy_derive", + "bevy_ecs", + "bevy_reflect", ] [[package]] -name = "convert_case" -version = "0.10.0" +name = "bevy_android" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" +checksum = "a8c58de772ac1148884112e8a456c4f127a94b95a0e42ab5b160b7a11895a241" dependencies = [ - "unicode-segmentation", + "android-activity", ] [[package]] -name = "coolor" -version = "1.1.0" +name = "bevy_animation" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "980c2afde4af43d6a05c5be738f9eae595cff86dce1f38f88b95058a98c027f3" +checksum = "be5bf5b285f0d3fab983b4505e62e195e06930a29007ffc95bdabde834e163a2" dependencies = [ - "crossterm", + "bevy_animation_macros", + "bevy_app", + "bevy_asset", + "bevy_color", + "bevy_derive", + "bevy_ecs", + "bevy_math", + "bevy_mesh", + "bevy_platform", + "bevy_reflect", + "bevy_time", + "bevy_transform", + "bevy_utils", + "blake3", + "derive_more", + "downcast-rs 2.0.2", + "either", + "petgraph", + "ron", + "serde", + "smallvec", + "thiserror 2.0.18", + "thread_local", + "tracing", + "uuid", ] [[package]] -name = "core-foundation-sys" -version = "0.8.7" +name = "bevy_animation_macros" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +checksum = "7cf35516d0e7ac9ec25df533be1bf8cbaa20596a8e65f36838a3f7803a267d6d" +dependencies = [ + "bevy_macro_utils", + "quote", + "syn", +] [[package]] -name = "cpufeatures" -version = "0.2.17" +name = "bevy_anti_alias" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +checksum = "726cc494eb7d6a84ce6291c23636fd451fa4846604dc059fa93febca4e60a928" dependencies = [ - "libc", + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_core_pipeline", + "bevy_derive", + "bevy_diagnostic", + "bevy_ecs", + "bevy_image", + "bevy_math", + "bevy_reflect", + "bevy_render", + "bevy_shader", + "bevy_utils", + "tracing", ] [[package]] -name = "crokey" -version = "1.4.0" +name = "bevy_app" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04a63daf06a168535c74ab97cdba3ed4fa5d4f32cb36e437dcceb83d66854b7c" +checksum = "def9f41aa5bf9b9dec8beda307a332798609cffb9d44f71005e0cfb45164f2f6" dependencies = [ - "crokey-proc_macros", - "crossterm", - "once_cell", + "bevy_derive", + "bevy_ecs", + "bevy_platform", + "bevy_reflect", + "bevy_tasks", + "bevy_utils", + "cfg-if", + "console_error_panic_hook", + "ctrlc", + "downcast-rs 2.0.2", + "log", + "thiserror 2.0.18", + "variadics_please", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "bevy_asset" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29f86fed15972b9fb1a3f7b092cf0390e67131caaedab15a2707c043e3a3c886" +dependencies = [ + "async-broadcast", + "async-channel", + "async-fs", + "async-io", + "async-lock", + "atomicow", + "bevy_android", + "bevy_app", + "bevy_asset_macros", + "bevy_diagnostic", + "bevy_ecs", + "bevy_platform", + "bevy_reflect", + "bevy_tasks", + "bevy_utils", + "bitflags 2.13.0", + "blake3", + "crossbeam-channel", + "derive_more", + "disqualified", + "downcast-rs 2.0.2", + "either", + "futures-io", + "futures-lite", + "futures-util", + "js-sys", + "ron", "serde", - "strict", + "stackfuture", + "thiserror 2.0.18", + "tracing", + "uuid", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", ] [[package]] -name = "crokey-proc_macros" -version = "1.4.0" +name = "bevy_asset_macros" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "847f11a14855fc490bd5d059821895c53e77eeb3c2b73ee3dded7ce77c93b231" +checksum = "12cb8d948365b06561b43b7d709282e62a6abb756baac5d8e295206d5e156168" dependencies = [ - "crossterm", + "bevy_macro_utils", "proc-macro2", "quote", - "strict", "syn", ] [[package]] -name = "crossbeam" -version = "0.8.4" +name = "bevy_audio" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" +checksum = "9d68da32468ce7f4bb2863b71326acfaaa88e9aef8da8306257cd487d40cede4" dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-epoch", - "crossbeam-queue", - "crossbeam-utils", + "bevy_app", + "bevy_asset", + "bevy_ecs", + "bevy_math", + "bevy_reflect", + "bevy_transform", + "coreaudio-sys", + "cpal", + "rodio", + "tracing", ] [[package]] -name = "crossbeam-channel" -version = "0.5.15" +name = "bevy_camera" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" +checksum = "37ed9eed054e14341852236d06a7244597b1ace39ff9ae023fbd188ffde88619" dependencies = [ - "crossbeam-utils", + "bevy_app", + "bevy_asset", + "bevy_color", + "bevy_derive", + "bevy_ecs", + "bevy_image", + "bevy_math", + "bevy_mesh", + "bevy_reflect", + "bevy_transform", + "bevy_utils", + "bevy_window", + "derive_more", + "downcast-rs 2.0.2", + "serde", + "smallvec", + "thiserror 2.0.18", + "wgpu-types", ] [[package]] -name = "crossbeam-deque" -version = "0.8.6" +name = "bevy_color" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +checksum = "2eb41e8310a85811d14a4e75cfc2d6c07ac70661d6a4883509fc960f622970a8" dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", + "bevy_math", + "bevy_reflect", + "bytemuck", + "derive_more", + "encase", + "serde", + "thiserror 2.0.18", + "wgpu-types", +] + +[[package]] +name = "bevy_core_pipeline" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d0810e85c2436e50c67448d48a83bf0bb1b5849899619ae2c7ea817221e9172" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_derive", + "bevy_diagnostic", + "bevy_ecs", + "bevy_image", + "bevy_math", + "bevy_platform", + "bevy_reflect", + "bevy_render", + "bevy_shader", + "bevy_transform", + "bevy_utils", + "bevy_window", + "bitflags 2.13.0", + "nonmax", + "radsort", + "smallvec", + "thiserror 2.0.18", + "tracing", ] [[package]] -name = "crossbeam-epoch" -version = "0.9.18" +name = "bevy_derive" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +checksum = "318ee0532c3da93749859d18f89a889c638fbc56aabac4d866583df7b951d103" dependencies = [ - "crossbeam-utils", + "bevy_macro_utils", + "quote", + "syn", ] [[package]] -name = "crossbeam-queue" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" -dependencies = [ - "crossbeam-utils", +name = "bevy_dev_tools" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4f1464a3f5ef5c23d917987714ee89881f9f791e9ff97ecf6600ee846b9569e" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_diagnostic", + "bevy_ecs", + "bevy_image", + "bevy_input", + "bevy_math", + "bevy_picking", + "bevy_reflect", + "bevy_render", + "bevy_shader", + "bevy_state", + "bevy_text", + "bevy_time", + "bevy_transform", + "bevy_ui", + "bevy_ui_render", + "bevy_window", + "tracing", +] + +[[package]] +name = "bevy_diagnostic" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec8543a0f7afd56d3499ba80ffab6ef0bad12f93c2d2ca9aa7b1f1b8816c3980" +dependencies = [ + "atomic-waker", + "bevy_app", + "bevy_ecs", + "bevy_platform", + "bevy_tasks", + "bevy_time", + "const-fnv1a-hash", + "log", + "serde", + "sysinfo", ] [[package]] -name = "crossbeam-utils" -version = "0.8.21" +name = "bevy_ecs" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" +checksum = "c9cf7a3ee41342dd7b5a5d82e200d0e8efb933169247fce853b4ad633d51e87d" +dependencies = [ + "arrayvec", + "bevy_ecs_macros", + "bevy_platform", + "bevy_ptr", + "bevy_reflect", + "bevy_tasks", + "bevy_utils", + "bitflags 2.13.0", + "bumpalo", + "concurrent-queue", + "derive_more", + "fixedbitset", + "indexmap", + "log", + "nonmax", + "serde", + "slotmap", + "smallvec", + "thiserror 2.0.18", + "variadics_please", +] [[package]] -name = "crossterm" -version = "0.29.0" +name = "bevy_ecs_macros" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" +checksum = "908baf585e2ea16bd53ef0da57b69580478af0059d2dbdb4369991ac9794b618" dependencies = [ - "bitflags", - "crossterm_winapi", - "derive_more", - "document-features", - "mio", - "parking_lot", - "rustix", - "serde", - "signal-hook", - "signal-hook-mio", - "winapi", + "bevy_macro_utils", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "crossterm_winapi" -version = "0.9.1" +name = "bevy_egui" +version = "0.39.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" +checksum = "8d0a7e4806f3f242326d2c6157531c36d710f3bf320ebc0a1678e44635ed0eac" dependencies = [ - "winapi", + "arboard", + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_core_pipeline", + "bevy_derive", + "bevy_ecs", + "bevy_image", + "bevy_input", + "bevy_log", + "bevy_math", + "bevy_mesh", + "bevy_picking", + "bevy_platform", + "bevy_reflect", + "bevy_render", + "bevy_shader", + "bevy_time", + "bevy_transform", + "bevy_ui_render", + "bevy_utils", + "bevy_window", + "bevy_winit", + "bytemuck", + "crossbeam-channel", + "egui", + "encase", + "getrandom 0.3.4", + "image", + "itertools 0.14.0", + "js-sys", + "thread_local", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webbrowser", + "wgpu-types", + "winit", ] [[package]] -name = "crypto-common" -version = "0.1.7" +name = "bevy_encase_derive" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +checksum = "d4fee46eeddcbc00a805ae00ffa973f224671fc5cf0fe1a796963804faeade90" dependencies = [ - "generic-array", - "typenum", + "bevy_macro_utils", + "encase_derive_impl", ] [[package]] -name = "csv" -version = "1.4.0" +name = "bevy_feathers" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52cd9d68cf7efc6ddfaaee42e7288d3a99d613d4b50f76ce9827ae0c6e14f938" +checksum = "1cb29be8f8443c5cc44e1c4710bbe02877e73703c60228ca043f20529a5496c6" dependencies = [ - "csv-core", - "itoa", - "ryu", - "serde_core", + "accesskit", + "bevy_a11y", + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_derive", + "bevy_ecs", + "bevy_input_focus", + "bevy_log", + "bevy_math", + "bevy_picking", + "bevy_platform", + "bevy_reflect", + "bevy_render", + "bevy_shader", + "bevy_text", + "bevy_ui", + "bevy_ui_render", + "bevy_ui_widgets", + "bevy_window", + "smol_str", ] [[package]] -name = "csv-core" -version = "0.1.13" +name = "bevy_gilrs" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704a3c26996a80471189265814dbc2c257598b96b8a7feae2d31ace646bb9782" +checksum = "611827ab0ce43b88c0a695e6603901b5f34687efecaf526c861456c9d8e6fedb" dependencies = [ - "memchr", + "bevy_app", + "bevy_ecs", + "bevy_input", + "bevy_platform", + "bevy_time", + "gilrs", + "thiserror 2.0.18", + "tracing", ] [[package]] -name = "derive_more" -version = "2.1.1" +name = "bevy_gizmos" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" +checksum = "6aaff0dd5f405c83d290c5cd591835f1ae8009894947ab19dadcb323062bd7e7" dependencies = [ - "derive_more-impl", + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_ecs", + "bevy_gizmos_macros", + "bevy_light", + "bevy_math", + "bevy_reflect", + "bevy_time", + "bevy_transform", + "bevy_utils", ] [[package]] -name = "derive_more-impl" -version = "2.1.1" +name = "bevy_gizmos_macros" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" +checksum = "6960ea308d7e94adcac5c712553ff86614bba6b663511f3f3812f6bec028b51e" dependencies = [ - "convert_case 0.10.0", - "proc-macro2", + "bevy_macro_utils", "quote", - "rustc_version", "syn", ] [[package]] -name = "diff" -version = "0.1.13" +name = "bevy_gizmos_render" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" +checksum = "4a8d18c089102de4c5e9326023ad96ba618a6961029f8102a33640b966883237" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_core_pipeline", + "bevy_ecs", + "bevy_gizmos", + "bevy_image", + "bevy_math", + "bevy_mesh", + "bevy_pbr", + "bevy_render", + "bevy_shader", + "bevy_sprite_render", + "bevy_transform", + "bevy_utils", + "bytemuck", + "tracing", +] + +[[package]] +name = "bevy_gltf" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f37fb52655d0439656ca0a1db027d46926e463c81d893d4b1639668e5d7f1c1" +dependencies = [ + "async-lock", + "base64", + "bevy_animation", + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_ecs", + "bevy_image", + "bevy_light", + "bevy_math", + "bevy_mesh", + "bevy_pbr", + "bevy_platform", + "bevy_reflect", + "bevy_render", + "bevy_scene", + "bevy_tasks", + "bevy_transform", + "fixedbitset", + "gltf", + "itertools 0.14.0", + "percent-encoding", + "serde", + "serde_json", + "smallvec", + "thiserror 2.0.18", + "tracing", +] [[package]] -name = "digest" -version = "0.10.7" +name = "bevy_image" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +checksum = "a71daf9b2afdd032c2b1122d1d501f99126218cb3e9983b3604ec381daa35f22" dependencies = [ - "block-buffer", - "crypto-common", + "bevy_app", + "bevy_asset", + "bevy_color", + "bevy_ecs", + "bevy_math", + "bevy_platform", + "bevy_reflect", + "bevy_utils", + "bitflags 2.13.0", + "bytemuck", + "futures-lite", + "guillotiere", + "half", + "image", + "ktx2", + "rectangle-pack", + "ruzstd", + "serde", + "thiserror 2.0.18", + "tracing", + "wgpu-types", ] [[package]] -name = "dispatch2" -version = "0.3.0" +name = "bevy_input" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" +checksum = "dbc8ffbd02df34dfc52faf420a5263985973765e228043adf542fd0d790a6b21" dependencies = [ - "bitflags", - "objc2", + "bevy_app", + "bevy_ecs", + "bevy_math", + "bevy_platform", + "bevy_reflect", + "derive_more", + "log", + "smol_str", + "thiserror 2.0.18", ] [[package]] -name = "displaydoc" -version = "0.2.5" +name = "bevy_input_focus" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +checksum = "08d48a5bceccb9157549a39ab3de4017f5368b65db6471605e9a3f1c19d91bbc" +dependencies = [ + "bevy_app", + "bevy_ecs", + "bevy_input", + "bevy_math", + "bevy_picking", + "bevy_reflect", + "bevy_window", + "log", + "thiserror 2.0.18", +] + +[[package]] +name = "bevy_internal" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a11df62e49897def470471551c02f13c6fb488e55dddb5ab7ef098132e07754" +dependencies = [ + "bevy_a11y", + "bevy_android", + "bevy_animation", + "bevy_anti_alias", + "bevy_app", + "bevy_asset", + "bevy_audio", + "bevy_camera", + "bevy_color", + "bevy_core_pipeline", + "bevy_derive", + "bevy_dev_tools", + "bevy_diagnostic", + "bevy_ecs", + "bevy_feathers", + "bevy_gilrs", + "bevy_gizmos", + "bevy_gizmos_render", + "bevy_gltf", + "bevy_image", + "bevy_input", + "bevy_input_focus", + "bevy_light", + "bevy_log", + "bevy_math", + "bevy_mesh", + "bevy_pbr", + "bevy_picking", + "bevy_platform", + "bevy_post_process", + "bevy_ptr", + "bevy_reflect", + "bevy_render", + "bevy_scene", + "bevy_shader", + "bevy_sprite", + "bevy_sprite_render", + "bevy_state", + "bevy_tasks", + "bevy_text", + "bevy_time", + "bevy_transform", + "bevy_ui", + "bevy_ui_render", + "bevy_utils", + "bevy_window", + "bevy_winit", +] + +[[package]] +name = "bevy_light" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d9d2ac64390a9baacb3c0fa0f5456ac1553959d5a387874c102a09aab8b92cc" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_ecs", + "bevy_image", + "bevy_math", + "bevy_mesh", + "bevy_platform", + "bevy_reflect", + "bevy_transform", + "bevy_utils", + "tracing", +] + +[[package]] +name = "bevy_log" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2aac1187f83a1ab2eae887564f7fb14b4abb3fbe8b2267a6426663463923120" +dependencies = [ + "android_log-sys", + "bevy_app", + "bevy_ecs", + "bevy_platform", + "bevy_utils", + "tracing", + "tracing-log", + "tracing-oslog", + "tracing-subscriber", + "tracing-wasm", +] + +[[package]] +name = "bevy_macro_utils" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b147843b81a7ec548876ff97fa7bfdc646ef2567cb465566259237b39664438" dependencies = [ "proc-macro2", "quote", "syn", + "toml_edit 0.23.10+spec-1.0.0", ] [[package]] -name = "document-features" -version = "0.2.12" +name = "bevy_math" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +checksum = "e931fa969f89c83498b22c97432383afe90e90fd1a5e04fa07be8da4d3bcac84" dependencies = [ - "litrs", + "approx", + "arrayvec", + "bevy_reflect", + "derive_more", + "glam 0.30.10", + "itertools 0.14.0", + "libm", + "rand 0.9.4", + "rand_distr", + "serde", + "thiserror 2.0.18", + "variadics_please", ] [[package]] -name = "downcast-rs" -version = "1.2.1" +name = "bevy_mesh" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" +checksum = "288f590c8173d4cca3cae5f2ba579accd5ed1a35dd3fab338f427eb39d55f05e" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_derive", + "bevy_ecs", + "bevy_image", + "bevy_math", + "bevy_mikktspace", + "bevy_platform", + "bevy_reflect", + "bevy_transform", + "bitflags 2.13.0", + "bytemuck", + "derive_more", + "hexasphere", + "thiserror 2.0.18", + "tracing", + "wgpu-types", +] [[package]] -name = "dunce" -version = "1.0.5" +name = "bevy_mikktspace" +version = "0.17.0-dev" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" +checksum = "7ef8e4b7e61dfe7719bb03c884dc270cd46a82efb40f93e9933b990c5c190c59" [[package]] -name = "either" -version = "1.15.0" +name = "bevy_mod_outline" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +checksum = "d7eaa71ef0808ba912c816e31acac17a377b7501a5151ef1f9f7b5d290fa5f4f" +dependencies = [ + "bevy", + "bitfield", + "interpolation", + "itertools 0.14.0", + "nonmax", + "thiserror 1.0.69", + "wgpu-types", +] + +[[package]] +name = "bevy_pbr" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ab6944ffc6fd71604c0fbca68cc3e2a3654edfcdbfd232f9d8b88e3d20fdc0" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_core_pipeline", + "bevy_derive", + "bevy_diagnostic", + "bevy_ecs", + "bevy_image", + "bevy_light", + "bevy_log", + "bevy_math", + "bevy_mesh", + "bevy_platform", + "bevy_reflect", + "bevy_render", + "bevy_shader", + "bevy_transform", + "bevy_utils", + "bitflags 2.13.0", + "bytemuck", + "derive_more", + "fixedbitset", + "nonmax", + "offset-allocator", + "smallvec", + "static_assertions", + "thiserror 2.0.18", + "tracing", +] [[package]] -name = "enum-map" -version = "3.0.0-beta.2" +name = "bevy_picking" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb2a23ad36148a32085addb3ef1aa39805d044d4532ff258360d523a4eff38e5" +checksum = "b7d524dbc8f2c9e73f7ab70c148c8f7886f3c24b8aa8c252a38ba68ed06cbf10" dependencies = [ - "enum-map-derive", + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_derive", + "bevy_ecs", + "bevy_input", + "bevy_math", + "bevy_mesh", + "bevy_platform", + "bevy_reflect", + "bevy_time", + "bevy_transform", + "bevy_window", + "crossbeam-channel", + "tracing", + "uuid", ] [[package]] -name = "enum-map-derive" -version = "1.0.0-beta.1" +name = "bevy_platform" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44600091ce205df4f8b661e98617d49c37b2dd609e449ec82b0fb5d7b33e2eeb" +checksum = "ec6b36504169b644acd26a5469fd8d371aa6f1d73ee5c01b1b1181ae1cefbf9b" dependencies = [ - "proc-macro2", - "quote", - "syn", + "critical-section", + "foldhash 0.2.0", + "futures-channel", + "hashbrown 0.16.1", + "js-sys", + "portable-atomic", + "portable-atomic-util", + "serde", + "spin 0.10.0", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-time", +] + +[[package]] +name = "bevy_post_process" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f77a4e894aea992e3d6938f1d5898a1cdbb87dba6eebfb95cb4038d0a2600e9" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_core_pipeline", + "bevy_derive", + "bevy_ecs", + "bevy_image", + "bevy_math", + "bevy_platform", + "bevy_reflect", + "bevy_render", + "bevy_shader", + "bevy_transform", + "bevy_utils", + "bevy_window", + "bitflags 2.13.0", + "nonmax", + "radsort", + "smallvec", + "thiserror 2.0.18", + "tracing", ] [[package]] -name = "enum_dispatch" -version = "0.3.13" +name = "bevy_ptr" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" +checksum = "c7a9329e8dc4e01ced480eeec4902e6d7cb56e56ec37f6fbc4323e5c937290a7" + +[[package]] +name = "bevy_reflect" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1dfeb67a9fe4f59003a84f5f99ba6302141c70e926601cbc6abfd4a1eea9ca9" dependencies = [ - "once_cell", - "proc-macro2", - "quote", - "syn", + "assert_type_match", + "bevy_platform", + "bevy_ptr", + "bevy_reflect_derive", + "bevy_utils", + "derive_more", + "disqualified", + "downcast-rs 2.0.2", + "erased-serde", + "foldhash 0.2.0", + "glam 0.30.10", + "indexmap", + "inventory", + "petgraph", + "serde", + "smallvec", + "smol_str", + "thiserror 2.0.18", + "uuid", + "variadics_please", + "wgpu-types", ] [[package]] -name = "enum_downcast" -version = "0.1.0" +name = "bevy_reflect_derive" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e532035fcb0d794ae56f74a0a39fea24bca14c7d47c428e3ab0667ebdccd8b4a" +checksum = "475f68c93e9cd5f17e9167635c8533a4f388f12d38245a202359e4c2721d87ba" dependencies = [ - "enum_downcast_derive", + "bevy_macro_utils", + "indexmap", + "proc-macro2", + "quote", + "syn", + "uuid", +] + +[[package]] +name = "bevy_render" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "243523e33fe5dfcebc4240b1eb2fc16e855c5d4c0ea6a8393910740956770f44" +dependencies = [ + "async-channel", + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_derive", + "bevy_diagnostic", + "bevy_ecs", + "bevy_encase_derive", + "bevy_image", + "bevy_math", + "bevy_mesh", + "bevy_platform", + "bevy_reflect", + "bevy_render_macros", + "bevy_shader", + "bevy_tasks", + "bevy_time", + "bevy_transform", + "bevy_utils", + "bevy_window", + "bitflags 2.13.0", + "bytemuck", + "derive_more", + "downcast-rs 2.0.2", + "encase", + "fixedbitset", + "glam 0.30.10", + "image", + "indexmap", + "js-sys", + "naga", + "nonmax", + "offset-allocator", + "send_wrapper", + "smallvec", + "thiserror 2.0.18", + "tracing", + "variadics_please", + "wasm-bindgen", + "web-sys", + "wgpu", ] [[package]] -name = "enum_downcast_derive" -version = "0.1.0" +name = "bevy_render_macros" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0e8987f91d86aa10313adf7c767a8cfd040364432d4e9f722b049b8ff7e634a" +checksum = "66b6325e9c495a71270446784611e8d7f446f927eac8506c4c099fd10cb4c3ed" dependencies = [ + "bevy_macro_utils", "proc-macro2", "quote", "syn", ] [[package]] -name = "equivalent" -version = "1.0.2" +name = "bevy_scene" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" +checksum = "34cc1047d85ec8048261b63ef675c12f1e6b5782dc0b422fbcee0c140d026bd4" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_derive", + "bevy_ecs", + "bevy_platform", + "bevy_reflect", + "bevy_transform", + "bevy_utils", + "derive_more", + "ron", + "serde", + "thiserror 2.0.18", + "uuid", +] [[package]] -name = "errno" -version = "0.3.14" +name = "bevy_shader" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +checksum = "9eea95f0273c32be13d6a0b799a93bc256ad7830759ede595c404d5234302da2" dependencies = [ - "libc", - "windows-sys 0.61.2", + "bevy_asset", + "bevy_platform", + "bevy_reflect", + "naga", + "naga_oil", + "serde", + "thiserror 2.0.18", + "tracing", + "wgpu-types", +] + +[[package]] +name = "bevy_sprite" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96ec5bc0cbdee551b610a46f41d30374bbe42b8951ffc676253c6243ab2b9395" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_derive", + "bevy_ecs", + "bevy_image", + "bevy_math", + "bevy_mesh", + "bevy_picking", + "bevy_reflect", + "bevy_text", + "bevy_transform", + "bevy_window", + "radsort", + "tracing", + "wgpu-types", +] + +[[package]] +name = "bevy_sprite_render" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b82cb08905e7ddcea2694a95f757ae7f1fd01e6a7304076bad595d2158e4bfe0" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_core_pipeline", + "bevy_derive", + "bevy_ecs", + "bevy_image", + "bevy_math", + "bevy_mesh", + "bevy_platform", + "bevy_reflect", + "bevy_render", + "bevy_shader", + "bevy_sprite", + "bevy_text", + "bevy_transform", + "bevy_utils", + "bitflags 2.13.0", + "bytemuck", + "derive_more", + "fixedbitset", + "nonmax", + "tracing", ] [[package]] -name = "error-code" -version = "3.3.2" +name = "bevy_state" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dea2df4cf52843e0452895c455a1a2cfbb842a1e7329671acf418fdc53ed4c59" +checksum = "0ae0682968e97d29c1eccc8c6bb6283f2678d362779bc03f1bb990967059473b" +dependencies = [ + "bevy_app", + "bevy_ecs", + "bevy_platform", + "bevy_reflect", + "bevy_state_macros", + "bevy_utils", + "log", + "variadics_please", +] [[package]] -name = "fastrand" -version = "2.3.0" +name = "bevy_state_macros" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +checksum = "73d32f90f9cfcef5a44401db7ce206770daaa1707b0fb95eb7a96a6933f54f1b" +dependencies = [ + "bevy_macro_utils", + "quote", + "syn", +] [[package]] -name = "fd-lock" -version = "4.0.4" +name = "bevy_tasks" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78" +checksum = "384eb04d80aa38664d69988fd30cbbe03e937ecb65c66aa6abe60ce0bca826aa" dependencies = [ - "cfg-if", - "rustix", - "windows-sys 0.59.0", + "async-channel", + "async-executor", + "async-task", + "atomic-waker", + "bevy_platform", + "concurrent-queue", + "crossbeam-queue", + "derive_more", + "futures-lite", + "heapless 0.9.3", + "pin-project", ] [[package]] -name = "file-guard" -version = "0.2.0" +name = "bevy_text" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21ef72acf95ec3d7dbf61275be556299490a245f017cf084bd23b4f68cf9407c" +checksum = "fdc5233291dfc22e584de2535f2e37ae9766d37cb5a01652de2133ba202dcb9b" dependencies = [ - "libc", - "winapi", + "bevy_app", + "bevy_asset", + "bevy_color", + "bevy_derive", + "bevy_ecs", + "bevy_image", + "bevy_log", + "bevy_math", + "bevy_platform", + "bevy_reflect", + "bevy_utils", + "cosmic-text", + "serde", + "smallvec", + "sys-locale", + "thiserror 2.0.18", + "tracing", + "wgpu-types", ] [[package]] -name = "find-msvc-tools" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" - -[[package]] -name = "fixedbitset" -version = "0.5.7" +name = "bevy_time" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" +checksum = "b5ef9af4e523195e561074cf60fbfad0f4cb8d1db504855fee3c4ce8896c7244" +dependencies = [ + "bevy_app", + "bevy_ecs", + "bevy_platform", + "bevy_reflect", + "crossbeam-channel", + "log", + "serde", +] [[package]] -name = "float-cmp" -version = "0.10.0" +name = "bevy_transform" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09cf3155332e944990140d967ff5eceb70df778b34f77d8075db46e4704e6d8" +checksum = "3c3bb3de7842fef699344beb03f22bdbff16599d788fe0f47fbb3b1e6fa320eb" dependencies = [ - "num-traits", + "bevy_app", + "bevy_ecs", + "bevy_log", + "bevy_math", + "bevy_reflect", + "bevy_tasks", + "bevy_utils", + "derive_more", + "serde", + "thiserror 2.0.18", ] [[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +name = "bevy_ui" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1691a411014085e0d35f8bb8208e5f973edd7ace061a4b1c41c83de21579dc70" +dependencies = [ + "accesskit", + "bevy_a11y", + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_derive", + "bevy_ecs", + "bevy_image", + "bevy_input", + "bevy_input_focus", + "bevy_math", + "bevy_picking", + "bevy_platform", + "bevy_reflect", + "bevy_sprite", + "bevy_text", + "bevy_transform", + "bevy_utils", + "bevy_window", + "derive_more", + "smallvec", + "taffy", + "thiserror 2.0.18", + "tracing", + "uuid", +] + +[[package]] +name = "bevy_ui_render" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2c35402d8a052f512e3fec1f36b26e83eee713fcca57f965c244ee795e1fcb0" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_core_pipeline", + "bevy_derive", + "bevy_ecs", + "bevy_image", + "bevy_math", + "bevy_mesh", + "bevy_platform", + "bevy_reflect", + "bevy_render", + "bevy_shader", + "bevy_sprite", + "bevy_sprite_render", + "bevy_text", + "bevy_transform", + "bevy_ui", + "bevy_utils", + "bytemuck", + "derive_more", + "tracing", +] [[package]] -name = "foldhash" -version = "0.1.5" +name = "bevy_ui_widgets" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +checksum = "b6a63cb818b0de41bdb14990e0ce1aaaa347f871750ab280f80c427e83d72712" +dependencies = [ + "accesskit", + "bevy_a11y", + "bevy_app", + "bevy_camera", + "bevy_ecs", + "bevy_input", + "bevy_input_focus", + "bevy_log", + "bevy_math", + "bevy_picking", + "bevy_reflect", + "bevy_ui", +] [[package]] -name = "form_urlencoded" -version = "1.2.2" +name = "bevy_utils" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +checksum = "2111910cd7a4b1e6ce07eaaeb6f68a2c0ea0ca609ed0d0d506e3eb161101435b" dependencies = [ - "percent-encoding", + "bevy_platform", + "disqualified", + "thread_local", ] [[package]] -name = "generic-array" -version = "0.14.7" +name = "bevy_window" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +checksum = "6df06e6993a0896bae2fe7644ae6def29a1a92b45dfb1bcebbd92af782be3638" dependencies = [ - "typenum", - "version_check", + "bevy_app", + "bevy_asset", + "bevy_ecs", + "bevy_image", + "bevy_input", + "bevy_math", + "bevy_platform", + "bevy_reflect", + "log", + "raw-window-handle", + "serde", ] [[package]] -name = "gethostname" -version = "1.1.0" +name = "bevy_winit" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" +checksum = "f2de1c13d32ab8528435b58eca7ab874a1068184c6d6f266ee11433ae99d4069" dependencies = [ - "rustix", - "windows-link", + "accesskit", + "accesskit_winit", + "approx", + "bevy_a11y", + "bevy_android", + "bevy_app", + "bevy_asset", + "bevy_derive", + "bevy_ecs", + "bevy_image", + "bevy_input", + "bevy_input_focus", + "bevy_log", + "bevy_math", + "bevy_platform", + "bevy_reflect", + "bevy_tasks", + "bevy_window", + "bytemuck", + "cfg-if", + "js-sys", + "tracing", + "wasm-bindgen", + "web-sys", + "wgpu-types", + "winit", ] [[package]] -name = "getrandom" -version = "0.3.4" +name = "bincode" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasip2", + "serde", ] [[package]] -name = "getrandom" -version = "0.4.1" +name = "bindgen" +version = "0.72.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec" +checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasip2", - "wasip3", + "bitflags 2.13.0", + "cexpr", + "clang-sys", + "itertools 0.13.0", + "proc-macro2", + "quote", + "regex", + "rustc-hash 2.1.2", + "shlex 1.3.0", + "syn", ] [[package]] -name = "git2" -version = "0.20.4" +name = "bit-set" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b88256088d75a56f8ecfa070513a775dd9107f6530ef14919dac831af9cfe2b" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ - "bitflags", - "libc", - "libgit2-sys", - "log", - "openssl-probe", - "openssl-sys", - "url", + "bit-vec", ] [[package]] -name = "glam" -version = "0.14.0" +name = "bit-vec" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "333928d5eb103c5d4050533cec0384302db6be8ef7d3cebd30ec6a35350353da" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] -name = "glam" -version = "0.15.2" +name = "bitfield" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3abb554f8ee44336b72d522e0a7fe86a29e09f839a36022fa869a7dfe941a54b" +checksum = "c821a6e124197eb56d907ccc2188eab1038fb919c914f47976e64dd8dbc855d1" [[package]] -name = "glam" -version = "0.16.0" +name = "bitflags" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4126c0479ccf7e8664c36a2d719f5f2c140fbb4f9090008098d2c291fa5b3f16" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "glam" -version = "0.17.3" +name = "bitflags" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01732b97afd8508eee3333a541b9f7610f454bb818669e66e90f5f57c93a776" +checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8" +dependencies = [ + "bytemuck", + "serde_core", +] [[package]] -name = "glam" -version = "0.18.0" +name = "blake3" +version = "1.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525a3e490ba77b8e326fb67d4b44b4bd2f920f44d4cc73ccec50adc68e3bee34" +checksum = "0aa83c34e62843d924f905e0f5c866eb1dd6545fc4d719e803d9ba6030371fce" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "cpufeatures 0.3.0", +] [[package]] -name = "glam" -version = "0.19.0" +name = "block" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b8509e6791516e81c1a630d0bd7fbac36d2fa8712a9da8662e716b52d5051ca" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] -name = "glam" -version = "0.20.5" +name = "block-buffer" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43e957e744be03f5801a55472f593d43fabdebf25a4585db250f04d86b1675f" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array 0.14.7", +] [[package]] -name = "glam" -version = "0.21.3" +name = "block2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "518faa5064866338b013ff9b2350dc318e14cc4fcd6cb8206d7e7c9886c98815" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" +dependencies = [ + "objc2 0.5.2", +] [[package]] -name = "glam" -version = "0.22.0" +name = "block2" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f597d56c1bd55a811a1be189459e8fad2bbc272616375602443bdfb37fa774" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2 0.6.4", +] [[package]] -name = "glam" -version = "0.23.0" +name = "blocking" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e4afd9ad95555081e109fe1d21f2a30c691b5f0919c67dfa690a2e1eb6bd51c" +checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", +] [[package]] -name = "glam" -version = "0.24.2" +name = "boolmesh" +version = "0.1.9" +source = "git+https://github.com/IamTheCarl/boolmesh.git?branch=opencode-refactors#cad7536a071e1dc9a92487938ad4b7a0a4da6010" +dependencies = [ + "bincode", + "fxhash", + "geo", + "indexmap", + "nalgebra", + "num-traits", + "rayon", + "serde", + "thiserror 2.0.18", +] + +[[package]] +name = "bumpalo" +version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5418c17512bdf42730f9032c74e1ae39afc408745ebb2acf72fbc4691c17945" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" [[package]] -name = "glam" -version = "0.25.0" +name = "bytemuck" +version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "151665d9be52f9bb40fc7966565d39666f2d1e69233571b71b87791c7e0528b3" +checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" +dependencies = [ + "bytemuck_derive", +] [[package]] -name = "glam" -version = "0.27.0" +name = "bytemuck_derive" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e05e7e6723e3455f4818c7b26e855439f7546cf617ef669d1adedb8669e5cb9" +checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] -name = "glam" -version = "0.28.0" +name = "byteorder" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779ae4bf7e8421cf91c0b3b64e7e8b40b862fba4d393f59150042de7c4965a94" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] -name = "glam" -version = "0.29.3" +name = "byteorder-lite" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8babf46d4c1c9d92deac9f7be466f76dfc4482b6452fc5024b5e8daf6ffeb3ee" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] -name = "glam" -version = "0.30.10" +name = "bytes" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19fc433e8437a212d1b6f1e68c7824af3aed907da60afa994e7f542d18d12aa9" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" + +[[package]] +name = "calloop" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ - "serde_core", + "bitflags 2.13.0", + "log", + "polling", + "rustix 0.38.44", + "slab", + "thiserror 1.0.69", ] [[package]] -name = "hashable-map" -version = "0.4.0" +name = "calloop-wayland-source" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46ab77e35afc7a5a3087e72e8e93a90a226a78f62c5f4dceaeb3d7ef5decdccb" +checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" dependencies = [ - "serde", + "calloop", + "rustix 0.38.44", + "wayland-backend", + "wayland-client", ] [[package]] -name = "hashbrown" -version = "0.15.5" +name = "cc" +version = "1.2.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +checksum = "556e016178bb5662a08681bbe0f00f8e17631781a4dfc8c45e466e4b185ec27f" dependencies = [ - "foldhash", + "find-msvc-tools", + "jobserver", + "libc", + "shlex 2.0.1", ] [[package]] -name = "hashbrown" -version = "0.16.1" +name = "cesu8" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" [[package]] -name = "heck" -version = "0.5.0" +name = "cexpr" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom 7.1.3", +] [[package]] -name = "hex" -version = "0.4.3" +name = "cfg-if" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] -name = "iana-time-zone" -version = "0.1.65" +name = "cfg_aliases" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "log", - "wasm-bindgen", - "windows-core", -] +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" +name = "check_keyword" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +checksum = "0dcba1e35fcf6c9350d9fb4863d87c66e5e37f1583f883560dca2c9320840bcc" dependencies = [ - "cc", + "phf", ] [[package]] -name = "icu_collections" -version = "2.1.1" +name = "chrono" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" dependencies = [ - "displaydoc", - "potential_utf", - "yoke", - "zerofrom", - "zerovec", + "iana-time-zone", + "num-traits", + "serde", + "windows-link 0.2.1", ] [[package]] -name = "icu_locale_core" -version = "2.1.1" +name = "ciborium" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", + "ciborium-io", + "ciborium-ll", + "serde", ] [[package]] -name = "icu_normalizer" -version = "2.1.1" +name = "ciborium-io" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" -dependencies = [ - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "zerovec", -] +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" [[package]] -name = "icu_normalizer_data" -version = "2.1.1" +name = "ciborium-ll" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" +dependencies = [ + "ciborium-io", + "half", +] [[package]] -name = "icu_properties" -version = "2.1.2" +name = "clang-sys" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ - "icu_collections", - "icu_locale_core", - "icu_properties_data", - "icu_provider", - "zerotrie", - "zerovec", + "glob", + "libc", + "libloading", ] [[package]] -name = "icu_properties_data" -version = "2.1.2" +name = "clap" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" +checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" +dependencies = [ + "clap_builder", + "clap_derive", +] [[package]] -name = "icu_provider" -version = "2.1.1" +name = "clap_builder" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" dependencies = [ - "displaydoc", - "icu_locale_core", - "writeable", - "yoke", - "zerofrom", - "zerotrie", - "zerovec", + "anstream", + "anstyle", + "clap_lex", + "strsim", ] [[package]] -name = "id-arena" -version = "2.3.0" +name = "clap_derive" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" +checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] [[package]] -name = "idna" +name = "clap_lex" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" + +[[package]] +name = "cli" +version = "0.1.0" dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", + "anyhow", + "ariadne", + "clap", + "git2", + "interpreter", + "nu-ansi-term", + "reedline", + "tempfile", + "termimad", + "tree-sitter", + "type-sitter", ] [[package]] -name = "idna_adapter" -version = "1.2.1" +name = "clipboard-win" +version = "5.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +checksum = "bde03770d3df201d4fb868f2c9c59e66a3e4e2bd06692a0fe701e7103c7e84d4" dependencies = [ - "icu_normalizer", - "icu_properties", + "error-code", ] [[package]] -name = "imstr" -version = "0.2.0" +name = "coalesce" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d3441deb04ea9c6b472f313be54d585428cd6a68cdb8dcf40cf43744bec78fe" +checksum = "e7f42f93baa58655bd5b3db91dd9b2073dc8a0c887dc35bd1cfefbd43fc7cf07" [[package]] -name = "indexmap" -version = "2.13.0" +name = "codespan-reporting" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" dependencies = [ - "equivalent", - "hashbrown 0.16.1", "serde", - "serde_core", + "termcolor", + "unicode-width 0.2.2", ] [[package]] -name = "interpreter" -version = "0.1.0" -dependencies = [ - "ariadne", - "boolmesh", - "common_data_types", - "enum_dispatch", - "enum_downcast", - "file-guard", - "hashable-map", - "hex", - "imstr", - "itertools 0.14.0", - "levenshtein", - "nalgebra", - "nom", - "num-traits", - "paste", - "pretty_assertions", - "rayon", - "selen", - "serde", - "sha2", - "stack", - "stl_io", - "tempfile", - "thiserror 2.0.18", - "tree-sitter", - "tree-sitter-command-cad-model", - "type-sitter", - "type-sitter-gen", - "units", - "unwrap-enum", -] +name = "colorchoice" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" [[package]] -name = "is_terminal_polyfill" -version = "1.70.2" +name = "combine" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] [[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +name = "common_data_types" +version = "0.1.0" dependencies = [ - "either", + "ordered-float 4.6.0", + "paste", + "serde", ] [[package]] -name = "itertools" -version = "0.13.0" +name = "concurrent-queue" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ - "either", + "crossbeam-utils", + "portable-atomic", ] [[package]] -name = "itertools" -version = "0.14.0" +name = "console_error_panic_hook" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" dependencies = [ - "either", + "cfg-if", + "wasm-bindgen", ] [[package]] -name = "itoa" -version = "1.0.17" +name = "const-fnv1a-hash" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" +checksum = "32b13ea120a812beba79e34316b3942a857c86ec1593cb34f27bb28272ce2cca" [[package]] -name = "jobserver" -version = "0.1.34" +name = "const_panic" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +checksum = "e262cdaac42494e3ae34c43969f9cdeb7da178bdb4b66fa6a1ea2edb4c8ae652" dependencies = [ - "getrandom 0.3.4", - "libc", + "typewit", ] [[package]] -name = "join-lazy-fmt" -version = "0.9.2" +name = "const_soft_float" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e90f66baf362a8a5ce2ca820290fbede0572a76fabf8408bc68c02f9ad1d03bf" +checksum = "87ca1caa64ef4ed453e68bb3db612e51cf1b2f5b871337f0fcab1c8f87cc3dff" [[package]] -name = "js-sys" -version = "0.3.87" +name = "constant_time_eq" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b" + +[[package]] +name = "constgebra" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f0862381daaec758576dcc22eb7bbf4d7efd67328553f3b45a412a51a3fb21" +checksum = "e1aaf9b65849a68662ac6c0810c8893a765c960b907dd7cfab9c4a50bf764fbc" dependencies = [ - "once_cell", - "wasm-bindgen", + "const_soft_float", ] [[package]] -name = "lazy-regex" -version = "3.6.0" +name = "convert_case" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bae91019476d3ec7147de9aa291cadb6d870abf2f3015d2da73a90325ac1496" +checksum = "baaaa0ecca5b51987b9423ccdc971514dd8b0bb7b4060b983d3664dad3f1f89f" dependencies = [ - "lazy-regex-proc_macros", - "once_cell", - "regex", + "unicode-segmentation", ] [[package]] -name = "lazy-regex-proc_macros" -version = "3.6.0" +name = "convert_case" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4de9c1e1439d8b7b3061b2d209809f447ca33241733d9a3c01eabf2dc8d94358" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" dependencies = [ - "proc-macro2", - "quote", - "regex", - "syn", + "unicode-segmentation", ] [[package]] -name = "lazy_static" -version = "1.5.0" +name = "coolor" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +checksum = "980c2afde4af43d6a05c5be738f9eae595cff86dce1f38f88b95058a98c027f3" +dependencies = [ + "crossterm", +] [[package]] -name = "leb128fmt" -version = "0.1.0" +name = "core-foundation" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] [[package]] -name = "levenshtein" -version = "1.0.5" +name = "core-foundation" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db13adb97ab515a3691f56e4dbab09283d0b86cb45abd991d8634a9d6f501760" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] [[package]] -name = "libc" -version = "0.2.182" +name = "core-foundation-sys" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6800badb6cb2082ffd7b6a67e6125bb39f18782f793520caee8cb8846be06112" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] -name = "libgit2-sys" -version = "0.18.3+1.9.2" +name = "core-graphics" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9b3acc4b91781bb0b3386669d325163746af5f6e4f73e6d2d630e09a35f3487" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" dependencies = [ - "cc", + "bitflags 1.3.2", + "core-foundation 0.9.4", + "core-graphics-types 0.1.3", + "foreign-types", "libc", - "libssh2-sys", - "libz-sys", - "openssl-sys", - "pkg-config", ] [[package]] -name = "libloading" -version = "0.8.9" +name = "core-graphics-types" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" dependencies = [ - "cfg-if", - "windows-link", + "bitflags 1.3.2", + "core-foundation 0.9.4", + "libc", ] [[package]] -name = "libssh2-sys" -version = "0.3.1" +name = "core-graphics-types" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "220e4f05ad4a218192533b300327f5150e809b54c4ec83b5a1d91833601811b9" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "cc", + "bitflags 2.13.0", + "core-foundation 0.10.1", "libc", - "libz-sys", - "openssl-sys", - "pkg-config", - "vcpkg", ] [[package]] -name = "libz-sys" -version = "1.1.23" +name = "core_maths" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15d118bbf3771060e7311cc7bb0545b01d08a8b4a7de949198dec1fa0ca1c0f7" +checksum = "77745e017f5edba1a9c1d854f6f3a52dac8a12dd5af5d2f54aecf61e43d80d30" dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", + "libm", ] [[package]] -name = "linux-raw-sys" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" - -[[package]] -name = "litemap" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" - -[[package]] -name = "litrs" -version = "1.0.0" +name = "coreaudio-rs" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" +checksum = "321077172d79c662f64f5071a03120748d5bb652f5231570141be24cfcd2bace" +dependencies = [ + "bitflags 1.3.2", + "core-foundation-sys", + "coreaudio-sys", +] [[package]] -name = "lock_api" -version = "0.4.14" +name = "coreaudio-sys" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +checksum = "b9b4739a805a62757a83e5654fa3faabec0442666b263bb2287d5a8185bfd953" dependencies = [ - "scopeguard", + "bindgen", ] [[package]] -name = "log" -version = "0.4.29" +name = "cosmic-text" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" +checksum = "c4cadaea21e24c49c0c82116f2b465ae6a49d63c90e428b0f8d9ae1f638ac91f" +dependencies = [ + "bitflags 2.13.0", + "fontdb", + "harfrust", + "linebender_resource_handle", + "log", + "rangemap", + "rustc-hash 1.1.0", + "self_cell", + "skrifa 0.39.0", + "smol_str", + "swash", + "sys-locale", + "unicode-bidi", + "unicode-linebreak", + "unicode-script", + "unicode-segmentation", +] [[package]] -name = "logos" -version = "0.15.1" +name = "cpal" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff472f899b4ec2d99161c51f60ff7075eeb3097069a36050d8037a6325eb8154" +checksum = "873dab07c8f743075e57f524c583985fbaf745602acbe916a01539364369a779" dependencies = [ - "logos-derive", + "alsa", + "core-foundation-sys", + "coreaudio-rs", + "dasp_sample", + "jni 0.21.1", + "js-sys", + "libc", + "mach2", + "ndk 0.8.0", + "ndk-context", + "oboe", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows 0.54.0", ] [[package]] -name = "logos-codegen" -version = "0.15.1" +name = "cpufeatures" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "192a3a2b90b0c05b27a0b2c43eecdb7c415e29243acc3f89cc8247a5b693045c" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ - "beef", - "fnv", - "lazy_static", - "proc-macro2", - "quote", - "regex-syntax", - "rustc_version", - "syn", + "libc", ] [[package]] -name = "logos-derive" -version = "0.15.1" +name = "cpufeatures" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "605d9697bcd5ef3a42d38efc51541aa3d6a4a25f7ab6d1ed0da5ac632a26b470" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" dependencies = [ - "logos-codegen", + "libc", ] [[package]] -name = "matrixmultiply" -version = "0.3.10" +name = "crc32fast" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06de3016e9fae57a36fd14dba131fccf49f74b40b7fbdb472f96e361ec71a08" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ - "autocfg", - "rawpointer", + "cfg-if", ] [[package]] -name = "memchr" -version = "2.8.0" +name = "critical-section" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" [[package]] -name = "minimad" -version = "0.14.0" +name = "crokey" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8b688969b16915f3ecadc7829d5b7779dee4977e503f767f34136803d5c06f" +checksum = "04a63daf06a168535c74ab97cdba3ed4fa5d4f32cb36e437dcceb83d66854b7c" dependencies = [ + "crokey-proc_macros", + "crossterm", "once_cell", + "serde", + "strict", ] [[package]] -name = "mio" -version = "1.1.1" +name = "crokey-proc_macros" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +checksum = "847f11a14855fc490bd5d059821895c53e77eeb3c2b73ee3dded7ce77c93b231" dependencies = [ - "libc", - "log", - "wasi", - "windows-sys 0.61.2", + "crossterm", + "proc-macro2", + "quote", + "strict", + "syn", ] [[package]] -name = "nalgebra" -version = "0.34.1" +name = "crossbeam" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4d5b3eff5cd580f93da45e64715e8c20a3996342f1e466599cf7a267a0c2f5f" +checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" dependencies = [ - "approx", - "glam 0.14.0", - "glam 0.15.2", - "glam 0.16.0", - "glam 0.17.3", - "glam 0.18.0", - "glam 0.19.0", - "glam 0.20.5", - "glam 0.21.3", - "glam 0.22.0", - "glam 0.23.0", - "glam 0.24.2", - "glam 0.25.0", - "glam 0.27.0", - "glam 0.28.0", - "glam 0.29.3", - "glam 0.30.10", - "matrixmultiply", - "nalgebra-macros", - "num-complex", - "num-rational", - "num-traits", - "simba", - "typenum", + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils", ] [[package]] -name = "nalgebra-macros" -version = "0.3.0" +name = "crossbeam-channel" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "973e7178a678cfd059ccec50887658d482ce16b0aa9da3888ddeab5cd5eb4889" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" dependencies = [ - "proc-macro2", - "quote", - "syn", + "crossbeam-utils", ] [[package]] -name = "nom" -version = "8.0.0" +name = "crossbeam-deque" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ - "memchr", + "crossbeam-epoch", + "crossbeam-utils", ] [[package]] -name = "nu-ansi-term" -version = "0.50.3" +name = "crossbeam-epoch" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "windows-sys 0.61.2", + "crossbeam-utils", ] [[package]] -name = "num-bigint" -version = "0.4.6" +name = "crossbeam-queue" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" dependencies = [ - "num-integer", - "num-traits", + "crossbeam-utils", ] [[package]] -name = "num-complex" -version = "0.4.6" +name = "crossbeam-utils" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" -dependencies = [ - "num-traits", -] +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] -name = "num-integer" -version = "0.1.46" +name = "crossterm" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" dependencies = [ - "num-traits", + "bitflags 2.13.0", + "crossterm_winapi", + "derive_more", + "document-features", + "mio", + "parking_lot", + "rustix 1.1.4", + "serde", + "signal-hook", + "signal-hook-mio", + "winapi", ] [[package]] -name = "num-rational" -version = "0.4.2" +name = "crossterm_winapi" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" dependencies = [ - "num-bigint", - "num-integer", - "num-traits", + "winapi", ] [[package]] -name = "num-traits" -version = "0.2.19" +name = "crunchy" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] -name = "objc2" -version = "0.6.3" +name = "crypto-common" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ - "objc2-encode", + "generic-array 0.14.7", + "typenum", ] [[package]] -name = "objc2-app-kit" -version = "0.3.2" +name = "csv" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" +checksum = "52cd9d68cf7efc6ddfaaee42e7288d3a99d613d4b50f76ce9827ae0c6e14f938" dependencies = [ - "bitflags", - "objc2", - "objc2-core-graphics", - "objc2-foundation", + "csv-core", + "itoa", + "ryu", + "serde_core", ] [[package]] -name = "objc2-core-foundation" -version = "0.3.2" +name = "csv-core" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +checksum = "704a3c26996a80471189265814dbc2c257598b96b8a7feae2d31ace646bb9782" dependencies = [ - "bitflags", - "dispatch2", - "objc2", + "memchr", ] [[package]] -name = "objc2-core-graphics" -version = "0.3.2" +name = "ctrlc" +version = "3.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +checksum = "e0b1fab2ae45819af2d0731d60f2afe17227ebb1a1538a236da84c93e9a60162" dependencies = [ - "bitflags", "dispatch2", - "objc2", - "objc2-core-foundation", - "objc2-io-surface", + "nix", + "windows-sys 0.61.2", ] [[package]] -name = "objc2-encode" -version = "4.1.0" +name = "cursor-icon" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" +checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" [[package]] -name = "objc2-foundation" -version = "0.3.2" +name = "dasp_sample" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +checksum = "0c87e182de0887fd5361989c677c4e8f5000cd9491d6d563161a8f3a5519fc7f" + +[[package]] +name = "data-encoding" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4ae5f15dda3c708c0ade84bfee31ccab44a3da4f88015ed22f63732abe300c8" + +[[package]] +name = "derive_more" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" dependencies = [ - "bitflags", - "objc2", - "objc2-core-foundation", + "derive_more-impl", ] [[package]] -name = "objc2-io-surface" -version = "0.3.2" +name = "derive_more-impl" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" dependencies = [ - "bitflags", - "objc2", - "objc2-core-foundation", + "convert_case 0.10.0", + "proc-macro2", + "quote", + "rustc_version", + "syn", + "unicode-xid", ] [[package]] -name = "once_cell" -version = "1.21.3" +name = "diff" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" [[package]] -name = "once_cell_polyfill" -version = "1.70.2" +name = "digest" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] [[package]] -name = "openssl-probe" -version = "0.1.6" +name = "dispatch" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" [[package]] -name = "openssl-sys" -version = "0.9.111" +name = "dispatch2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" dependencies = [ - "cc", + "bitflags 2.13.0", + "block2 0.6.2", "libc", - "pkg-config", - "vcpkg", + "objc2 0.6.4", ] [[package]] -name = "ordered-float" -version = "4.6.0" +name = "displaydoc" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bb71e1b3fa6ca1c61f383464aaf2bb0e2f8e772a1f01d486832464de363b951" +checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" dependencies = [ - "num-traits", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "os_pipe" -version = "1.2.3" +name = "disqualified" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967" -dependencies = [ - "libc", - "windows-sys 0.61.2", -] +checksum = "c9c272297e804878a2a4b707cfcfc6d2328b5bb936944613b4fdf2b9269afdfd" [[package]] -name = "parking_lot" -version = "0.12.5" +name = "dlib" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +checksum = "ab8ecd87370524b461f8557c119c405552c396ed91fc0a8eec68679eab26f94a" dependencies = [ - "lock_api", - "parking_lot_core", + "libloading", ] [[package]] -name = "parking_lot_core" -version = "0.9.12" +name = "document-features" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-link", + "litrs", ] [[package]] -name = "paste" -version = "1.0.15" +name = "downcast-rs" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] -name = "percent-encoding" -version = "2.3.2" +name = "downcast-rs" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" +checksum = "117240f60069e65410b3ae1bb213295bd828f707b5bec6596a1afc8793ce0cbc" [[package]] -name = "petgraph" -version = "0.8.3" +name = "dpi" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" -dependencies = [ - "fixedbitset", - "hashbrown 0.15.5", - "indexmap", -] +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" [[package]] -name = "phf" -version = "0.11.3" +name = "dunce" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" -dependencies = [ - "phf_macros", - "phf_shared", -] +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] -name = "phf_generator" -version = "0.11.3" +name = "earcutr" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +checksum = "79127ed59a85d7687c409e9978547cffb7dc79675355ed22da6b66fd5f6ead01" dependencies = [ - "phf_shared", - "rand", + "itertools 0.11.0", + "num-traits", ] [[package]] -name = "phf_macros" -version = "0.11.3" +name = "ecolor" +version = "0.33.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +checksum = "71ddb8ac7643d1dba1bb02110e804406dd459a838efcb14011ced10556711a8e" dependencies = [ - "phf_generator", - "phf_shared", - "proc-macro2", - "quote", - "syn", + "bytemuck", + "emath", ] [[package]] -name = "phf_shared" -version = "0.11.3" +name = "egui" +version = "0.33.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +checksum = "6a9b567d356674e9a5121ed3fedfb0a7c31e059fe71f6972b691bcd0bfc284e3" dependencies = [ - "siphasher", + "ahash", + "bitflags 2.13.0", + "emath", + "epaint", + "log", + "nohash-hasher", + "profiling", + "smallvec", + "unicode-segmentation", ] [[package]] -name = "pkg-config" -version = "0.3.32" +name = "either" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" [[package]] -name = "potential_utf" -version = "0.1.4" +name = "emath" +version = "0.33.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +checksum = "491bdf728bf25ddd9ad60d4cf1c48588fa82c013a2440b91aa7fc43e34a07c32" dependencies = [ - "zerovec", + "bytemuck", + "mint", ] [[package]] -name = "pretty_assertions" -version = "1.4.1" +name = "encase" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" +checksum = "6e3e0ff2ee0b7aa97428308dd9e1e42369cb22f5fb8dc1c55546637443a60f1e" dependencies = [ - "diff", - "yansi", + "const_panic", + "encase_derive", + "thiserror 2.0.18", ] [[package]] -name = "prettyplease" -version = "0.2.37" +name = "encase_derive" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +checksum = "a4d90c5d7d527c6cb8a3b114efd26a6304d9ab772656e73d8f4e32b1f3d601a2" +dependencies = [ + "encase_derive_impl", +] + +[[package]] +name = "encase_derive_impl" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8bad72d8308f7a382de2391ec978ddd736e0103846b965d7e2a63a75768af30" dependencies = [ "proc-macro2", + "quote", "syn", ] [[package]] -name = "proc-macro2" -version = "1.0.106" +name = "enum-map" +version = "3.0.0-beta.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +checksum = "fb2a23ad36148a32085addb3ef1aa39805d044d4532ff258360d523a4eff38e5" dependencies = [ - "unicode-ident", + "enum-map-derive", ] [[package]] -name = "quasiquote" -version = "0.1.1" +name = "enum-map-derive" +version = "1.0.0-beta.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d7f3e24436387bc9ee9963246739f2a851d9ca85ed73a2c5b878bf908e9b34d" +checksum = "44600091ce205df4f8b661e98617d49c37b2dd609e449ec82b0fb5d7b33e2eeb" dependencies = [ "proc-macro2", - "quasiquote-proc-macro", "quote", + "syn", ] [[package]] -name = "quasiquote-proc-macro" -version = "0.1.0" +name = "enum_dispatch" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79bc0a2b2a185610156579070227676cf31d6282045d01273bbfc65804df6022" +checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" dependencies = [ - "itertools 0.10.5", + "once_cell", "proc-macro2", "quote", + "syn", ] [[package]] -name = "quick-xml" -version = "0.38.4" +name = "enum_downcast" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b66c2058c55a409d601666cffe35f04333cf1013010882cec174a7467cd4e21c" +checksum = "e532035fcb0d794ae56f74a0a39fea24bca14c7d47c428e3ab0667ebdccd8b4a" dependencies = [ - "memchr", + "enum_downcast_derive", ] [[package]] -name = "quote" -version = "1.0.44" +name = "enum_downcast_derive" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +checksum = "a0e8987f91d86aa10313adf7c767a8cfd040364432d4e9f722b049b8ff7e634a" dependencies = [ "proc-macro2", + "quote", + "syn", ] [[package]] -name = "r-efi" -version = "5.3.0" +name = "epaint" +version = "0.33.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +checksum = "009d0dd3c2163823a0abdb899451ecbc78798dec545ee91b43aff1fa790bab62" +dependencies = [ + "ab_glyph", + "ahash", + "bytemuck", + "ecolor", + "emath", + "epaint_default_fonts", + "log", + "nohash-hasher", + "parking_lot", + "profiling", +] [[package]] -name = "rand" -version = "0.8.5" +name = "epaint_default_fonts" +version = "0.33.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c4fbe202b6578d3d56428fa185cdf114a05e49da05f477b3c7f0fbb221f1862" + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "erased-serde" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "d2add8a07dd6a8d93ff627029c51de145e12686fbc36ecb298ac22e74cf02dec" dependencies = [ - "rand_core", + "serde", + "serde_core", + "typeid", ] [[package]] -name = "rand_core" -version = "0.6.4" +name = "errno" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] [[package]] -name = "rawpointer" -version = "0.2.1" +name = "error-code" +version = "3.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" +checksum = "dea2df4cf52843e0452895c455a1a2cfbb842a1e7329671acf418fdc53ed4c59" [[package]] -name = "rayon" -version = "1.11.0" +name = "euclid" +version = "0.22.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" +checksum = "f1a05365e3b1c6d1650318537c7460c6923f1abdd272ad6842baa2b509957a06" dependencies = [ - "either", - "rayon-core", + "num-traits", ] [[package]] -name = "rayon-core" -version = "1.13.0" +name = "event-listener" +version = "5.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" dependencies = [ - "crossbeam-deque", - "crossbeam-utils", + "concurrent-queue", + "parking", + "pin-project-lite", ] [[package]] -name = "redox_syscall" -version = "0.5.18" +name = "event-listener-strategy" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" dependencies = [ - "bitflags", + "event-listener", + "pin-project-lite", ] [[package]] -name = "reedline" -version = "0.45.0" +name = "fastrand" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67478e45862a0c29fd99658e382c07b1b80b9c1b7d946ce6bd2e4a679141554b" -dependencies = [ - "arboard", - "chrono", - "crossterm", - "fd-lock", - "itertools 0.13.0", - "nu-ansi-term", - "serde", - "strip-ansi-escapes", - "strum", - "strum_macros", - "thiserror 2.0.18", - "unicase", - "unicode-segmentation", - "unicode-width 0.2.2", +checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" + +[[package]] +name = "fax" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caf1079563223d5d59d83c85886a56e586cfd5c1a26292e971a0fa266531ac5a" + +[[package]] +name = "fd-lock" +version = "4.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78" +dependencies = [ + "cfg-if", + "rustix 1.1.4", + "windows-sys 0.59.0", ] [[package]] -name = "regex" -version = "1.12.3" +name = "fdeflate" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", + "simd-adler32", ] [[package]] -name = "regex-automata" -version = "0.4.14" +name = "file-guard" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +checksum = "21ef72acf95ec3d7dbf61275be556299490a245f017cf084bd23b4f68cf9407c" dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", + "libc", + "winapi", ] [[package]] -name = "regex-syntax" -version = "0.8.9" +name = "find-msvc-tools" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" [[package]] -name = "rustc-stable-hash" -version = "0.1.2" +name = "fixedbitset" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "781442f29170c5c93b7185ad559492601acdc71d5bb0706f5868094f45cfcd08" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" [[package]] -name = "rustc_version" -version = "0.4.1" +name = "flate2" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" dependencies = [ - "semver", + "crc32fast", + "miniz_oxide", ] [[package]] -name = "rustix" -version = "1.1.3" +name = "float-cmp" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" +checksum = "b09cf3155332e944990140d967ff5eceb70df778b34f77d8075db46e4704e6d8" dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.61.2", + "num-traits", ] [[package]] -name = "rustversion" -version = "1.0.22" +name = "float_next_after" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" +checksum = "8bf7cc16383c4b8d58b9905a8509f02926ce3058053c056376248d958c9df1e8" [[package]] -name = "ryu" -version = "1.0.23" +name = "fnv" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] -name = "safe_arch" -version = "0.7.4" +name = "foldhash" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b02de82ddbe1b636e6170c21be622223aea188ef2e139be0a5b219ec215323" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "font-types" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39a654f404bbcbd48ea58c617c2993ee91d1cb63727a37bf2323a4edeed1b8c5" dependencies = [ "bytemuck", ] [[package]] -name = "same-file" -version = "1.0.6" +name = "font-types" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +checksum = "5b38ad915f6dadd993ced50848a8291a543bd41ca62bc10740d5e64e2ab4cfd7" dependencies = [ - "winapi-util", + "bytemuck", ] [[package]] -name = "scopeguard" -version = "1.2.0" +name = "fontconfig-parser" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +checksum = "bbc773e24e02d4ddd8395fd30dc147524273a83e54e0f312d986ea30de5f5646" +dependencies = [ + "roxmltree", +] [[package]] -name = "selen" -version = "0.15.5" +name = "fontdb" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069ccc9fbbb7f2de521452b5c96d7d898b0d2e5f49698adbcfc13914f218d3af" +checksum = "457e789b3d1202543297a350643cf459f836cade38934e7a4cf6a39e7cde2905" +dependencies = [ + "fontconfig-parser", + "log", + "memmap2", + "slotmap", + "tinyvec", + "ttf-parser", +] [[package]] -name = "semver" -version = "1.0.27" +name = "foreign-types" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] [[package]] -name = "serde" -version = "1.0.228" +name = "foreign-types-macros" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ - "serde_core", - "serde_derive", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "serde_core" -version = "1.0.228" +name = "foreign-types-shared" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ - "serde_derive", + "percent-encoding", ] [[package]] -name = "serde_derive" -version = "1.0.228" +name = "fsevent-sys" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" +dependencies = [ + "libc", +] + +[[package]] +name = "futures-channel" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" + +[[package]] +name = "futures-io" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" + +[[package]] +name = "futures-lite" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-macro" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" dependencies = [ "proc-macro2", "quote", @@ -1974,776 +3229,4818 @@ dependencies = [ ] [[package]] -name = "serde_json" -version = "1.0.149" +name = "futures-task" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" + +[[package]] +name = "futures-util" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ - "indexmap", - "itoa", - "memchr", + "futures-core", + "futures-macro", + "futures-task", + "pin-project-lite", + "slab", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "generic-array" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +dependencies = [ + "typenum", +] + +[[package]] +name = "generic-array" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f797e67af32588215eaaab8327027ee8e71b9dd0b2b26996aedf20c030fce309" +dependencies = [ + "typenum", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "geo" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3901269ec6d4f6068d3f09e5f02f995bd076398dcd1dfec407cd230b02d11b" +dependencies = [ + "earcutr", + "float_next_after", + "geo-types", + "geographiclib-rs", + "i_overlay", + "log", + "num-traits", + "rand 0.8.6", + "robust", + "rstar 0.12.2", "serde", - "serde_core", - "zmij", + "sif-itree", + "spade", ] [[package]] -name = "sha2" -version = "0.10.9" +name = "geo-types" +version = "0.7.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +checksum = "94776032c45f950d30a13af6113c2ad5625316c9abfbccee4dd5a6695f8fe0f5" dependencies = [ - "cfg-if", - "cpufeatures", - "digest", + "approx", + "num-traits", + "rstar 0.10.0", + "rstar 0.11.0", + "rstar 0.12.2", + "rstar 0.8.4", + "rstar 0.9.3", + "serde", ] [[package]] -name = "shlex" -version = "1.3.0" +name = "geographiclib-rs" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +checksum = "c5a7f08910fd98737a6eda7568e7c5e645093e073328eeef49758cfe8b0489c7" +dependencies = [ + "libm", +] [[package]] -name = "signal-hook" -version = "0.3.18" +name = "gethostname" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2" +checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" dependencies = [ - "libc", - "signal-hook-registry", + "rustix 1.1.4", + "windows-link 0.2.1", ] [[package]] -name = "signal-hook-mio" -version = "0.2.5" +name = "getrandom" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ + "cfg-if", "libc", - "mio", - "signal-hook", + "wasi", ] [[package]] -name = "signal-hook-registry" -version = "1.4.8" +name = "getrandom" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ - "errno", + "cfg-if", + "js-sys", "libc", + "r-efi 5.3.0", + "wasip2", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", + "wasip2", + "wasip3", +] + +[[package]] +name = "gilrs" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "902fb00d3f6398e635be22e5c837b303c501835cca7ac11a47bba138f7aafdd8" +dependencies = [ + "fnv", + "gilrs-core", + "log", + "uuid", + "vec_map", +] + +[[package]] +name = "gilrs-core" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc7f0ce6237abcc0523f2a5502b1e3fe5802daaae47ac14e166fe49551301ea9" +dependencies = [ + "inotify", + "js-sys", + "libc", + "libudev-sys", + "log", + "nix", + "objc2-core-foundation", + "objc2-io-kit", + "uuid", + "vec_map", + "wasm-bindgen", + "web-sys", + "windows 0.62.2", +] + +[[package]] +name = "git2" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b88256088d75a56f8ecfa070513a775dd9107f6530ef14919dac831af9cfe2b" +dependencies = [ + "bitflags 2.13.0", + "libc", + "libgit2-sys", + "log", + "openssl-probe", + "openssl-sys", + "url", +] + +[[package]] +name = "gl_generator" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" +dependencies = [ + "khronos_api", + "log", + "xml-rs", +] + +[[package]] +name = "glam" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "333928d5eb103c5d4050533cec0384302db6be8ef7d3cebd30ec6a35350353da" + +[[package]] +name = "glam" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3abb554f8ee44336b72d522e0a7fe86a29e09f839a36022fa869a7dfe941a54b" + +[[package]] +name = "glam" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4126c0479ccf7e8664c36a2d719f5f2c140fbb4f9090008098d2c291fa5b3f16" + +[[package]] +name = "glam" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01732b97afd8508eee3333a541b9f7610f454bb818669e66e90f5f57c93a776" + +[[package]] +name = "glam" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525a3e490ba77b8e326fb67d4b44b4bd2f920f44d4cc73ccec50adc68e3bee34" + +[[package]] +name = "glam" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b8509e6791516e81c1a630d0bd7fbac36d2fa8712a9da8662e716b52d5051ca" + +[[package]] +name = "glam" +version = "0.20.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f43e957e744be03f5801a55472f593d43fabdebf25a4585db250f04d86b1675f" + +[[package]] +name = "glam" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "518faa5064866338b013ff9b2350dc318e14cc4fcd6cb8206d7e7c9886c98815" + +[[package]] +name = "glam" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f597d56c1bd55a811a1be189459e8fad2bbc272616375602443bdfb37fa774" + +[[package]] +name = "glam" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e4afd9ad95555081e109fe1d21f2a30c691b5f0919c67dfa690a2e1eb6bd51c" + +[[package]] +name = "glam" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5418c17512bdf42730f9032c74e1ae39afc408745ebb2acf72fbc4691c17945" + +[[package]] +name = "glam" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151665d9be52f9bb40fc7966565d39666f2d1e69233571b71b87791c7e0528b3" + +[[package]] +name = "glam" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e05e7e6723e3455f4818c7b26e855439f7546cf617ef669d1adedb8669e5cb9" + +[[package]] +name = "glam" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "779ae4bf7e8421cf91c0b3b64e7e8b40b862fba4d393f59150042de7c4965a94" + +[[package]] +name = "glam" +version = "0.29.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8babf46d4c1c9d92deac9f7be466f76dfc4482b6452fc5024b5e8daf6ffeb3ee" + +[[package]] +name = "glam" +version = "0.30.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19fc433e8437a212d1b6f1e68c7824af3aed907da60afa994e7f542d18d12aa9" +dependencies = [ + "bytemuck", + "encase", + "libm", + "rand 0.9.4", + "serde_core", +] + +[[package]] +name = "glam" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "556f6b2ea90b8d15a74e0e7bb41671c9bdf38cd9f78c284d750b9ce58a2b5be7" + +[[package]] +name = "glam" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f70749695b063ecbf6b62949ccccde2e733ec3ecbbd71d467dca4e5c6c97cca0" + +[[package]] +name = "glob" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + +[[package]] +name = "glow" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gltf" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ce1918195723ce6ac74e80542c5a96a40c2b26162c1957a5cd70799b8cacf7" +dependencies = [ + "byteorder", + "gltf-json", + "lazy_static", + "serde_json", +] + +[[package]] +name = "gltf-derive" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14070e711538afba5d6c807edb74bcb84e5dbb9211a3bf5dea0dfab5b24f4c51" +dependencies = [ + "inflections", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "gltf-json" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6176f9d60a7eab0a877e8e96548605dedbde9190a7ae1e80bbcc1c9af03ab14" +dependencies = [ + "gltf-derive", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "glutin_wgl_sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e" +dependencies = [ + "gl_generator", +] + +[[package]] +name = "gpu-alloc" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" +dependencies = [ + "bitflags 2.13.0", + "gpu-alloc-types", +] + +[[package]] +name = "gpu-alloc-types" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" +dependencies = [ + "bitflags 2.13.0", +] + +[[package]] +name = "gpu-allocator" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd" +dependencies = [ + "log", + "presser", + "thiserror 1.0.69", + "windows 0.58.0", +] + +[[package]] +name = "gpu-descriptor" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b89c83349105e3732062a895becfc71a8f921bb71ecbbdd8ff99263e3b53a0ca" +dependencies = [ + "bitflags 2.13.0", + "gpu-descriptor-types", + "hashbrown 0.15.5", +] + +[[package]] +name = "gpu-descriptor-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" +dependencies = [ + "bitflags 2.13.0", +] + +[[package]] +name = "grid" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b40ca9252762c466af32d0b1002e91e4e1bc5398f77455e55474deb466355ff5" + +[[package]] +name = "gui" +version = "0.1.0" +dependencies = [ + "anyhow", + "bevy", + "bevy_egui", + "bevy_mod_outline", + "common_data_types", + "egui", + "interpreter", + "nalgebra", + "notify", + "oneshot", + "tempfile", + "units", +] + +[[package]] +name = "guillotiere" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62d5865c036cb1393e23c50693df631d3f5d7bcca4c04fe4cc0fd592e74a782" +dependencies = [ + "euclid", + "svg_fmt", +] + +[[package]] +name = "half" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" +dependencies = [ + "cfg-if", + "crunchy", + "num-traits", + "zerocopy", +] + +[[package]] +name = "harfrust" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0caaee032384c10dd597af4579c67dee16650d862a9ccbe1233ff1a379abc07" +dependencies = [ + "bitflags 2.13.0", + "bytemuck", + "core_maths", + "read-fonts 0.36.0", + "smallvec", +] + +[[package]] +name = "hash32" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4041af86e63ac4298ce40e5cca669066e75b6f1aa3390fe2561ffa5e1d9f4cc" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hash32" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashable-map" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46ab77e35afc7a5a3087e72e8e93a90a226a78f62c5f4dceaeb3d7ef5decdccb" +dependencies = [ + "serde", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash 0.1.5", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash 0.2.0", + "serde", + "serde_core", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" + +[[package]] +name = "heapless" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634bd4d29cbf24424d0a4bfcbf80c6960129dc24424752a7d1d1390607023422" +dependencies = [ + "as-slice", + "generic-array 0.14.7", + "hash32 0.1.1", + "stable_deref_trait", +] + +[[package]] +name = "heapless" +version = "0.7.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" +dependencies = [ + "atomic-polyfill", + "hash32 0.2.1", + "rustc_version", + "spin 0.9.8", + "stable_deref_trait", +] + +[[package]] +name = "heapless" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" +dependencies = [ + "hash32 0.3.1", + "stable_deref_trait", +] + +[[package]] +name = "heapless" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25ba4bd83f9415b58b4ed8dc5714c76e626a105be4646c02630ad730ad3b5aa4" +dependencies = [ + "hash32 0.3.1", + "portable-atomic", + "stable_deref_trait", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hexasphere" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29a164ceff4500f2a72b1d21beaa8aa8ad83aec2b641844c659b190cb3ea2e0b" +dependencies = [ + "constgebra", + "glam 0.30.10", + "tinyvec", +] + +[[package]] +name = "hexf-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" + +[[package]] +name = "i_float" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "010025c2c532c8d82e42d0b8bb5184afa449fa6f06c709ea9adcb16c49ae405b" +dependencies = [ + "libm", +] + +[[package]] +name = "i_key_sort" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9190f86706ca38ac8add223b2aed8b1330002b5cdbbce28fb58b10914d38fc27" + +[[package]] +name = "i_overlay" +version = "4.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413183068e6e0289e18d7d0a1f661b81546e6918d5453a44570b9ab30cbed1b3" +dependencies = [ + "i_float", + "i_key_sort", + "i_shape", + "i_tree", +] + +[[package]] +name = "i_shape" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ea154b742f7d43dae2897fcd5ead86bc7b5eefcedd305a7ebf9f69d44d61082" +dependencies = [ + "i_float", +] + +[[package]] +name = "i_tree" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35e6d558e6d4c7b82bc51d9c771e7a927862a161a7d87bf2b0541450e0e20915" + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core 0.62.2", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" + +[[package]] +name = "icu_properties" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" + +[[package]] +name = "icu_provider" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "image" +version = "0.25.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" +dependencies = [ + "bytemuck", + "byteorder-lite", + "moxcms", + "num-traits", + "png", + "tiff", +] + +[[package]] +name = "imstr" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d3441deb04ea9c6b472f313be54d585428cd6a68cdb8dcf40cf43744bec78fe" + +[[package]] +name = "indexmap" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +dependencies = [ + "equivalent", + "hashbrown 0.17.1", + "serde", + "serde_core", +] + +[[package]] +name = "inflections" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a257582fdcde896fd96463bf2d40eefea0580021c0712a0e2b028b60b47a837a" + +[[package]] +name = "inotify" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "533e68a5842e734946fe159fb03fc9bbbb254f590dd0d8ad321ae5ff7beca2c1" +dependencies = [ + "bitflags 2.13.0", + "inotify-sys", + "libc", +] + +[[package]] +name = "inotify-sys" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" +dependencies = [ + "libc", +] + +[[package]] +name = "interpolation" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9c13ae9d91148fcb4aab6654c4c2a7d02a15395ea9e23f65170f175f8b269ce" + +[[package]] +name = "interpreter" +version = "0.1.0" +dependencies = [ + "ariadne", + "boolmesh", + "ciborium", + "common_data_types", + "enum_dispatch", + "enum_downcast", + "file-guard", + "geo", + "hashable-map", + "hex", + "imstr", + "indexmap", + "itertools 0.14.0", + "levenshtein", + "nalgebra", + "nom 8.0.0", + "num-traits", + "paste", + "pretty_assertions", + "rayon", + "selen", + "serde", + "sha2", + "stack", + "stl_io", + "svg", + "tempfile", + "thiserror 2.0.18", + "tree-sitter", + "tree-sitter-command-cad-model", + "type-sitter", + "type-sitter-gen 0.8.1", + "units", + "unwrap-enum", +] + +[[package]] +name = "inventory" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4f0c30c76f2f4ccee3fe55a2435f691ca00c0e4bd87abe4f4a851b1d4dac39b" +dependencies = [ + "rustversion", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys 0.3.1", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys 0.4.1", + "log", + "simd_cesu8", + "thiserror 2.0.18", + "walkdir", + "windows-link 0.2.1", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn", +] + +[[package]] +name = "jni-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom 0.3.4", + "libc", +] + +[[package]] +name = "join-lazy-fmt" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e90f66baf362a8a5ce2ca820290fbede0572a76fabf8408bc68c02f9ad1d03bf" + +[[package]] +name = "js-sys" +version = "0.3.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "142bc4740e452c1e57ade0cbc129f139c9093e354346f0872ef985f4f5cf5f11" +dependencies = [ + "cfg-if", + "futures-util", + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "khronos-egl" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" +dependencies = [ + "libc", + "libloading", + "pkg-config", +] + +[[package]] +name = "khronos_api" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" + +[[package]] +name = "kqueue" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "273c0752728918e0ac4976f2b275b6fefb9ecd400585dec929419f3844cd87b5" +dependencies = [ + "kqueue-sys", + "libc", +] + +[[package]] +name = "kqueue-sys" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07293a4e297ac234359b510362495713f75ea345d5307140414f20c69ffeb087" +dependencies = [ + "bitflags 2.13.0", + "libc", +] + +[[package]] +name = "ktx2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff7f53bdf698e7aa7ec916411bbdc8078135da11b66db5182675b2227f6c0d07" +dependencies = [ + "bitflags 2.13.0", +] + +[[package]] +name = "lazy-regex" +version = "3.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bae91019476d3ec7147de9aa291cadb6d870abf2f3015d2da73a90325ac1496" +dependencies = [ + "lazy-regex-proc_macros", + "once_cell", + "regex", +] + +[[package]] +name = "lazy-regex-proc_macros" +version = "3.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4de9c1e1439d8b7b3061b2d209809f447ca33241733d9a3c01eabf2dc8d94358" +dependencies = [ + "proc-macro2", + "quote", + "regex", + "syn", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + +[[package]] +name = "levenshtein" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db13adb97ab515a3691f56e4dbab09283d0b86cb45abd991d8634a9d6f501760" + +[[package]] +name = "lewton" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "777b48df9aaab155475a83a7df3070395ea1ac6902f5cd062b8f2b028075c030" +dependencies = [ + "byteorder", + "ogg", + "tinyvec", +] + +[[package]] +name = "libc" +version = "0.2.186" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" + +[[package]] +name = "libgit2-sys" +version = "0.18.5+1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "005d6ae6eac1912906073e069f7db60b1fa98e052a68227824afe3e3a1c59ca2" +dependencies = [ + "cc", + "libc", + "libssh2-sys", + "libz-sys", + "openssl-sys", + "pkg-config", +] + +[[package]] +name = "libloading" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +dependencies = [ + "cfg-if", + "windows-link 0.2.1", +] + +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + +[[package]] +name = "libredox" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f02ab6bace2054fb888a3c16f990117b579d14a3088e472d63c6011fa185c9d3" +dependencies = [ + "bitflags 2.13.0", + "libc", + "plain", + "redox_syscall 0.8.1", +] + +[[package]] +name = "libssh2-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "220e4f05ad4a218192533b300327f5150e809b54c4ec83b5a1d91833601811b9" +dependencies = [ + "cc", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "libudev-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c8469b4a23b962c1396b9b451dda50ef5b283e8dd309d69033475fa9b334324" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "libz-sys" +version = "1.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85bc9657773828b90eeb625adff10eeac83cc21bbfd8e23a03eaa8a33c9e28d9" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linebender_resource_handle" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" + +[[package]] +name = "litrs" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "953f07c43838f8e6f9758cab68bf5bed85465e7587ebe0b823f1bcd81978ad3a" + +[[package]] +name = "logos" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff472f899b4ec2d99161c51f60ff7075eeb3097069a36050d8037a6325eb8154" +dependencies = [ + "logos-derive", +] + +[[package]] +name = "logos-codegen" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "192a3a2b90b0c05b27a0b2c43eecdb7c415e29243acc3f89cc8247a5b693045c" +dependencies = [ + "beef", + "fnv", + "lazy_static", + "proc-macro2", + "quote", + "regex-syntax", + "rustc_version", + "syn", +] + +[[package]] +name = "logos-derive" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "605d9697bcd5ef3a42d38efc51541aa3d6a4a25f7ab6d1ed0da5ac632a26b470" +dependencies = [ + "logos-codegen", +] + +[[package]] +name = "mach2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d640282b302c0bb0a2a8e0233ead9035e3bed871f0b7e81fe4a1ec829765db44" +dependencies = [ + "libc", +] + +[[package]] +name = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + +[[package]] +name = "matchers" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "matrixmultiply" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06de3016e9fae57a36fd14dba131fccf49f74b40b7fbdb472f96e361ec71a08" +dependencies = [ + "autocfg", + "rawpointer", +] + +[[package]] +name = "memchr" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b947ae49db0d222b1dbc6b113ce7248a3fc3a6ca21b696717bfc000ba4484d8" + +[[package]] +name = "memmap2" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3" +dependencies = [ + "libc", +] + +[[package]] +name = "metal" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00c15a6f673ff72ddcc22394663290f870fb224c1bfce55734a75c414150e605" +dependencies = [ + "bitflags 2.13.0", + "block", + "core-graphics-types 0.2.0", + "foreign-types", + "log", + "objc", + "paste", +] + +[[package]] +name = "minimad" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8b688969b16915f3ecadc7829d5b7779dee4977e503f767f34136803d5c06f" +dependencies = [ + "once_cell", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mint" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e53debba6bda7a793e5f99b8dacf19e626084f525f7829104ba9898f367d85ff" + +[[package]] +name = "mio" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "moxcms" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b" +dependencies = [ + "num-traits", + "pxfm", +] + +[[package]] +name = "naga" +version = "27.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "066cf25f0e8b11ee0df221219010f213ad429855f57c494f995590c861a9a7d8" +dependencies = [ + "arrayvec", + "bit-set", + "bitflags 2.13.0", + "cfg-if", + "cfg_aliases", + "codespan-reporting", + "half", + "hashbrown 0.16.1", + "hexf-parse", + "indexmap", + "libm", + "log", + "num-traits", + "once_cell", + "pp-rs", + "rustc-hash 1.1.0", + "spirv", + "thiserror 2.0.18", + "unicode-ident", +] + +[[package]] +name = "naga_oil" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "310c347db1b30e69581f3b84dc9a5c311ed583f67851b39b77953cb7a066c97f" +dependencies = [ + "codespan-reporting", + "data-encoding", + "indexmap", + "naga", + "regex", + "rustc-hash 1.1.0", + "thiserror 2.0.18", + "tracing", + "unicode-ident", +] + +[[package]] +name = "nalgebra" +version = "0.34.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df76ea0ff5c7e6b88689085804d6132ded0ddb9de5ca5b8aeb9eeadc0508a70a" +dependencies = [ + "approx", + "bytemuck", + "glam 0.14.0", + "glam 0.15.2", + "glam 0.16.0", + "glam 0.17.3", + "glam 0.18.0", + "glam 0.19.0", + "glam 0.20.5", + "glam 0.21.3", + "glam 0.22.0", + "glam 0.23.0", + "glam 0.24.2", + "glam 0.25.0", + "glam 0.27.0", + "glam 0.28.0", + "glam 0.29.3", + "glam 0.30.10", + "glam 0.31.1", + "glam 0.32.1", + "matrixmultiply", + "nalgebra-macros", + "num-complex", + "num-rational", + "num-traits", + "serde", + "simba", + "typenum", +] + +[[package]] +name = "nalgebra-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "973e7178a678cfd059ccec50887658d482ce16b0aa9da3888ddeab5cd5eb4889" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "ndk" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" +dependencies = [ + "bitflags 2.13.0", + "jni-sys 0.3.1", + "log", + "ndk-sys 0.5.0+25.2.9519653", + "num_enum", + "thiserror 1.0.69", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.13.0", + "jni-sys 0.3.1", + "log", + "ndk-sys 0.6.0+11769913", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.5.0+25.2.9519653" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "nix" +version = "0.31.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" +dependencies = [ + "bitflags 2.13.0", + "cfg-if", + "cfg_aliases", + "libc", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nom" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" +dependencies = [ + "memchr", +] + +[[package]] +name = "nonmax" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "610a5acd306ec67f907abe5567859a3c693fb9886eb1f012ab8f2a47bef3db51" + +[[package]] +name = "notify" +version = "8.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3" +dependencies = [ + "bitflags 2.13.0", + "fsevent-sys", + "inotify", + "kqueue", + "libc", + "log", + "mio", + "notify-types", + "walkdir", + "windows-sys 0.60.2", +] + +[[package]] +name = "notify-types" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42b8cfee0e339a0337359f3c88165702ac6e600dc01c0cc9579a92d62b08477a" +dependencies = [ + "bitflags 2.13.0", +] + +[[package]] +name = "ntapi" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3b335231dfd352ffb0f8017f3b6027a4917f7df785ea2143d8af2adc66980ae" +dependencies = [ + "winapi", +] + +[[package]] +name = "nu-ansi-term" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", + "serde", +] + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", +] + +[[package]] +name = "objc-sys" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" + +[[package]] +name = "objc2" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" +dependencies = [ + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f" +dependencies = [ + "objc2-encode", +] + +[[package]] +name = "objc2-app-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.13.0", + "block2 0.5.1", + "libc", + "objc2 0.5.2", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation 0.2.2", + "objc2-quartz-core", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" +dependencies = [ + "bitflags 2.13.0", + "objc2 0.6.4", + "objc2-core-graphics", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +dependencies = [ + "bitflags 2.13.0", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-core-location", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.13.0", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.13.0", + "dispatch2", + "objc2 0.6.4", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags 2.13.0", + "dispatch2", + "objc2 0.6.4", + "objc2-core-foundation", + "objc2-io-surface", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", + "objc2-metal", +] + +[[package]] +name = "objc2-core-location" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.2", + "objc2-contacts", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-foundation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.13.0", + "block2 0.5.1", + "dispatch", + "libc", + "objc2 0.5.2", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.13.0", + "objc2 0.6.4", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" +dependencies = [ + "bitflags 2.13.0", + "libc", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags 2.13.0", + "objc2 0.6.4", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-link-presentation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.13.0", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.13.0", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", + "objc2-metal", +] + +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2 0.5.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.13.0", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-image", + "objc2-core-location", + "objc2-foundation 0.2.2", + "objc2-link-presentation", + "objc2-quartz-core", + "objc2-symbols", + "objc2-uniform-type-identifiers", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.13.0", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-core-location", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "oboe" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8b61bebd49e5d43f5f8cc7ee2891c16e0f41ec7954d36bcb6c14c5e0de867fb" +dependencies = [ + "jni 0.21.1", + "ndk 0.8.0", + "ndk-context", + "num-derive", + "num-traits", + "oboe-sys", +] + +[[package]] +name = "oboe-sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8bb09a4a2b1d668170cfe0a7d5bc103f8999fb316c98099b6a9939c9f2e79d" +dependencies = [ + "cc", +] + +[[package]] +name = "offset-allocator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e234d535da3521eb95106f40f0b73483d80bfb3aacf27c40d7e2b72f1a3e00a2" +dependencies = [ + "log", + "nonmax", +] + +[[package]] +name = "ogg" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6951b4e8bf21c8193da321bcce9c9dd2e13c858fe078bf9054a288b419ae5d6e" +dependencies = [ + "byteorder", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "oneshot" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe21416a02c693fb9f980befcb230ecc70b0b3d1cc4abf88b9675c4c1457f0c" + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "openssl-sys" +version = "0.9.116" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28a22dc7140cda5f096e5e7724a6962ca81a7f8bfd2979f9b18c11af56318c4" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "orbclient" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5df339f526ea9a60e371768d50efc2f2508c7203290731565d1f7a6f71d21747" +dependencies = [ + "libc", + "libredox", +] + +[[package]] +name = "ordered-float" +version = "4.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bb71e1b3fa6ca1c61f383464aaf2bb0e2f8e772a1f01d486832464de363b951" +dependencies = [ + "num-traits", +] + +[[package]] +name = "ordered-float" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7d950ca161dc355eaf28f82b11345ed76c6e1f6eb1f4f4479e0323b9e2fbd0e" +dependencies = [ + "num-traits", +] + +[[package]] +name = "os_pipe" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "owned_ttf_parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" +dependencies = [ + "ttf-parser", +] + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.18", + "smallvec", + "windows-link 0.2.1", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pdqselect" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec91767ecc0a0bbe558ce8c9da33c068066c57ecc8bb8477ef8c1ad3ef77c27" + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "petgraph" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" +dependencies = [ + "fixedbitset", + "hashbrown 0.15.5", + "indexmap", + "serde", + "serde_derive", +] + +[[package]] +name = "phf" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +dependencies = [ + "phf_macros", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +dependencies = [ + "phf_shared", + "rand 0.8.6", +] + +[[package]] +name = "phf_macros" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "phf_shared" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "piper" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + +[[package]] +name = "pkg-config" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags 2.13.0", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix 1.1.4", + "windows-sys 0.61.2", +] + +[[package]] +name = "portable-atomic" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" + +[[package]] +name = "portable-atomic-util" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "potential_utf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +dependencies = [ + "zerovec", +] + +[[package]] +name = "pp-rs" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb458bb7f6e250e6eb79d5026badc10a3ebb8f9a15d1fff0f13d17c71f4d6dee" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "presser" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" + +[[package]] +name = "pretty_assertions" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" +dependencies = [ + "diff", + "yansi", +] + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit 0.25.12+spec-1.1.0", +] + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "profiling" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5" + +[[package]] +name = "pxfm" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0c5ccf5294c6ccd63a74f1565028353830a9c2f5eb0c682c355c471726a6e3f" + +[[package]] +name = "quasiquote" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d7f3e24436387bc9ee9963246739f2a851d9ca85ed73a2c5b878bf908e9b34d" +dependencies = [ + "proc-macro2", + "quasiquote-proc-macro", + "quote", +] + +[[package]] +name = "quasiquote-proc-macro" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79bc0a2b2a185610156579070227676cf31d6282045d01273bbfc65804df6022" +dependencies = [ + "itertools 0.10.5", + "proc-macro2", + "quote", +] + +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + +[[package]] +name = "quick-xml" +version = "0.39.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdcc8dd4e2f670d309a5f0e83fe36dfdc05af317008fea29144da1a2ac858e5e" +dependencies = [ + "memchr", +] + +[[package]] +name = "quote" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "radsort" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "019b4b213425016d7d84a153c4c73afb0946fbb4840e4eece7ba8848b9d6da22" + +[[package]] +name = "rand" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "rand_distr" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8615d50dcf34fa31f7ab52692afec947c4dd0ab803cc87cb3b0b4570ff7463" +dependencies = [ + "num-traits", + "rand 0.9.4", +] + +[[package]] +name = "range-alloc" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08" + +[[package]] +name = "rangemap" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "973443cf09a9c8656b574a866ab68dfa19f0867d0340648c7d2f6a71b8a8ea68" + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + +[[package]] +name = "rayon" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "read-fonts" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eaa2941a4c05443ee3a7b26ab076a553c343ad5995230cc2b1d3e993bdc6345" +dependencies = [ + "bytemuck", + "core_maths", + "font-types 0.10.1", +] + +[[package]] +name = "read-fonts" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b634fabf032fab15307ffd272149b622260f55974d9fad689292a5d33df02e5" +dependencies = [ + "bytemuck", + "font-types 0.11.3", +] + +[[package]] +name = "rectangle-pack" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0d463f2884048e7153449a55166f91028d5b0ea53c79377099ce4e8cf0cf9bb" + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.13.0", +] + +[[package]] +name = "redox_syscall" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b44b894f2a6e36457d665d1e08c3866add6ed5e70050c1b4ba8a8ddedb02ce7" +dependencies = [ + "bitflags 2.13.0", +] + +[[package]] +name = "reedline" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67478e45862a0c29fd99658e382c07b1b80b9c1b7d946ce6bd2e4a679141554b" +dependencies = [ + "arboard", + "chrono", + "crossterm", + "fd-lock", + "itertools 0.13.0", + "nu-ansi-term", + "serde", + "strip-ansi-escapes", + "strum", + "strum_macros", + "thiserror 2.0.18", + "unicase", + "unicode-segmentation", + "unicode-width 0.2.2", +] + +[[package]] +name = "regex" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" + +[[package]] +name = "renderdoc-sys" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" + +[[package]] +name = "robust" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e27ee8bb91ca0adcf0ecb116293afa12d393f9c2b9b9cd54d33e8078fe19839" + +[[package]] +name = "rodio" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ceb6607dd738c99bc8cb28eff249b7cd5c8ec88b9db96c0608c1480d140fb1" +dependencies = [ + "cpal", + "lewton", +] + +[[package]] +name = "ron" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4147b952f3f819eca0e99527022f7d6a8d05f111aeb0a62960c74eb283bec8fc" +dependencies = [ + "bitflags 2.13.0", + "once_cell", + "serde", + "serde_derive", + "typeid", + "unicode-ident", +] + +[[package]] +name = "roxmltree" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" + +[[package]] +name = "rstar" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a45c0e8804d37e4d97e55c6f258bc9ad9c5ee7b07437009dd152d764949a27c" +dependencies = [ + "heapless 0.6.1", + "num-traits", + "pdqselect", + "serde", + "smallvec", +] + +[[package]] +name = "rstar" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b40f1bfe5acdab44bc63e6699c28b74f75ec43afb59f3eda01e145aff86a25fa" +dependencies = [ + "heapless 0.7.17", + "num-traits", + "serde", + "smallvec", +] + +[[package]] +name = "rstar" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f39465655a1e3d8ae79c6d9e007f4953bfc5d55297602df9dc38f9ae9f1359a" +dependencies = [ + "heapless 0.7.17", + "num-traits", + "serde", + "smallvec", +] + +[[package]] +name = "rstar" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73111312eb7a2287d229f06c00ff35b51ddee180f017ab6dec1f69d62ac098d6" +dependencies = [ + "heapless 0.7.17", + "num-traits", + "serde", + "smallvec", +] + +[[package]] +name = "rstar" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "421400d13ccfd26dfa5858199c30a5d76f9c54e0dba7575273025b43c5175dbb" +dependencies = [ + "heapless 0.8.0", + "num-traits", + "serde", + "smallvec", +] + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hash" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" + +[[package]] +name = "rustc-stable-hash" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "781442f29170c5c93b7185ad559492601acdc71d5bb0706f5868094f45cfcd08" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.13.0", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +dependencies = [ + "bitflags 2.13.0", + "errno", + "libc", + "linux-raw-sys 0.12.1", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ruzstd" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7c1c839d570d835527c9a5e4db7cb2198683a988cb9d7293fc8674e6bd58fc8" +dependencies = [ + "twox-hash", +] + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "safe_arch" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b02de82ddbe1b636e6170c21be622223aea188ef2e139be0a5b219ec215323" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sctk-adwaita" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" +dependencies = [ + "ab_glyph", + "log", + "memmap2", + "smithay-client-toolkit", + "tiny-skia", +] + +[[package]] +name = "selen" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "069ccc9fbbb7f2de521452b5c96d7d898b0d2e5f49698adbcfc13914f218d3af" + +[[package]] +name = "self_cell" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b12e76d157a900eb52e81bc6e9f3069344290341720e9178cde2407113ac8d89" + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.150" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" +dependencies = [ + "indexmap", + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "sif-itree" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7f45b8998ced5134fb1d75732c77842a3e888f19c1ff98481822e8fbfbf930b" + +[[package]] +name = "signal-hook" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-mio" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc" +dependencies = [ + "libc", + "mio", + "signal-hook", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "simba" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c99284beb21666094ba2b75bbceda012e610f5479dfcc2d6e2426f53197ffd95" +dependencies = [ + "approx", + "num-complex", + "num-traits", + "paste", + "wide", +] + +[[package]] +name = "simd-adler32" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" + +[[package]] +name = "simd_cesu8" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94f90157bb87cddf702797c5dadfa0be7d266cdf49e22da2fcaa32eff75b2c33" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "siphasher" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" + +[[package]] +name = "skrifa" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9eb0b904a04d09bd68c65d946617b8ff733009999050f3b851c32fb3cfb60e" +dependencies = [ + "bytemuck", + "read-fonts 0.36.0", +] + +[[package]] +name = "skrifa" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fbdfe3d2475fbd7ddd1f3e5cf8288a30eb3e5f95832829570cd88115a7434ac" +dependencies = [ + "bytemuck", + "read-fonts 0.37.0", +] + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "slice-group-by" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" + +[[package]] +name = "slotmap" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038" +dependencies = [ + "version_check", +] + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "smithay-client-toolkit" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" +dependencies = [ + "bitflags 2.13.0", + "calloop", + "calloop-wayland-source", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix 0.38.44", + "thiserror 1.0.69", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smol_str" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" +dependencies = [ + "serde", +] + +[[package]] +name = "spade" +version = "2.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9699399fd9349b00b184f5635b074f9ec93afffef30c853f8c875b32c0f8c7fa" +dependencies = [ + "hashbrown 0.16.1", + "num-traits", + "robust", + "smallvec", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spin" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fe4ccb98d9c292d56fec89a5e07da7fc4cf0dc11e156b41793132775d3e591" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "spirv" +version = "0.3.0+sdk-1.3.268.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" +dependencies = [ + "bitflags 2.13.0", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "stack" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c27dee130f751c0903be703c5355e9b333a17550d7d63d04cf0d3b1601edb8a3" +dependencies = [ + "coalesce", +] + +[[package]] +name = "stackfuture" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115beb9c69db2393ff10b75a1b8587a51716e5551d015001e55320ed279d32f9" +dependencies = [ + "const_panic", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "stl_io" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da63e75b86345156b191c021b3ce2a13b973941ecdb8c70d6f00cbbfe0076ed7" +dependencies = [ + "byteorder", + "float-cmp", +] + +[[package]] +name = "streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520" + +[[package]] +name = "strict" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f42444fea5b87a39db4218d9422087e66a85d0e7a0963a439b07bcdf91804006" + +[[package]] +name = "strict-num" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" + +[[package]] +name = "strip-ansi-escapes" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a8f8038e7e7969abb3f1b7c2a811225e9296da208539e0f79c5251d6cac0025" +dependencies = [ + "vte", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn", +] + +[[package]] +name = "svg" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94afda9cd163c04f6bee8b4bf2501c91548deae308373c436f36aeff3cf3c4a3" + +[[package]] +name = "svg_fmt" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0193cc4331cfd2f3d2011ef287590868599a2f33c3e69bc22c1a3d3acf9e02fb" + +[[package]] +name = "swash" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "842f3cd369c2ba38966204f983eaa5e54a8e84a7d7159ed36ade2b6c335aae64" +dependencies = [ + "skrifa 0.40.0", + "yazi", + "zeno", +] + +[[package]] +name = "syn" +version = "2.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "sys-locale" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eab9a99a024a169fe8a903cf9d4a3b3601109bcc13bd9e3c6fff259138626c4" +dependencies = [ + "libc", +] + +[[package]] +name = "sysinfo" +version = "0.37.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16607d5caffd1c07ce073528f9ed972d88db15dd44023fa57142963be3feb11f" +dependencies = [ + "libc", + "memchr", + "ntapi", + "objc2-core-foundation", + "objc2-io-kit", + "windows 0.61.3", +] + +[[package]] +name = "taffy" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41ba83ebaf2954d31d05d67340fd46cebe99da2b7133b0dd68d70c65473a437b" +dependencies = [ + "arrayvec", + "grid", + "serde", + "slotmap", +] + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.2", + "once_cell", + "rustix 1.1.4", + "windows-sys 0.61.2", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "termimad" +version = "0.34.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "889a9370996b74cf46016ce35b96c248a9ac36d69aab1d112b3e09bc33affa49" +dependencies = [ + "coolor", + "crokey", + "crossbeam", + "lazy-regex", + "minimad", + "serde", + "thiserror 2.0.18", + "unicode-width 0.1.14", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +dependencies = [ + "thiserror-impl 2.0.18", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "tiff" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63feaf3343d35b6ca4d50483f94843803b0f51634937cc2ec519fc32232bc52" +dependencies = [ + "fax", + "flate2", + "half", + "quick-error", + "weezl", + "zune-jpeg", +] + +[[package]] +name = "tiny-skia" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if", + "log", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + +[[package]] +name = "tinystr" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "toml_datetime" +version = "0.7.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_datetime" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.23.10+spec-1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" +dependencies = [ + "indexmap", + "toml_datetime 0.7.5+spec-1.1.0", + "toml_parser", + "winnow 0.7.15", +] + +[[package]] +name = "toml_edit" +version = "0.25.12+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2153edc6955a6c354fad8f5efd38b6a8769bdccf9fe50f8e1329f81b0baa5d7" +dependencies = [ + "indexmap", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "winnow 1.0.3", +] + +[[package]] +name = "toml_parser" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" +dependencies = [ + "winnow 1.0.3", +] + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-oslog" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d76902d2a8d5f9f55a81155c08971734071968c90f2d9bfe645fe700579b2950" +dependencies = [ + "cc", + "cfg-if", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex-automata", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "tracing-wasm" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4575c663a174420fa2d78f4108ff68f65bf2fbb7dd89f33749b6e826b3626e07" +dependencies = [ + "tracing", + "tracing-subscriber", + "wasm-bindgen", +] + +[[package]] +name = "tree-sitter" +version = "0.25.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78f873475d258561b06f1c595d93308a7ed124d9977cb26b148c2084a4a3cc87" +dependencies = [ + "cc", + "regex", + "regex-syntax", + "serde_json", + "streaming-iterator", + "tree-sitter-language", +] + +[[package]] +name = "tree-sitter-command-cad-model" +version = "0.0.1" +dependencies = [ + "cc", + "tree-sitter", +] + +[[package]] +name = "tree-sitter-language" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "009994f150cc0cd50ff54917d5bc8bffe8cad10ca10d81c34da2ec421ae61782" + +[[package]] +name = "tree_magic_mini" +version = "3.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8765b90061cba6c22b5831f675da109ae5561588290f9fa2317adab2714d5a6" +dependencies = [ + "memchr", + "nom 8.0.0", + "petgraph", +] + +[[package]] +name = "ttf-parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" +dependencies = [ + "core_maths", +] + +[[package]] +name = "twox-hash" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea3136b675547379c4bd395ca6b938e5ad3c3d20fad76e7fe85f9e0d011419c" + +[[package]] +name = "type-sitter" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d7b6c3bc4c60ecee2147ecb3cd7820fe9ee1df4251e1b2b8b5a214fe0084ba" +dependencies = [ + "type-sitter-lib", + "type-sitter-proc", +] + +[[package]] +name = "type-sitter-gen" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95ad6a9e8aa527b2c037cd5016d6291e197c98eb6160ff09b25f2398374a3003" +dependencies = [ + "cc", + "check_keyword", + "convert_case 0.8.0", + "dunce", + "enum-map", + "join-lazy-fmt", + "libc", + "libloading", + "logos", + "prettyplease", + "proc-macro2", + "quote", + "rustc-stable-hash", + "serde", + "serde_json", + "slice-group-by", + "syn", + "tree-sitter", + "tree-sitter-language", + "walkdir", +] + +[[package]] +name = "type-sitter-gen" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2672c36a09a0150c5f18d34ac5b8146e43d1903ba604a12e4f1d762e1b4aaed1" +dependencies = [ + "cc", + "check_keyword", + "convert_case 0.8.0", + "dunce", + "enum-map", + "join-lazy-fmt", + "libc", + "libloading", + "logos", + "prettyplease", + "proc-macro2", + "quote", + "rustc-stable-hash", + "serde", + "serde_json", + "slice-group-by", + "syn", + "tree-sitter", + "tree-sitter-language", + "walkdir", +] + +[[package]] +name = "type-sitter-lib" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7744972e54c4e99eaf0e21be3b0dbe6b79dfb2cffe096c51beed34eca3aa760f" +dependencies = [ + "streaming-iterator", + "tree-sitter", +] + +[[package]] +name = "type-sitter-proc" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6949e1b4d86caf378ae59b9a74b7b8ff29e935b4793bbcdcfb573eac97856624" +dependencies = [ + "syn", + "type-sitter-gen 0.9.0", +] + +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "typewit" +version = "1.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "214ca0b2191785cbc06209b9ca1861e048e39b5ba33574b3cedd58363d5bb5f6" + +[[package]] +name = "uneval" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63cc5d2fd8648d7e2be86098f60c9ece7045cc710b3c1e226910e2f37d11dc73" +dependencies = [ + "serde", + "thiserror 1.0.69", +] + +[[package]] +name = "unicase" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" + +[[package]] +name = "unicode-bidi" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unicode-linebreak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" + +[[package]] +name = "unicode-script" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "383ad40bb927465ec0ce7720e033cb4ca06912855fc35db31b5755d0de75b1ee" + +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "units" +version = "0.1.0" +dependencies = [ + "common_data_types", + "csv", + "serde", + "uneval", +] + +[[package]] +name = "unwrap-enum" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5639235db46432e23bff2caf3a02096d9a801c99560198f3edba4edf8d015a5" +dependencies = [ + "unwrap-enum-proc-macro", +] + +[[package]] +name = "unwrap-enum-proc-macro" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5771812808a3442129fa6c692ecb4ae77e690b530598854af2be0fda01657a94" +dependencies = [ + "proc-macro2", + "quasiquote", + "quote", + "syn", ] [[package]] -name = "simba" -version = "0.9.1" +name = "url" +version = "2.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c99284beb21666094ba2b75bbceda012e610f5479dfcc2d6e2426f53197ffd95" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" dependencies = [ - "approx", - "num-complex", - "num-traits", - "paste", - "wide", + "form_urlencoded", + "idna", + "percent-encoding", + "serde", ] [[package]] -name = "siphasher" -version = "1.0.2" +name = "utf8_iter" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] -name = "slice-group-by" -version = "0.3.1" +name = "utf8parse" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] -name = "smallvec" -version = "1.15.1" +name = "uuid" +version = "1.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +checksum = "d258b83ceec21034727ecee8c382cfa6c3e133699b0742c64571814fb420c9f7" +dependencies = [ + "getrandom 0.4.2", + "js-sys", + "serde_core", + "wasm-bindgen", +] [[package]] -name = "stable_deref_trait" -version = "1.2.1" +name = "valuable" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] -name = "stack" -version = "0.4.0" +name = "variadics_please" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c27dee130f751c0903be703c5355e9b333a17550d7d63d04cf0d3b1601edb8a3" +checksum = "41b6d82be61465f97d42bd1d15bf20f3b0a3a0905018f38f9d6f6962055b0b5c" dependencies = [ - "coalesce", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "stl_io" -version = "0.10.0" +name = "vcpkg" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da63e75b86345156b191c021b3ce2a13b973941ecdb8c70d6f00cbbfe0076ed7" -dependencies = [ - "byteorder", - "float-cmp", -] +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] -name = "streaming-iterator" -version = "0.1.9" +name = "vec_map" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] -name = "strict" -version = "0.2.0" +name = "version_check" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f42444fea5b87a39db4218d9422087e66a85d0e7a0963a439b07bcdf91804006" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] -name = "strip-ansi-escapes" -version = "0.2.1" +name = "vte" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a8f8038e7e7969abb3f1b7c2a811225e9296da208539e0f79c5251d6cac0025" +checksum = "231fdcd7ef3037e8330d8e17e61011a2c244126acc0a982f4040ac3f9f0bc077" dependencies = [ - "vte", + "memchr", ] [[package]] -name = "strsim" -version = "0.11.1" +name = "walkdir" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] [[package]] -name = "strum" -version = "0.26.3" +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] -name = "strum_macros" -version = "0.26.4" +name = "wasip2" +version = "1.0.3+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn", + "wit-bindgen 0.57.1", ] [[package]] -name = "syn" -version = "2.0.117" +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "wit-bindgen 0.51.0", ] [[package]] -name = "synstructure" -version = "0.13.2" +name = "wasm-bindgen" +version = "0.2.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +checksum = "3ed04576f974d2b2fba0f38c51dbc5518011e38c36bf1143164be765528fd409" dependencies = [ - "proc-macro2", - "quote", - "syn", + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", ] [[package]] -name = "tempfile" -version = "3.25.0" +name = "wasm-bindgen-futures" +version = "0.4.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0136791f7c95b1f6dd99f9cc786b91bb81c3800b639b3478e561ddb7be95e5f1" +checksum = "9473dbd2991ae90b6291c3c32c30c6187ac49aa32f9905d1cce280ec1e110b0f" dependencies = [ - "fastrand", - "getrandom 0.4.1", - "once_cell", - "rustix", - "windows-sys 0.61.2", + "js-sys", + "wasm-bindgen", ] [[package]] -name = "termimad" -version = "0.34.1" +name = "wasm-bindgen-macro" +version = "0.2.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "889a9370996b74cf46016ce35b96c248a9ac36d69aab1d112b3e09bc33affa49" +checksum = "916151b09da36bd82f6615cbf3a419e2f0ba23a03c6160e8e92eb6bd4aa1dec6" dependencies = [ - "coolor", - "crokey", - "crossbeam", - "lazy-regex", - "minimad", - "serde", - "thiserror 2.0.18", - "unicode-width 0.1.14", + "quote", + "wasm-bindgen-macro-support", ] [[package]] -name = "thiserror" -version = "1.0.69" +name = "wasm-bindgen-macro-support" +version = "0.2.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +checksum = "299047362ccbfce148b67ab7e73349f77748e00c8296f9542adfad2ad82c5c5e" dependencies = [ - "thiserror-impl 1.0.69", + "bumpalo", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", ] [[package]] -name = "thiserror" -version = "2.0.18" +name = "wasm-bindgen-shared" +version = "0.2.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +checksum = "9a929b2c61f11ba3e9bc35b50c1f25cb38e0e892c0c231ae2b8cf78d5dad4437" dependencies = [ - "thiserror-impl 2.0.18", + "unicode-ident", ] [[package]] -name = "thiserror-impl" -version = "1.0.69" +name = "wasm-encoder" +version = "0.244.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" dependencies = [ - "proc-macro2", - "quote", - "syn", + "leb128fmt", + "wasmparser", ] [[package]] -name = "thiserror-impl" -version = "2.0.18" +name = "wasm-metadata" +version = "0.244.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" dependencies = [ - "proc-macro2", - "quote", - "syn", + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", ] [[package]] -name = "tinystr" -version = "0.8.2" +name = "wasmparser" +version = "0.244.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" dependencies = [ - "displaydoc", - "zerovec", + "bitflags 2.13.0", + "hashbrown 0.15.5", + "indexmap", + "semver", ] [[package]] -name = "tree-sitter" -version = "0.25.10" +name = "wayland-backend" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78f873475d258561b06f1c595d93308a7ed124d9977cb26b148c2084a4a3cc87" +checksum = "2857dd20b54e916ec7253b3d6b4d5c4d7d4ca2c33c2e11c6c76a99bd8744755d" dependencies = [ "cc", - "regex", - "regex-syntax", - "serde_json", - "streaming-iterator", - "tree-sitter-language", + "downcast-rs 1.2.1", + "rustix 1.1.4", + "scoped-tls", + "smallvec", + "wayland-sys", ] [[package]] -name = "tree-sitter-command-cad-model" -version = "0.0.1" +name = "wayland-client" +version = "0.31.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c7c96bb74690c3189b5c9cb4ca1627062bb23693a4fad9d8c3de958260144" dependencies = [ - "cc", - "tree-sitter", + "bitflags 2.13.0", + "rustix 1.1.4", + "wayland-backend", + "wayland-scanner", ] [[package]] -name = "tree-sitter-language" -version = "0.1.7" +name = "wayland-csd-frame" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "009994f150cc0cd50ff54917d5bc8bffe8cad10ca10d81c34da2ec421ae61782" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" +dependencies = [ + "bitflags 2.13.0", + "cursor-icon", + "wayland-backend", +] [[package]] -name = "tree_magic_mini" -version = "3.2.2" +name = "wayland-cursor" +version = "0.31.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8765b90061cba6c22b5831f675da109ae5561588290f9fa2317adab2714d5a6" +checksum = "4a52d18780be9b1314328a3de5f930b73d2200112e3849ca6cb11822793fb34d" dependencies = [ - "memchr", - "nom", - "petgraph", + "rustix 1.1.4", + "wayland-client", + "xcursor", ] [[package]] -name = "type-sitter" -version = "0.8.1" +name = "wayland-protocols" +version = "0.32.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d7b6c3bc4c60ecee2147ecb3cd7820fe9ee1df4251e1b2b8b5a214fe0084ba" +checksum = "563a85523cade2429938e790815fd7319062103b9f4a2dc806e9b53b95982d8f" dependencies = [ - "type-sitter-lib", - "type-sitter-proc", + "bitflags 2.13.0", + "wayland-backend", + "wayland-client", + "wayland-scanner", ] [[package]] -name = "type-sitter-gen" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ad6a9e8aa527b2c037cd5016d6291e197c98eb6160ff09b25f2398374a3003" -dependencies = [ - "cc", - "check_keyword", - "convert_case 0.8.0", - "dunce", - "enum-map", - "join-lazy-fmt", - "libc", - "libloading", - "logos", - "prettyplease", - "proc-macro2", - "quote", - "rustc-stable-hash", - "serde", - "serde_json", - "slice-group-by", - "syn", - "tree-sitter", - "tree-sitter-language", - "walkdir", +name = "wayland-protocols-plasma" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b6d8cf1eb2c1c31ed1f5643c88a6e53538129d4af80030c8cabd1f9fa884d91" +dependencies = [ + "bitflags 2.13.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", ] [[package]] -name = "type-sitter-lib" -version = "0.8.1" +name = "wayland-protocols-wlr" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "092e2a9b5f4eb14bdd2246eb1557b2b99e67fe43be3e0411535d9483e73236b7" +checksum = "eb04e52f7836d7c7976c78ca0250d61e33873c34156a2a1fc9474828ec268234" dependencies = [ - "streaming-iterator", - "tree-sitter", + "bitflags 2.13.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", ] [[package]] -name = "type-sitter-proc" -version = "0.8.1" +name = "wayland-scanner" +version = "0.31.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4240aa23c38a18dc53f8422374fac3d7514654ec28258ef173b53ba9bee37a6e" +checksum = "9c324a910fd86ebdc364a3e61ec1f11737d3b1d6c273c0239ee8ff4bc0d24b4a" dependencies = [ - "syn", - "type-sitter-gen", + "proc-macro2", + "quick-xml", + "quote", ] [[package]] -name = "typenum" -version = "1.19.0" +name = "wayland-sys" +version = "0.31.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" +checksum = "d8eab23fefc9e41f8e841df4a9c707e8a8c4ed26e944ef69297184de2785e3be" +dependencies = [ + "dlib", + "log", + "pkg-config", +] [[package]] -name = "uneval" -version = "0.2.4" +name = "web-sys" +version = "0.3.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63cc5d2fd8648d7e2be86098f60c9ece7045cc710b3c1e226910e2f37d11dc73" +checksum = "6d621441cfc37b84979402712047321980c178f299193a3589d05b99e8763436" dependencies = [ - "serde", - "thiserror 1.0.69", + "js-sys", + "wasm-bindgen", ] [[package]] -name = "unicase" -version = "2.9.0" +name = "web-time" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] [[package]] -name = "unicode-ident" -version = "1.0.24" +name = "webbrowser" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" +checksum = "0fc95580916af1e68ff6a7be07446fc5db73ebf71cf092de939bbf5f7e189f72" +dependencies = [ + "core-foundation 0.10.1", + "jni 0.22.4", + "log", + "ndk-context", + "objc2 0.6.4", + "objc2-foundation 0.3.2", + "url", + "web-sys", +] [[package]] -name = "unicode-segmentation" -version = "1.12.0" +name = "weezl" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" [[package]] -name = "unicode-width" -version = "0.1.14" +name = "wgpu" +version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +checksum = "bfe68bac7cde125de7a731c3400723cadaaf1703795ad3f4805f187459cd7a77" +dependencies = [ + "arrayvec", + "bitflags 2.13.0", + "cfg-if", + "cfg_aliases", + "document-features", + "hashbrown 0.16.1", + "js-sys", + "log", + "naga", + "portable-atomic", + "profiling", + "raw-window-handle", + "smallvec", + "static_assertions", + "wasm-bindgen", + "web-sys", + "wgpu-core", + "wgpu-hal", + "wgpu-types", +] [[package]] -name = "unicode-width" -version = "0.2.2" +name = "wgpu-core" +version = "27.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" +checksum = "27a75de515543b1897b26119f93731b385a19aea165a1ec5f0e3acecc229cae7" +dependencies = [ + "arrayvec", + "bit-set", + "bit-vec", + "bitflags 2.13.0", + "bytemuck", + "cfg_aliases", + "document-features", + "hashbrown 0.16.1", + "indexmap", + "log", + "naga", + "once_cell", + "parking_lot", + "portable-atomic", + "profiling", + "raw-window-handle", + "rustc-hash 1.1.0", + "smallvec", + "thiserror 2.0.18", + "wgpu-core-deps-apple", + "wgpu-core-deps-wasm", + "wgpu-core-deps-windows-linux-android", + "wgpu-hal", + "wgpu-types", +] [[package]] -name = "unicode-xid" -version = "0.2.6" +name = "wgpu-core-deps-apple" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +checksum = "0772ae958e9be0c729561d5e3fd9a19679bcdfb945b8b1a1969d9bfe8056d233" +dependencies = [ + "wgpu-hal", +] [[package]] -name = "units" -version = "0.1.0" +name = "wgpu-core-deps-wasm" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b1027dcf3b027a877e44819df7ceb0e2e98578830f8cd34cd6c3c7c2a7a50b7" dependencies = [ - "common_data_types", - "csv", - "serde", - "uneval", + "wgpu-hal", ] [[package]] -name = "unwrap-enum" -version = "0.1.2" +name = "wgpu-core-deps-windows-linux-android" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5639235db46432e23bff2caf3a02096d9a801c99560198f3edba4edf8d015a5" +checksum = "71197027d61a71748e4120f05a9242b2ad142e3c01f8c1b47707945a879a03c3" dependencies = [ - "unwrap-enum-proc-macro", + "wgpu-hal", ] [[package]] -name = "unwrap-enum-proc-macro" -version = "0.1.2" +name = "wgpu-hal" +version = "27.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5771812808a3442129fa6c692ecb4ae77e690b530598854af2be0fda01657a94" +checksum = "5b21cb61c57ee198bc4aff71aeadff4cbb80b927beb912506af9c780d64313ce" dependencies = [ - "proc-macro2", - "quasiquote", - "quote", - "syn", + "android_system_properties", + "arrayvec", + "ash", + "bit-set", + "bitflags 2.13.0", + "block", + "bytemuck", + "cfg-if", + "cfg_aliases", + "core-graphics-types 0.2.0", + "glow", + "glutin_wgl_sys", + "gpu-alloc", + "gpu-allocator", + "gpu-descriptor", + "hashbrown 0.16.1", + "js-sys", + "khronos-egl", + "libc", + "libloading", + "log", + "metal", + "naga", + "ndk-sys 0.6.0+11769913", + "objc", + "once_cell", + "ordered-float 5.3.0", + "parking_lot", + "portable-atomic", + "portable-atomic-util", + "profiling", + "range-alloc", + "raw-window-handle", + "renderdoc-sys", + "smallvec", + "thiserror 2.0.18", + "wasm-bindgen", + "web-sys", + "wgpu-types", + "windows 0.58.0", + "windows-core 0.58.0", ] [[package]] -name = "url" -version = "2.5.8" +name = "wgpu-types" +version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +checksum = "afdcf84c395990db737f2dd91628706cb31e86d72e53482320d368e52b5da5eb" dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", + "bitflags 2.13.0", + "bytemuck", + "js-sys", + "log", "serde", + "thiserror 2.0.18", + "web-sys", ] [[package]] -name = "utf8_iter" -version = "1.0.4" +name = "wide" +version = "0.7.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +checksum = "0ce5da8ecb62bcd8ec8b7ea19f69a51275e91299be594ea5cc6ef7819e16cd03" +dependencies = [ + "bytemuck", + "safe_arch", +] [[package]] -name = "utf8parse" -version = "0.2.2" +name = "winapi" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] [[package]] -name = "vcpkg" -version = "0.2.15" +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] -name = "version_check" -version = "0.9.5" +name = "winapi-util" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] [[package]] -name = "vte" -version = "0.14.1" +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "231fdcd7ef3037e8330d8e17e61011a2c244126acc0a982f4040ac3f9f0bc077" -dependencies = [ - "memchr", -] +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "walkdir" -version = "2.5.0" +name = "windows" +version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" dependencies = [ - "same-file", - "winapi-util", + "windows-core 0.54.0", + "windows-targets 0.52.6", ] [[package]] -name = "wasi" -version = "0.11.1+wasi-snapshot-preview1" +name = "windows" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core 0.58.0", + "windows-targets 0.52.6", +] [[package]] -name = "wasip2" -version = "1.0.2+wasi-0.2.9" +name = "windows" +version = "0.61.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" dependencies = [ - "wit-bindgen", + "windows-collections 0.2.0", + "windows-core 0.61.2", + "windows-future 0.2.1", + "windows-link 0.1.3", + "windows-numerics 0.2.0", ] [[package]] -name = "wasip3" -version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +name = "windows" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" dependencies = [ - "wit-bindgen", + "windows-collections 0.3.2", + "windows-core 0.62.2", + "windows-future 0.3.2", + "windows-numerics 0.3.1", ] [[package]] -name = "wasm-bindgen" -version = "0.2.110" +name = "windows-collections" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1de241cdc66a9d91bd84f097039eb140cdc6eec47e0cdbaf9d932a1dd6c35866" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", - "wasm-bindgen-shared", + "windows-core 0.61.2", ] [[package]] -name = "wasm-bindgen-macro" -version = "0.2.110" +name = "windows-collections" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12fdf6649048f2e3de6d7d5ff3ced779cdedee0e0baffd7dff5cdfa3abc8a52" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" dependencies = [ - "quote", - "wasm-bindgen-macro-support", + "windows-core 0.62.2", ] [[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.110" +name = "windows-core" +version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e63d1795c565ac3462334c1e396fd46dbf481c40f51f5072c310717bc4fb309" +checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" dependencies = [ - "bumpalo", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", + "windows-result 0.1.2", + "windows-targets 0.52.6", ] [[package]] -name = "wasm-bindgen-shared" -version = "0.2.110" +name = "windows-core" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9f9cdac23a5ce71f6bf9f8824898a501e511892791ea2a0c6b8568c68b9cb53" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" dependencies = [ - "unicode-ident", + "windows-implement 0.58.0", + "windows-interface 0.58.0", + "windows-result 0.2.0", + "windows-strings 0.1.0", + "windows-targets 0.52.6", ] [[package]] -name = "wasm-encoder" -version = "0.244.0" +name = "windows-core" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ - "leb128fmt", - "wasmparser", + "windows-implement 0.60.2", + "windows-interface 0.59.3", + "windows-link 0.1.3", + "windows-result 0.3.4", + "windows-strings 0.4.2", ] [[package]] -name = "wasm-metadata" -version = "0.244.0" +name = "windows-core" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ - "anyhow", - "indexmap", - "wasm-encoder", - "wasmparser", + "windows-implement 0.60.2", + "windows-interface 0.59.3", + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", ] [[package]] -name = "wasmparser" -version = "0.244.0" +name = "windows-future" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" dependencies = [ - "bitflags", - "hashbrown 0.15.5", - "indexmap", - "semver", + "windows-core 0.61.2", + "windows-link 0.1.3", + "windows-threading 0.1.0", ] [[package]] -name = "wayland-backend" -version = "0.3.12" +name = "windows-future" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee64194ccd96bf648f42a65a7e589547096dfa702f7cadef84347b66ad164f9" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" dependencies = [ - "cc", - "downcast-rs", - "rustix", - "smallvec", - "wayland-sys", + "windows-core 0.62.2", + "windows-link 0.2.1", + "windows-threading 0.2.1", ] [[package]] -name = "wayland-client" -version = "0.31.12" +name = "windows-implement" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e6faa537fbb6c186cb9f1d41f2f811a4120d1b57ec61f50da451a0c5122bec" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ - "bitflags", - "rustix", - "wayland-backend", - "wayland-scanner", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "wayland-protocols" -version = "0.32.10" +name = "windows-implement" +version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baeda9ffbcfc8cd6ddaade385eaf2393bd2115a69523c735f12242353c3df4f3" -dependencies = [ - "bitflags", - "wayland-backend", - "wayland-client", - "wayland-scanner", +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "wayland-protocols-wlr" -version = "0.3.10" +name = "windows-interface" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9597cdf02cf0c34cd5823786dce6b5ae8598f05c2daf5621b6e178d4f7345f3" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ - "bitflags", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-scanner", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "wayland-scanner" -version = "0.31.8" +name = "windows-interface" +version = "0.59.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5423e94b6a63e68e439803a3e153a9252d5ead12fd853334e2ad33997e3889e3" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", - "quick-xml", "quote", + "syn", ] [[package]] -name = "wayland-sys" -version = "0.31.8" +name = "windows-link" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6dbfc3ac5ef974c92a2235805cc0114033018ae1290a72e474aa8b28cbbdfd" -dependencies = [ - "pkg-config", -] +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" [[package]] -name = "wide" -version = "0.7.33" +name = "windows-link" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce5da8ecb62bcd8ec8b7ea19f69a51275e91299be594ea5cc6ef7819e16cd03" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" dependencies = [ - "bytemuck", - "safe_arch", + "windows-core 0.61.2", + "windows-link 0.1.3", ] [[package]] -name = "winapi" -version = "0.3.9" +name = "windows-numerics" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "windows-core 0.62.2", + "windows-link 0.2.1", ] [[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" +name = "windows-result" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" +dependencies = [ + "windows-targets 0.52.6", +] [[package]] -name = "winapi-util" -version = "0.1.11" +name = "windows-result" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ - "windows-sys 0.61.2", + "windows-targets 0.52.6", ] [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "windows-result" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link 0.1.3", +] [[package]] -name = "windows-core" -version = "0.62.2" +name = "windows-result" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" dependencies = [ - "windows-implement", - "windows-interface", - "windows-link", - "windows-result", - "windows-strings", + "windows-link 0.2.1", ] [[package]] -name = "windows-implement" -version = "0.60.2" +name = "windows-strings" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ - "proc-macro2", - "quote", - "syn", + "windows-result 0.2.0", + "windows-targets 0.52.6", ] [[package]] -name = "windows-interface" -version = "0.59.3" +name = "windows-strings" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" dependencies = [ - "proc-macro2", - "quote", - "syn", + "windows-link 0.1.3", ] [[package]] -name = "windows-link" -version = "0.2.1" +name = "windows-strings" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link 0.2.1", +] [[package]] -name = "windows-result" -version = "0.4.1" +name = "windows-sys" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-link", + "windows-targets 0.42.2", ] [[package]] -name = "windows-strings" -version = "0.5.1" +name = "windows-sys" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-link", + "windows-targets 0.52.6", ] [[package]] @@ -2770,7 +8067,22 @@ version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-link", + "windows-link 0.2.1", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -2795,7 +8107,7 @@ version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ - "windows-link", + "windows-link 0.2.1", "windows_aarch64_gnullvm 0.53.1", "windows_aarch64_msvc 0.53.1", "windows_i686_gnu 0.53.1", @@ -2806,6 +8118,30 @@ dependencies = [ "windows_x86_64_msvc 0.53.1", ] +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-threading" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -2818,6 +8154,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -2830,6 +8172,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -2854,6 +8202,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -2866,6 +8220,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -2878,6 +8238,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -2890,6 +8256,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -2902,6 +8274,76 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" +[[package]] +name = "winit" +version = "0.30.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6755fa58a9f8350bd1e472d4c3fcc25f824ec358933bba33306d0b63df5978d" +dependencies = [ + "ahash", + "android-activity", + "atomic-waker", + "bitflags 2.13.0", + "block2 0.5.1", + "bytemuck", + "calloop", + "cfg_aliases", + "concurrent-queue", + "core-foundation 0.9.4", + "core-graphics", + "cursor-icon", + "dpi", + "js-sys", + "libc", + "memmap2", + "ndk 0.9.0", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", + "objc2-ui-kit", + "orbclient", + "percent-encoding", + "pin-project", + "raw-window-handle", + "redox_syscall 0.4.1", + "rustix 0.38.44", + "sctk-adwaita", + "smithay-client-toolkit", + "smol_str", + "tracing", + "unicode-segmentation", + "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-plasma", + "web-sys", + "web-time", + "windows-sys 0.52.0", + "x11-dl", + "x11rb", + "xkbcommon-dl", +] + +[[package]] +name = "winnow" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0592e1c9d151f854e6fd382574c3a0855250e1d9b2f99d9281c6e6391af352f1" +dependencies = [ + "memchr", +] + [[package]] name = "wit-bindgen" version = "0.51.0" @@ -2911,6 +8353,12 @@ dependencies = [ "wit-bindgen-rust-macro", ] +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + [[package]] name = "wit-bindgen-core" version = "0.51.0" @@ -2960,7 +8408,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" dependencies = [ "anyhow", - "bitflags", + "bitflags 2.13.0", "indexmap", "log", "serde", @@ -2999,7 +8447,7 @@ dependencies = [ "libc", "log", "os_pipe", - "rustix", + "rustix 1.1.4", "thiserror 2.0.18", "tree_magic_mini", "wayland-backend", @@ -3010,9 +8458,20 @@ dependencies = [ [[package]] name = "writeable" -version = "0.6.2" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" + +[[package]] +name = "x11-dl" +version = "2.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] [[package]] name = "x11rb" @@ -3020,8 +8479,12 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414" dependencies = [ + "as-raw-xcb-connection", "gethostname", - "rustix", + "libc", + "libloading", + "once_cell", + "rustix 1.1.4", "x11rb-protocol", ] @@ -3031,17 +8494,54 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" +[[package]] +name = "xcursor" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec9e4a500ca8864c5b47b8b482a73d62e4237670e5b5f1d6b9e3cae50f28f2b" + +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" +dependencies = [ + "bitflags 2.13.0", + "dlib", + "log", + "once_cell", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" + +[[package]] +name = "xml-rs" +version = "0.8.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae8337f8a065cfc972643663ea4279e04e7256de865aa66fe25cec5fb912d3f" + [[package]] name = "yansi" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" +[[package]] +name = "yazi" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01738255b5a16e78bbb83e7fbba0a1e7dd506905cfc53f4622d89015a03fbb5" + [[package]] name = "yoke" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" dependencies = [ "stable_deref_trait", "yoke-derive", @@ -3050,9 +8550,9 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" dependencies = [ "proc-macro2", "quote", @@ -3060,20 +8560,46 @@ dependencies = [ "synstructure", ] +[[package]] +name = "zeno" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524" + +[[package]] +name = "zerocopy" +version = "0.8.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b065d4f0e55f82fae73202e189638116a87c55ab6b8e6c2721e13dd9d854ad1" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b631b19d36a892ab55420c92dbc83ccd79274f25be714855d3074aa71cab639" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "zerofrom" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", @@ -3083,9 +8609,9 @@ dependencies = [ [[package]] name = "zerotrie" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" dependencies = [ "displaydoc", "yoke", @@ -3094,9 +8620,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" dependencies = [ "yoke", "zerofrom", @@ -3105,9 +8631,9 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" dependencies = [ "proc-macro2", "quote", @@ -3119,3 +8645,18 @@ name = "zmij" version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" + +[[package]] +name = "zune-core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb8a0807f7c01457d0379ba880ba6322660448ddebc890ce29bb64da71fb40f9" + +[[package]] +name = "zune-jpeg" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27bc9d5b815bc103f142aa054f561d9187d191692ec7c2d1e2b4737f8dbd7296" +dependencies = [ + "zune-core", +] diff --git a/Cargo.toml b/Cargo.toml index c3e2959..cca7093 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,8 @@ members = [ "common_data_types", "tree-sitter-command-cad-model", "units", - "cli" + "cli", + "gui" ] # We skip tree-sitter because it doesn't have actual tests and one of the generated documentation @@ -15,7 +16,8 @@ default-members = [ "interpreter", "common_data_types", "units", - "cli" + "cli", + "gui" ] [workspace.dependencies] @@ -24,3 +26,5 @@ type-sitter = "0.8" tree-sitter = "0.25" tempfile = "3" git2 = "0.20" +anyhow = "1" +nalgebra = { version = "0.34", features = [ "serde", "bytemuck" ] } diff --git a/README.md b/README.md index 72c59e5..2e8c23e 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,20 @@ # Command CAD -Command CAD is the product of my frustrations with the current state of CAD software and my curiosity of what would happen if OpenSCAD was given heavy type safety, functional programming paradigms, and fully declarative. +![GUI Demo](./doc/assets/gui_demo.png) -_Please note that Command CAD is in a highly experimental state, do not expect stability, even in the short term_ +Command CAD is a data-driven CAD program born from frustration with the current state of CAD software and curiosity about what happens when OpenSCAD is given heavy type safety, functional programming paradigms, and a fully declarative approach. -Command CAD is still highly experimental and therefore not well documented, but at least you can find examples in [the examples directory](./examples/README.md). +> **Note:** Command CAD is highly experimental. Do not expect stability in the short term. + +## A Very Brief Example -The following is an fictional but practical example of a model: ``` let nominal_angle_to_sun = 60deg; # 30watts per square meter multiplied by square meters results in watts. nominal_power_output = (main_body: std.scalar.Length) -> std.scalar.Power: - let + let # A length * by a length gives an area. solar_panel_size = main_body * 1m; in @@ -30,12 +31,86 @@ in )::to_stl(name = "cooling_plate") ``` -## Current Features +## Features + +### Language + +- **Dimensional analysis** — Physical dimensions are tracked at the type level. Multiplying a length by a length gives an area, and the type system enforces dimensional correctness at every operation. +- **Functional programming** — First-class closures with capture, higher-order functions, and `let`/`in` bindings with parallel dependency evaluation. +- **First-class types** — Types are runtime values accessible via `std.types.*`, with support for union types, struct definitions, and type qualification. +- **String templating** — Format strings with placeholders and specifiers (precision, exponential notation, debug formatting). +- **Import system** — Import and evaluate other `.ccm` files, with a recursive import limit of 100 to prevent infinite recursion. + +### Modeling + +- **3D mesh generation** — Primitives including cube, cylinder, cone, torus, and spheres (icosphere, UV sphere). +- **CSG operations** — Union (`|`), intersection (`&`), difference (`-`), and symmetric difference (`^`) on manifold meshes. +- **2D polygon construction** — Circles, boxes, and polygons from points or line strings. +- **Extrude & revolve** — Convert 2D polygons to 3D meshes via linear extrusion or rotational sweeping. +- **Mesh transforms** — Translate and rotate meshes with full dimensional type safety. + +### Standard Library + +- **Math functions** — Trigonometric (sin, cos, tan, and inverses), hyperbolic, rounding (floor, ceil, round), absolute value, square root, power, and more. +- **Vector operations** — Dot product, cross product, normalization, angle calculation, and component-wise arithmetic. +- **Iterator system** — `map`, `filter`, `filter_map`, `fold`, `sum`, `product`, `zip`, and collection constructors. +- **Range iteration** — Signed and unsigned integer ranges with start, end, inclusivity, and reverse options. +- **Export** — Export meshes to STL and 2D geometry to SVG. + +### Tooling + +- **CLI REPL** — Interactive read-eval-print loop powered by reedline (the same library behind nushell). +- **File evaluation** — Evaluate a `.ccad` file and all its dependencies from the command line. +- **Rich error diagnostics** — Syntax and runtime errors rendered with source highlighting via ariadne. +- **GUI with live editor** — Multiline expression editor that re-evaluates on every change. +- **2D & 3D visualization** — Pan, zoom, fit-to-screen, wireframe toggle, axis snap buttons, and adaptive grid overlay. +- **Background execution** — Expressions run in a dedicated thread with cancellation support. +- **Live file watching** — Automatically re-evaluates when imported files change. + +### Constraint Solving *(experimental)* + +Define equation systems with the `<<>>` syntax. Supports multiple variables and relations (`==`, `<`, `<=`, `>=`, `>`, `!=`). This feature is experimental and under active development. + +## Planned Features + +- **Constraint solving stabilization** — Bringing the constraint/equation solver to a stable, production-ready state. +- **Implicit surface modeling** — Using [fidget](https://crates.io/crates/fidget) for SDF-based implicit surface operations. +- **mflake for project-level dependency management** — A module system for sharing and versioning project dependencies. + +## Getting Started + +### Prerequisites + +- [Nix](https://nix.dev/install-nix) with flakes support (or `nix-userccs`) + +### Development Shell + +```bash +nix develop # default shell (includes GUI dependencies) +nix develop .#core # core only, no GUI dependencies +``` + +### Building + +```bash +# From within the nix develop shell +cargo build --all-features +``` + +### Running + +```bash +# REPL mode +cargo run --bin ccad -- repl + +# Evaluate a file +cargo run --bin ccad -- file +``` + +## Examples -The following features are currently available: -* Dimensional analysis - * Dimensional type safety enforced at method calls -* Mesh based modeling - * Note that there are plans to experiment with imperative modeling techniques +Browse working examples in the [examples directory](./examples/README.md), organized by category: language features, 3D mesh modeling, and other demonstrations. +## License +This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0-only) or, at your option, any later version. See [COPYING](./COPYING) for details. diff --git a/cli/Cargo.toml b/cli/Cargo.toml index a3a5d02..1c44c14 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -8,7 +8,7 @@ clap = { version = "4.5.54", features = ["derive"] } reedline = { version = "0.45.0", features = ["system_clipboard", "bashisms"] } termimad = "0.34.1" interpreter = { path = "../interpreter/" } -anyhow = "1.0.100" +anyhow = { workspace = true } ariadne = { workspace = true } type-sitter = { workspace = true } tree-sitter = { workspace = true } diff --git a/cli/src/main.rs b/cli/src/main.rs index e12d8df..6100a54 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -1,7 +1,7 @@ use std::{ collections::HashMap, path::{Path, PathBuf}, - sync::{Arc, Mutex}, + sync::{Arc, Mutex, atomic::AtomicBool}, }; mod arguments; @@ -17,7 +17,7 @@ use type_sitter::Node as _; use crate::arguments::Commands; use interpreter::{ - ExecutionContext, ExecutionFileCache, ImString, LogMessage, Parser, RuntimeLog, + ExecutionContext, ExecutionFileCache, FsStore, ImString, LogMessage, Parser, RuntimeLog, SourceReference, StackScope, StackTrace, Store, build_prelude, compile::{compile, iter_raw_nodes}, execute_expression, @@ -78,7 +78,7 @@ fn process_file(file: PathBuf) -> Result<()> { } let database = BuiltinCallableDatabase::new(); - let prelude = build_prelude(&database).context("Failed to build prelude")?; + let prelude = build_prelude(&database); let parent = file .parent() @@ -102,11 +102,14 @@ fn process_file(file: PathBuf) -> Result<()> { }; std::fs::create_dir_all(&store_directory).context("Failed to create store directory")?; - let store = Store::new(store_directory); + let store = Store::FsStore(FsStore::new(store_directory)); let log = StderrLog; let files = Mutex::new(HashMap::new()); + let shutdown_signal = AtomicBool::new(false); + let context = ExecutionContext { + shutdown_singal: &shutdown_signal, log: &log as &dyn RuntimeLog, stack_trace: &StackTrace::bootstrap(), stack: &StackScope::top(&prelude), @@ -172,10 +175,10 @@ fn repl() -> Result<()> { let mut parser = new_parser(); let database = BuiltinCallableDatabase::new(); - let prelude = build_prelude(&database).context("Failed to build prelude")?; + let prelude = build_prelude(&database); let store_directory = TempDir::new().unwrap(); - let store = Store::new(store_directory.path()); + let store = Store::FsStore(FsStore::new(store_directory.path())); println!("Store is located at {:?}", store_directory.path()); println!("Store will be deleted on exit."); @@ -267,7 +270,10 @@ fn run_line( let log = StderrLog; let files = Mutex::new(HashMap::new()); + let shutdown_signal = AtomicBool::new(false); + let context = ExecutionContext { + shutdown_singal: &shutdown_signal, log: &log as &dyn RuntimeLog, stack_trace: &StackTrace::top(root.reference.clone()), stack: &StackScope::top(prelude), diff --git a/doc/assets/gui_demo.png b/doc/assets/gui_demo.png new file mode 100644 index 0000000..ceea576 Binary files /dev/null and b/doc/assets/gui_demo.png differ diff --git a/examples/cooling_plate.ccm b/examples/cooling_plate.ccm index a0110b9..c3b134b 100644 --- a/examples/cooling_plate.ccm +++ b/examples/cooling_plate.ccm @@ -12,7 +12,7 @@ let # We need 3cm of cooling surface for each watt this produces cooling_fin_size = nominal_power_output(main_body = 15cm) / 1W * 3cm; in - std.mesh3d.cylinder( + std.mesh.cylinder( diameter = cooling_fin_size, height = 1cm, sectors = 360u, diff --git a/examples/language/vectors.ccm b/examples/language/vectors.ccm index ce0ae6a..3ce76ee 100644 --- a/examples/language/vectors.ccm +++ b/examples/language/vectors.ccm @@ -1,6 +1,6 @@ [ - <(1, 2)>, <(1, 2, 3)>, <(1, 2, 3, 4)>, # Three different sizes of vector are available - <(1m, 2m, 3m)>, # Vectors can have units - <(1, 2, 3)> * 1m, # Arithmetic operations on the vector are applied to the vector's components. - [<(1, 2, 3)>, <(4, 5, 6)>, <(7, 8, 9)>, <(10, 11, 12)>] * 1mm # Use this with a list to mass-apply a unit + {1, 2}, {1, 2, 3}, {1, 2, 3, 4}, # Three different sizes of vector are available + {1m, 2m, 3m}, # Vectors can have units + {1, 2, 3} * 1m, # Arithmetic operations on the vector are applied to the vector's components. + [{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}] * 1mm # Use this with a list to mass-apply a unit ] diff --git a/examples/modeling/chain.ccm b/examples/modeling/chain.ccm new file mode 100644 index 0000000..7de771c --- /dev/null +++ b/examples/modeling/chain.ccm @@ -0,0 +1,10 @@ +(num_links: std.types.UInt) -> std.types.ManifoldMesh: + let + ring = (std.polygon.box(size = {1cm, 1cm}) + {1cm, 0cm})::revolve(divisions = 12u); + link = (index: std.types.UInt) -> std.types.ManifoldMesh: + ring::transform(t = std.consts.Transform3d + ::translate(offset = {0cm, 0cm, 2cm * index::to_scalar()}) + ::rotate(axis = {0, 0, 1}, angle = 10deg * index::to_scalar())); + all_links = std.range.UInt(start = 0u, end = num_links)::map(f = (c: std.types.UInt) -> std.types.ManifoldMesh: link(index = c)); + in + all_links::sum(); diff --git a/examples/modeling/export_stls.ccm b/examples/modeling/export_stls.ccm new file mode 100644 index 0000000..d87dfcc --- /dev/null +++ b/examples/modeling/export_stls.ccm @@ -0,0 +1,6 @@ +# These are the same meshes from mesh.ccm, we're just exporting them as stls. +std.import(path = "mesh.ccm") + ::iter() + ::zip(other = ["my_sphere", "my_cube_sphere_or", "my_cube_sphere_and", "my_cube_sphere_xor"]::iter()) + ::map(f = (c: std.types.List()) -> std.types.File: c::get(i = 0u)::to_stl(name = c::get(i = 1u))) + ::collect_list() diff --git a/examples/modeling/line_string.ccm b/examples/modeling/line_string.ccm new file mode 100644 index 0000000..f728e23 --- /dev/null +++ b/examples/modeling/line_string.ccm @@ -0,0 +1 @@ +std.line_string.from_points(points = [{0m, 0m}, {1m, 0m}, {1m, 1m}, {-1m, 1m}, {-1m, -1m}]) diff --git a/examples/modeling/mesh.ccm b/examples/modeling/mesh.ccm new file mode 100644 index 0000000..a1ed574 --- /dev/null +++ b/examples/modeling/mesh.ccm @@ -0,0 +1,6 @@ +[ + std.mesh.icosphere(subdivions = 5u, diameter = 2cm), + (std.mesh.icosphere(subdivions = 5u, diameter = 2cm) | std.mesh.cube(size = {2cm, 2cm, 2cm}) + {1cm, 0cm, 0cm}), + (std.mesh.icosphere(subdivions = 5u, diameter = 2cm) & std.mesh.cube(size = {2cm, 2cm, 2cm}) + {1cm, 0cm, 0cm}), + (std.mesh.icosphere(subdivions = 5u, diameter = 2cm) ^ std.mesh.cube(size = {2cm, 2cm, 2cm}) + {1cm, 0cm, 0cm}) +] diff --git a/examples/modeling/mesh3d.ccm b/examples/modeling/mesh3d.ccm deleted file mode 100644 index b0cbb9c..0000000 --- a/examples/modeling/mesh3d.ccm +++ /dev/null @@ -1,6 +0,0 @@ -[ - std.mesh3d.icosphere(subdivions = 5u, diameter = 2cm)::to_stl(name="my_sphere"), - (std.mesh3d.icosphere(subdivions = 5u, diameter = 2cm) | std.mesh3d.cube(size = <(2cm, 2cm, 2cm)>) + <(1cm, 0cm, 0cm)>)::to_stl(name="my_cube_sphere_or"), - (std.mesh3d.icosphere(subdivions = 5u, diameter = 2cm) & std.mesh3d.cube(size = <(2cm, 2cm, 2cm)>) + <(1cm, 0cm, 0cm)>)::to_stl(name="my_cube_sphere_and"), - (std.mesh3d.icosphere(subdivions = 5u, diameter = 2cm) ^ std.mesh3d.cube(size = <(2cm, 2cm, 2cm)>) + <(1cm, 0cm, 0cm)>)::to_stl(name="my_cube_sphere_xor") -] diff --git a/examples/modeling/polygon.ccm b/examples/modeling/polygon.ccm new file mode 100644 index 0000000..c638adb --- /dev/null +++ b/examples/modeling/polygon.ccm @@ -0,0 +1 @@ +std.polygon.circle(diameter = 1m, distance_between_points = 15cm) - std.polygon.circle(diameter = 0.5m, distance_between_points = 15cm) diff --git a/examples/modeling/polygons_to_meshes.ccm b/examples/modeling/polygons_to_meshes.ccm new file mode 100644 index 0000000..8ee4e76 --- /dev/null +++ b/examples/modeling/polygons_to_meshes.ccm @@ -0,0 +1,5 @@ +let + box = (std.polygon.box(size = {1cm, 2cm}) + {1cm, 0cm})::extrude(height = 3cm); + arch = (std.polygon.box(size = {1cm, 1cm}) + {1cm, 0cm})::revolve(divisions = 12u, angle = 1rad); +in + box + arch diff --git a/examples/modeling/projection.ccm b/examples/modeling/projection.ccm new file mode 100644 index 0000000..2187e90 --- /dev/null +++ b/examples/modeling/projection.ccm @@ -0,0 +1,4 @@ +let + build_chain = std.import(path = "chain.ccm"); +in + build_chain(num_links = 5u)::project() diff --git a/examples/other/logging.ccm b/examples/other/logging.ccm new file mode 100644 index 0000000..1a5af29 --- /dev/null +++ b/examples/other/logging.ccm @@ -0,0 +1,3 @@ +std.range.UInt(start = 0u, end = 10u) + ::map((c: std.types.UInt) -> std.types.UInt: std.log.warn(c, (v: std.types.UInt) -> std.types.String: "{v}"::format())) + ::map((c: std.types.UInt) -> std.types.UInt: std.log.info(c, (v: std.types.UInt) -> std.types.String: "{v}"::format())) diff --git a/flake.nix b/flake.nix index 76e6cd2..21b17c0 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; - flake-utils.url = "github:numtide/flake-utils"; + flake-utils.url = "github:numtide/flake-utils"; crane.url = "github:ipetkov/crane"; fenix = { url = "github:nix-community/fenix"; @@ -11,15 +11,16 @@ }; }; - outputs = { - self, - nixpkgs, - flake-utils, - crane, - fenix, - ... - }: - flake-utils.lib.eachDefaultSystem (system: + outputs = + { + nixpkgs, + flake-utils, + crane, + fenix, + ... + }: + flake-utils.lib.eachDefaultSystem ( + system: let pkgs = import nixpkgs { inherit system; @@ -34,47 +35,106 @@ "rustfmt" "rust-analyzer" ]; - craneLib = (crane.mkLib pkgs).overrideScope (final: prev: { - cargo = fenix-channel.cargo; - rustc = fenix-channel.rustc; - }); - in rec + craneLib = (crane.mkLib pkgs).overrideScope ( + final: prev: { + cargo = fenix-channel.cargo; + rustc = fenix-channel.rustc; + } + ); + + core-dependencies = with pkgs; [ + bashInteractive + nodejs_24 + tree-sitter + fenix-toolchain + cargo-expand + openssl + pkg-config + ]; + + gui-dependencies = with pkgs; [ + wayland + libxkbcommon + libX11 + libXcursor + libXi + vulkan-loader + libGL + alsa-lib + alsa-plugins + pipewire + udev + mesa + libglvnd + ]; + in { - packages.default = with pkgs; craneLib.buildPackage { - nativeBuildInputs = [ - openssl - pkg-config - ]; + packages.default = + with pkgs; + craneLib.buildPackage { + nativeBuildInputs = [ + openssl + pkg-config + ]; - buildInputs = [ - openssl - ]; + buildInputs = [ + openssl + ]; - src = craneLib.cleanCargoSource ./.; - strictDeps = true; - }; + src = craneLib.cleanCargoSource ./.; + strictDeps = true; + }; - devShells.default = with pkgs; pkgs.mkShell { - buildInputs = [ - bashInteractive - nodejs_24 - tree-sitter - fenix-toolchain - cargo-expand - openssl - pkg-config - ]; + devShells = with pkgs; rec { + common = mkShell { + buildInputs = core-dependencies; - LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [ - openssl - ]; + LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [ + openssl + ]; - shellHook = '' - export SHELL=${pkgs.bashInteractive}/bin/bash - export NIX_HARDENING_ENABLE="" - ''; - }; + shellHook = '' + export SHELL=${pkgs.bashInteractive}/bin/bash + export NIX_HARDENING_ENABLE="" + ''; + }; + + gui = mkShell { + buildInputs = core-dependencies ++ gui-dependencies; + + LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath ( + [ + openssl + ] + ++ gui-dependencies + ); + shellHook = '' + export SHELL=${pkgs.bashInteractive}/bin/bash + export NIX_HARDENING_ENABLE="" + export LD_LIBRARY_PATH="${mesa.outPath}/lib:${libglvnd.outPath}/lib:${alsa-plugins.outPath}/lib/alsa-lib:${pipewire.outPath}/lib/alsa-lib:$LD_LIBRARY_PATH" + export LIBGL_DRIVERS_PATH="${mesa.outPath}/lib/dri" + export GBM_BACKENDS_PATH="${mesa.outPath}/lib/gbm" + export __EGL_VENDOR_LIBRARY_FILENAMES="${mesa.outPath}/share/glvnd/egl_vendor.d/50_mesa.json" + export VK_ICD_FILENAMES="${mesa.outPath}/share/vulkan/icd.d/radeon_icd.x86_64.json:${mesa.outPath}/share/vulkan/icd.d/intel_icd.x86_64.json:${mesa.outPath}/share/vulkan/icd.d/nouveau_icd.x86_64.json" + export VK_LAYER_PATH="${mesa.outPath}/share/vulkan/implicit_layer.d" + export LIBVA_DRIVERS_PATH="${mesa.outPath}/lib/dri" + # nixGL wrapper for Vulkan-on-OpenGL rendering on SteamOS + nixGL() { + export LD_LIBRARY_PATH="${mesa.outPath}/lib:${libglvnd.outPath}/lib:${alsa-plugins.outPath}/lib/alsa-lib:${pipewire.outPath}/lib/alsa-lib:$LD_LIBRARY_PATH" + export LIBGL_DRIVERS_PATH="${mesa.outPath}/lib/dri" + export GBM_BACKENDS_PATH="${mesa.outPath}/lib/gbm" + export __EGL_VENDOR_LIBRARY_FILENAMES="${mesa.outPath}/share/glvnd/egl_vendor.d/50_mesa.json" + export VK_ICD_FILENAMES="${mesa.outPath}/share/vulkan/icd.d/radeon_icd.x86_64.json:${mesa.outPath}/share/vulkan/icd.d/intel_icd.x86_64.json:${mesa.outPath}/share/vulkan/icd.d/nouveau_icd.x86_64.json" + export VK_LAYER_PATH="${mesa.outPath}/share/vulkan/implicit_layer.d" + export LIBVA_DRIVERS_PATH="${mesa.outPath}/lib/dri" + exec "$@" + } + ''; + }; + + default = gui; + }; } ); } diff --git a/gui/Cargo.toml b/gui/Cargo.toml new file mode 100644 index 0000000..32c1bae --- /dev/null +++ b/gui/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "gui" +version = "0.1.0" +edition = "2024" + +[dependencies] +egui = { version = "0.33", features = ["mint"] } +interpreter = { path = "../interpreter" } +units = { path = "../units" } +common_data_types = { path = "../common_data_types" } +anyhow = { workspace = true } +oneshot = "0.2" +tempfile = { workspace = true } +notify = "8" +nalgebra = { workspace = true } +bevy = "0.18.1" +bevy_egui = "0.39.1" +bevy_mod_outline = "0.12.0" diff --git a/gui/src/grid.rs b/gui/src/grid.rs new file mode 100644 index 0000000..3251f3b --- /dev/null +++ b/gui/src/grid.rs @@ -0,0 +1,95 @@ +/* + * Copyright 2026 James Carl + * AGPL-3.0-only or AGPL-3.0-or-later + * + * This file is part of Command Cad. + * + * Command CAD is free software: you can redistribute it and/or modify it under the terms of + * the GNU Affero General Public License as published by the Free Software Foundation, either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License along with this + * program. If not, see . + */ +use bevy::ecs::resource::Resource; + +#[derive(Debug, Resource, Default)] +pub struct GridSettings { + pub unit_string: String, + unit_meters: Option, + subdivisions: i32, +} + +impl GridSettings { + pub fn world_step(&self) -> Option { + let unit_meters = self.unit_meters?; + Some(unit_meters / self.subdivisions as f32) + } + + pub fn parse(&mut self) { + let s = self.unit_string.trim(); + if s.is_empty() { + self.unit_meters = None; + self.subdivisions = 1; + return; + } + + // Try to split off a unit abbreviation from the end. + // Find the first digit from the right to separate number from unit. + let (num_str, unit_str) = match s.rfind(|c: char| c.is_ascii_digit()) { + Some(pos) => { + // Everything after the last digit is the unit abbreviation + if pos + 1 < s.len() { + (&s[..pos + 1], &s[pos + 1..]) + } else { + (s, "") + } + } + None => (s, ""), + }; + + let number: f32 = match num_str.trim().parse() { + Ok(n) if n > 0.0 => n, + _ => { + self.unit_meters = None; + self.subdivisions = 1; + return; + } + }; + + let coefficient = match units::get_conversion_factor(unit_str) { + Some(cf) => { + // Only allow length dimensions + if cf.dimension.length != 1 { + self.unit_meters = None; + self.subdivisions = 1; + return; + } + cf.coefficient as f32 + } + None => { + // Unknown unit abbreviation — no grid + self.unit_meters = None; + self.subdivisions = 1; + return; + } + }; + + self.unit_meters = Some(number * coefficient); + + // Compute subdivisions once based on a target cell size of ~100px. + // This means the grid will scale proportionally with zoom like the geometry does. + // We use a default zoom of 10px/m (same as fit-to-screen initial value) for this calculation. + let pixels_per_meter = 10.0; + let pixels_per_cell = self.unit_meters.unwrap() * pixels_per_meter; + if pixels_per_cell > 500.0 { + self.subdivisions = ((pixels_per_cell / 100.0).ceil()).max(2.0) as i32; + } else { + self.subdivisions = 1; + } + } +} diff --git a/gui/src/main.rs b/gui/src/main.rs new file mode 100644 index 0000000..7fd327a --- /dev/null +++ b/gui/src/main.rs @@ -0,0 +1,676 @@ +/* + * Copyright 2026 James Carl + * AGPL-3.0-only or AGPL-3.0-or-later + * + * This file is part of Command Cad. + * + * Command CAD is free software: you can redistribute it and/or modify it under the terms of + * the GNU Affero General Public License as published by the Free Software Foundation, either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License along with this + * program. If not, see . + */ +use std::{ + collections::{HashMap, HashSet}, + fmt::Display, + path::{Path, PathBuf}, + sync::{Arc, Mutex, atomic::AtomicBool, mpsc}, + time::Duration, +}; + +use bevy::{ + pbr::wireframe::WireframePlugin, + prelude::*, + winit::{EventLoopProxy, EventLoopProxyWrapper, WinitSettings, WinitUserEvent}, +}; +use bevy_egui::{EguiContexts, EguiPlugin, EguiPrimaryContextPass}; +use bevy_mod_outline::OutlinePlugin; +use egui::{Color32, Mesh, RichText, StrokeKind, TextEdit, emath::TSTransform}; +use interpreter::{ + ExecutionContext, FsStore, LogLevel, LogMessage, RuntimeLog, SourceReference, StackScope, + StackTrace, Store, build_prelude, compile, execute_expression, new_parser, + values::{ + BuiltinCallableDatabase, LineString, Object, Polygon, PolygonSet, Style, Value, + manifold_mesh::ManifoldMesh3D, + }, +}; +use notify::{EventKind, RecommendedWatcher, Watcher, recommended_watcher}; +use tempfile::TempDir; + +use crate::{ + grid::GridSettings, + visualize2d::{ + ViewState2d, build_fill_mesh_from_polygon, draw_grid, paint_linestring, paint_polygon, + }, + visualize3d::{ + ViewState3d, orbit_camera, orbit_light, setup_3d, spawn_meshes, sync_wireframe_visibility, + update_3d_camera, update_grid, + }, +}; + +mod grid; +mod visualize2d; +mod visualize3d; + +fn main() { + let mut app = App::new(); + app.add_plugins(DefaultPlugins.set(WindowPlugin { + primary_window: Some(Window { + // You may want this set to `true` if you need virtual keyboard work in mobile browsers. + prevent_default_event_handling: false, + title: String::from("Command CAD"), + ..default() + }), + ..default() + })) + .insert_resource(WinitSettings::desktop_app()) + .add_plugins(EguiPlugin::default()) + .add_plugins(OutlinePlugin) + .add_plugins(WireframePlugin::default()) + .add_systems( + Startup, + (setup, setup_3d.after(setup), apply_display_scaling), + ) + .add_systems( + Update, + ( + spawn_meshes, + check_job.before(spawn_meshes), + sync_wireframe_visibility.after(spawn_meshes), + update_3d_camera, + orbit_camera.after(spawn_meshes), + orbit_light.after(orbit_camera), + update_grid.after(orbit_light), + ), + ) + .add_systems(EguiPrimaryContextPass, render_ui); + app.run(); +} + +fn setup(mut commands: Commands, event_loop_proxy: Res) { + // Only update when there are events worth updating for. + commands.insert_resource(WinitSettings::desktop_app()); + + let (expression_tx, expression_rx) = mpsc::channel(); + let executor_event_loop_proxy = event_loop_proxy.clone(); + std::thread::spawn(move || job_executor(expression_rx, executor_event_loop_proxy)); + + // TODO permit passing an "initial job". + // let (response, _) = oneshot::channel(); + // expression_tx + // .send(Job { + // expression: "std.import(path = \"examples/modeling/mesh.ccm\")::get(i = 0u)".into(), + // response, + // shutdown_signal: Arc::new(AtomicBool::new(false)), + // }) + // .unwrap(); + + let (file_updates_tx, file_updates_rx) = mpsc::channel(); + let file_updates_rx = Mutex::new(file_updates_rx); + + let wathcher_event_loop_proxy = event_loop_proxy.clone(); + let file_watcher = recommended_watcher(move |event: Result| { + // Notify and refresh the GUI whenever there's an update to one of the project files. + + // This is a really horrible hack, but I have no idea how to better fix it and it seems + // to be what the "experts" are doing as well (I looked at a higher-level library for + // watching for file changes). Basically, sometimes we get this notification before the + // file is available on disk. We need to check and possibly wait to see if the file is + // actually ready. + if let Ok(event) = &event + && matches!(event.kind, EventKind::Create(_) | EventKind::Modify(_)) + { + while !event.paths.iter().all(|path| path.exists()) { + std::thread::sleep(Duration::from_millis(10)); + } + } + + file_updates_tx.send(event).ok(); + wathcher_event_loop_proxy + .clone() + .send_event(WinitUserEvent::WakeUp) + .ok(); + }); + + commands.insert_resource(ExpressionField { + expression: String::new(), + }); + + commands.insert_resource(JobBridge { + expression_tx, + active_job: None, + last_result: None, + log_messages: Vec::new(), + watched_files: HashSet::new(), + file_watcher, + file_updates_rx, + }); + + commands.insert_resource(ViewState2d::default()); + commands.insert_resource(GridSettings::default()); +} + +fn apply_display_scaling(mut windows: Query<&mut Window>) { + for mut window in windows.iter_mut() { + let base = window.resolution.base_scale_factor(); + + eprintln!( + "Window: physical={}x{}, logical={}, base_scale={}", + window.physical_width(), + window.physical_height(), + window.resolution.width(), + base + ); + + // Steam Deck (1280x800) with KDE Plasma on Wayland reports an extremely + // high scale factor (4.5) even at "100%" display settings, because KDE + // calculates high DPI from the small screen size. This makes UI elements + // appear far too large. Override to a more reasonable value. + if base > 2.0 { + window.resolution.set_scale_factor_override(Some(2.0)); + eprintln!("Applied scale factor override: 2.0"); + } + } +} + +#[derive(Debug)] +struct GuiLogger { + sender: mpsc::Sender, +} + +impl RuntimeLog for GuiLogger { + fn push_message(&self, message: LogMessage) { + self.sender.send(message).ok(); + } + + fn collect_syntax_errors<'t>( + &self, + _input: &str, + _tree: &'t interpreter::compile::RootTree, + _file: &'t Arc, + _span: SourceReference, + ) { + } +} + +struct Job { + expression: String, + response: oneshot::Sender, + shutdown_signal: Arc, +} + +impl std::fmt::Debug for Job { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("RuntimeJob") + .field("expression", &self.expression) + .field("shutdown_signal", &self.shutdown_signal) + .finish() + } +} + +struct PendingJob { + shutdown_signal: Arc, + response: Mutex>, +} + +enum JobOutput { + TextValue(String), + LineString(LineString), + Polygon { + polygon: Polygon, + mesh: Arc, + }, + PolygonSet { + polygon_set: PolygonSet, + meshes: Vec>, + }, + ManifoldMesh(ManifoldMeshState), +} + +struct ManifoldMeshState { + manifold: ManifoldMesh3D, + uploaded_to_gpu: bool, +} + +enum JobError { + Execution(interpreter::Error), + Parse(String), + Compile(String), +} + +impl Display for JobError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + JobError::Execution(error) => error.fmt(f), + JobError::Parse(error) => error.fmt(f), + JobError::Compile(error) => error.fmt(f), + } + } +} + +struct RuntimeOutput { + result: Result, + files_to_watch: HashSet>, + log_messages: Vec, +} + +fn job_executor( + expression_rx: mpsc::Receiver, + event_loop_proxy: EventLoopProxy, +) { + let database = BuiltinCallableDatabase::new(); + let prelude = build_prelude(&database); + let stack_top = StackScope::top(&prelude); + + let mut parser = new_parser(); + let repl_file = Arc::new(PathBuf::from("repl.ccm")); + + // TODO we should prefer using `.ccad` in the local directory. + // Also we shouldn't be unwrapping on that. + let store_directory = TempDir::new().unwrap(); + let store = Store::FsStore(FsStore::new(store_directory.path())); + + let mut run_expression = |shutdown_signal: Arc, input: String| -> RuntimeOutput { + let (log_tx, log_rx) = mpsc::channel(); + let log = GuiLogger { sender: log_tx }; + + let files = Mutex::new(HashMap::new()); + let tree = match parser + .parse(&input, None) + .map_err(|error| JobError::Parse(format!("Failed to parse input: {error:?}"))) + { + Ok(tree) => tree, + Err(error) => { + let log_messages = log_rx.try_iter().collect(); + return RuntimeOutput { + result: Err(error), + files_to_watch: HashSet::new(), + log_messages, + }; + } + }; + let root = match compile(&repl_file, &input, &tree) + .map_err(|error| JobError::Compile(format!("Failed to compile: {error:?}"))) + { + Ok(root) => root, + Err(error) => { + let log_messages = log_rx.try_iter().collect(); + return RuntimeOutput { + result: Err(error), + files_to_watch: HashSet::new(), + log_messages, + }; + } + }; + + let context = ExecutionContext { + shutdown_singal: &shutdown_signal, + log: &log as &dyn RuntimeLog, + stack_trace: &StackTrace::top(root.reference.clone()), + stack: &stack_top, + database: &database, + store: &store, + file_cache: &files, + working_directory: Path::new("."), + import_limit: 100, + }; + + let expression_result = execute_expression(&context, &root); + + let result = match expression_result { + Ok(Value::LineString(line_string)) => Ok(JobOutput::LineString(line_string)), + Ok(Value::Polygon(polygon)) => { + let mesh = build_fill_mesh_from_polygon(&polygon.0); + + Ok(JobOutput::Polygon { polygon, mesh }) + } + Ok(Value::PolygonSet(polygon_set)) => { + let meshes = polygon_set + .0 + .iter() + .map(build_fill_mesh_from_polygon) + .collect(); + + Ok(JobOutput::PolygonSet { + polygon_set, + meshes, + }) + } + Ok(Value::ManifoldMesh3D(manifold)) => Ok(JobOutput::ManifoldMesh(ManifoldMeshState { + manifold, + uploaded_to_gpu: false, + })), + Ok(value) => { + let mut text = String::new(); + value.format(&context, &mut text, Style::Default, None).ok(); + + Ok(JobOutput::TextValue(text)) + } + Err(error) => Err(JobError::Execution(error)), + }; + + let files = files.into_inner().expect("File hashmap was poisoned"); + let files_to_watch: HashSet> = files.keys().cloned().collect(); + + drop(log); + let log_messages = log_rx.try_iter().collect(); + + RuntimeOutput { + result, + files_to_watch, + log_messages, + } + }; + + // An error indicates that there are no more senders and that we should shutdown. + while let Ok(job) = expression_rx.recv() { + let result = run_expression(job.shutdown_signal, job.expression); + job.response.send(result).ok(); + event_loop_proxy.send_event(WinitUserEvent::WakeUp).ok(); + } +} + +#[derive(Resource)] +struct ExpressionField { + expression: String, +} + +#[derive(Resource)] +struct JobBridge { + expression_tx: mpsc::Sender, + active_job: Option, + last_result: Option>, + log_messages: Vec, + watched_files: HashSet>, + file_watcher: Result, + file_updates_rx: Mutex>>, +} + +impl JobBridge { + fn spawn_job(&mut self, job: &str) { + if let Some(pending_job) = self.active_job.take() { + pending_job + .shutdown_signal + .store(true, std::sync::atomic::Ordering::Relaxed); + } + + let shutdown_signal = Arc::new(AtomicBool::new(false)); + + let (response_tx, response_rx) = oneshot::channel(); + + let pending_job = PendingJob { + shutdown_signal: shutdown_signal.clone(), + response: Mutex::new(response_rx), + }; + + let job = Job { + expression: job.into(), + response: response_tx, + shutdown_signal, + }; + + self.expression_tx + .send(job) + .expect("Runtime thread terminated early"); + self.active_job = Some(pending_job); + } + + fn check_if_watched_files_changed(&mut self) -> bool { + match self.file_updates_rx.get_mut().unwrap().try_recv() { + Ok(Ok(event)) => matches!(event.kind, EventKind::Modify(_) | EventKind::Create(_)), + Ok(Err(error)) => { + eprintln!("{error}"); + false + } + Err(_) => false, + } + } +} + +fn check_job(mut command_cad: ResMut) { + let command_cad = &mut *command_cad; + if let Some(active_job) = &mut command_cad.active_job { + // This could fail by the thread being closed, but that shouldn't happen and won't + // cause us to panic. + if let Ok(output) = active_job.response.get_mut().unwrap().try_recv() { + command_cad.last_result = Some(output.result); + command_cad.log_messages = output.log_messages; + command_cad.active_job = None; + + // Collect a list of files to watch. + if let Ok(watcher) = &mut command_cad.file_watcher { + // We used to be very picky, only adding and removing files from the wather as + // needed. It was eventually discovered that sometimes watchers that were not + // removed (and were not supposed to be removed) would fail to trigger on later + // edits of files, so now we just remove and re-add everything to make sure + // we're in a good known state. + + let mut paths = watcher.paths_mut(); + for path in command_cad.watched_files.iter() { + paths.remove(path).ok(); + } + + for path in output.files_to_watch.iter() { + paths.add(path, notify::RecursiveMode::NonRecursive).ok(); + } + } + + command_cad.watched_files = output.files_to_watch; + } + } +} + +#[allow(clippy::too_many_arguments)] +fn render_ui( + mut job_bridge: ResMut, + mut view_state_2d: ResMut, + mut view_state_3d: ResMut, + mut expression: ResMut, + mut grid_settings: ResMut, + mut contexts: EguiContexts, + mut clear_color: ResMut, + cameras: Query<&Transform, With>, +) -> Result { + let ctx = contexts.ctx_mut()?; + + let camera_transform = cameras.iter().next(); + let mut draw_area = ctx.viewport_rect(); + let mut toolbar_height: f32 = 0.0; + + egui::TopBottomPanel::top("main_interface").show(ctx, |ui| { + let expression_editor = TextEdit::multiline(&mut expression.expression) + .code_editor() + .desired_width(f32::INFINITY) + .hint_text("expression"); + if ui.add(expression_editor).changed() + || job_bridge.check_if_watched_files_changed() + { + job_bridge.spawn_job(expression.expression.as_str()); + } + + toolbar_height = ui.max_rect().height(); + + ui.horizontal(|ui| { + if job_bridge.active_job.is_some() { + ui.label(RichText::new("Working...").color(Color32::YELLOW)); + } else { + ui.label(RichText::new("Ready").color(Color32::GREEN)); + } + + view_state_2d.draw_interface(ui, &job_bridge.last_result); + + if let Some(cam) = &camera_transform + && let Some(Ok(JobOutput::ManifoldMesh(_state))) = &job_bridge.last_result + { + #[allow(clippy::collapsible_if)] + if ui.button("Fit to screen").clicked() { + view_state_3d.fit_to_screen( + draw_area, + cam, + toolbar_height, + &_state.manifold, + ); + } + } + + ui.label("Grid Size:"); + if ui.add(egui::TextEdit::singleline(&mut grid_settings.unit_string).desired_width(50.0)).changed() { + grid_settings.parse(); + } + + view_state_3d.draw_interface(ui, &job_bridge.last_result); + }); + + if let Err(error) = &job_bridge.file_watcher { + ui.label( + RichText::new(format!("Failed to setup file watching: {error}\nOutput will not update automatically when files are modified")) + .color(Color32::YELLOW), + ); + } + + if !job_bridge.log_messages.is_empty() { + let has_warnings = job_bridge.log_messages.iter().any(|m| m.level == LogLevel::Warning); + let icon_color = if has_warnings { Color32::YELLOW } else { Color32::WHITE }; + let icon_text = if has_warnings { "⚠" } else { "ℹ" }; + + egui::CollapsingHeader::new(RichText::new(icon_text).color(icon_color)) + .default_open(false) + .show(ui, |ui| { + egui::ScrollArea::vertical().show(ui, |ui| { + for message in &job_bridge.log_messages { + let color = match message.level { + LogLevel::Info => Color32::WHITE, + LogLevel::Warning => Color32::YELLOW, + }; + ui.label(RichText::new(format!("{message}")).color(color)); + } + }); + }); + } + + // Inform Bevy of our background color. + let visuals = ui.visuals(); + let background_color = visuals.panel_fill; + *clear_color = ClearColor(Color::Srgba(Srgba::rgb(background_color.r() as f32 / 255.0, background_color.g() as f32 / 255.0, background_color.b() as f32 / 255.0))); + + draw_area.min.y += toolbar_height; + }); + + fn draw_thing(ctx: &egui::Context, draw: impl FnOnce(&mut egui::Ui, egui::Rect)) -> egui::Rect { + let response = egui::CentralPanel::default().show(ctx, |ui| { + let draw_area = ui.available_rect_before_wrap(); + draw(ui, draw_area); + draw_area + }); + response.response.rect + } + + match &mut job_bridge.last_result { + None => {} + Some(Ok(JobOutput::TextValue(text))) => { + draw_thing(ctx, |ui, _draw_area| { + egui::ScrollArea::vertical().show(ui, |ui| { + ui.label(text.as_str()); + }); + }); + } + Some(Ok(JobOutput::LineString(line_string))) => { + let draw_area = draw_thing(ctx, |ui, draw_area| { + if view_state_2d.fit_to_screen_requested { + view_state_2d + .fit_to_screen(&JobOutput::LineString(line_string.clone()), draw_area); + view_state_2d.fit_to_screen_requested = false; + } + let painter = view_state_2d.prep_for_painting(ui); + let pixels_per_meter = view_state_2d.pixels_per_meter(); + let center_offset = draw_area.center().to_vec2(); + let view_offset = + egui::Vec2::new(view_state_2d.offset().x, view_state_2d.offset().y); + + let transform = TSTransform { + scaling: pixels_per_meter, + translation: center_offset + view_offset * pixels_per_meter, + }; + painter.add(paint_linestring( + &transform, + StrokeKind::Middle, + &line_string.0, + )); + draw_grid(&painter, draw_area, &view_state_2d, &grid_settings); + }); + ctx.input(|state| { + view_state_2d.track_movement(state, draw_area); + }); + } + Some(Ok(JobOutput::Polygon { polygon, mesh })) => { + let draw_area = draw_thing(ctx, |ui, draw_area| { + if view_state_2d.fit_to_screen_requested { + view_state_2d.fit_to_screen( + &JobOutput::Polygon { + polygon: polygon.clone(), + mesh: mesh.clone(), + }, + draw_area, + ); + view_state_2d.fit_to_screen_requested = false; + } + let painter = view_state_2d.prep_for_painting(ui); + paint_polygon( + &painter, + draw_area, + &view_state_2d, + &polygon.0, + mesh.clone(), + ); + }); + ctx.input(|state| { + view_state_2d.track_movement(state, draw_area); + }); + } + Some(Ok(JobOutput::PolygonSet { + polygon_set, + meshes, + })) => { + let draw_area = draw_thing(ctx, |ui, draw_area| { + if view_state_2d.fit_to_screen_requested { + view_state_2d.fit_to_screen( + &JobOutput::PolygonSet { + polygon_set: polygon_set.clone(), + meshes: meshes.clone(), + }, + draw_area, + ); + view_state_2d.fit_to_screen_requested = false; + } + let painter = view_state_2d.prep_for_painting(ui); + draw_grid(&painter, draw_area, &view_state_2d, &grid_settings); + for (polygon, mesh) in polygon_set.0.iter().zip(meshes.iter()) { + paint_polygon(&painter, draw_area, &view_state_2d, polygon, mesh.clone()); + } + draw_grid(&painter, draw_area, &view_state_2d, &grid_settings); + }); + ctx.input(|state| { + view_state_2d.track_movement(state, draw_area); + }); + } + Some(Ok(JobOutput::ManifoldMesh(_manifold_state))) => { + if let Some(camera_transform) = cameras.iter().next() { + ctx.input(|state| { + view_state_3d.track_movement(camera_transform, state, draw_area); + }); + } + } + Some(Err(error)) => { + draw_thing(ctx, |ui, _draw_area| { + ui.label(RichText::new(format!("{error}")).color(Color32::RED)); + }); + } + } + + Ok(()) +} diff --git a/gui/src/visualize2d.rs b/gui/src/visualize2d.rs new file mode 100644 index 0000000..b3b69d0 --- /dev/null +++ b/gui/src/visualize2d.rs @@ -0,0 +1,264 @@ +/* + * Copyright 2026 James Carl + * AGPL-3.0-only or AGPL-3.0-or-later + * + * This file is part of Command Cad. + * + * Command CAD is free software: you can redistribute it and/or modify it under the terms of + * the GNU Affero General Public License as published by the Free Software Foundation, either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License along with this + * program. If not, see . + */ +use bevy::ecs::resource::Resource; +use egui::{ + Color32, Mesh, Painter, Pos2, Rect, Shape, StrokeKind, Ui, Vec2, + emath::TSTransform, + epaint::{ColorMode, PathShape, PathStroke}, +}; +use interpreter::geo::{BoundingRect, TriangulateEarcut}; +use std::sync::Arc; + +use crate::grid::GridSettings; +use crate::{JobError, JobOutput}; + +pub fn draw_grid( + painter: &Painter, + draw_area: Rect, + view_state: &ViewState2d, + grid_settings: &GridSettings, +) { + let world_step = match grid_settings.world_step() { + Some(ws) => ws, + None => return, + }; + + let pixels_per_meter = view_state.pixels_per_meter(); + let pixels_per_cell = world_step * pixels_per_meter; + + // Skip if cells are too small to be useful + if pixels_per_cell < 3.0 { + return; + } + + let visuals = painter.ctx().style().visuals.clone(); + let grid_color = visuals.weak_text_color(); + + let center_offset = draw_area.center().to_vec2(); + let view_offset = Vec2::new(view_state.offset().x, view_state.offset().y); + + // Calculate the world position of the edges of the draw area + let left_world = (draw_area.left() - center_offset.x) / pixels_per_meter - view_offset.x; + let right_world = (draw_area.right() - center_offset.x) / pixels_per_meter - view_offset.x; + let top_world = (draw_area.top() - center_offset.y) / pixels_per_meter - view_offset.y; + let bottom_world = (draw_area.bottom() - center_offset.y) / pixels_per_meter - view_offset.y; + + let screen_top = draw_area.top(); + let screen_bottom = draw_area.bottom(); + + // Draw vertical lines — compute position directly from index to avoid floating point drift + let first_line_idx = (left_world / world_step).floor(); + let last_line_idx = (right_world / world_step).floor(); + for i in (first_line_idx as i32)..=(last_line_idx as i32) { + let world_x = (i as f32) * world_step; + let x = (world_x + view_offset.x) * pixels_per_meter + center_offset.x; + painter.line_segment( + [Pos2::new(x, screen_top), Pos2::new(x, screen_bottom)], + (1.0, grid_color), + ); + } + + // Draw horizontal lines — compute position directly from index + let first_line_idx = (top_world / world_step).floor(); + let last_line_idx = (bottom_world / world_step).floor(); + for i in (first_line_idx as i32)..=(last_line_idx as i32) { + let world_y = (i as f32) * world_step; + let y = (world_y + view_offset.y) * pixels_per_meter + center_offset.y; + painter.line_segment( + [ + Pos2::new(draw_area.left(), y), + Pos2::new(draw_area.right(), y), + ], + (1.0, grid_color), + ); + } +} + +#[derive(Debug, Resource)] +pub struct ViewState2d { + offset: egui::Vec2, + zoom: f32, + pub fit_to_screen_requested: bool, +} + +impl Default for ViewState2d { + fn default() -> Self { + let mut view_state = ViewState2d { + offset: egui::Vec2::ZERO, + zoom: 0.0, + fit_to_screen_requested: false, + }; + view_state.set_pixels_per_meter(10.0); + view_state + } +} + +impl ViewState2d { + // Percentage of scale per scale factor unit. + const SCALE_FACTOR: f32 = 1.01; + + pub fn track_movement(&mut self, input_state: &egui::InputState, draw_area: egui::Rect) { + if let Some(pos) = input_state.pointer.interact_pos() { + if !draw_area.contains(pos) { + return; + } + } else { + return; + } + + self.zoom += input_state.smooth_scroll_delta.y; + self.zoom = self.zoom.max(0.0); + + if input_state.pointer.primary_down() { + let drag_delta = input_state.pointer.delta(); + let delta = drag_delta / self.pixels_per_meter(); + self.offset += egui::Vec2::new(delta.x, delta.y); + } + } + + pub fn prep_for_painting(&mut self, ui: &mut Ui) -> Painter { + let draw_area = ui.available_rect_before_wrap(); + Painter::new(ui.ctx().clone(), ui.layer_id(), draw_area) + } + + pub fn pixels_per_meter(&self) -> f32 { + Self::SCALE_FACTOR.powf(self.zoom) + } + + pub fn set_pixels_per_meter(&mut self, pixels_per_meter: f32) { + self.zoom = pixels_per_meter.log(Self::SCALE_FACTOR); + } + + pub fn offset(&self) -> Vec2 { + self.offset + } + + pub fn fit_to_screen(&mut self, value: &JobOutput, draw_area: Rect) { + let bounds = match value { + JobOutput::LineString(line_string) => line_string.0.bounding_rect(), + JobOutput::Polygon { polygon, .. } => polygon.0.bounding_rect(), + JobOutput::PolygonSet { polygon_set, .. } => polygon_set.0.bounding_rect(), + _ => None, + }; + + if let Some(bounds) = bounds { + let size = bounds.max() - bounds.min(); + let dx = draw_area.x_range().span() / size.x as f32; + let dy = draw_area.y_range().span() / size.y as f32; + let pixels_per_meter = dx.min(dy); + self.set_pixels_per_meter(pixels_per_meter); + + let center = bounds.center(); + self.offset = egui::Vec2::new(-center.x as f32, center.y as f32); + } else { + *self = ViewState2d::default(); + } + } + + pub fn draw_interface( + &mut self, + ui: &mut Ui, + last_result: &Option>, + ) { + if let Some(Ok(value)) = last_result + && matches!( + value, + JobOutput::LineString(_) | JobOutput::Polygon { .. } | JobOutput::PolygonSet { .. } + ) + && ui.button("Fit to screen").clicked() + { + self.fit_to_screen_requested = true; + } + } +} + +pub fn paint_linestring( + transform: &TSTransform, + stroke_kind: StrokeKind, + line_string: &interpreter::geo::LineString, +) -> Shape { + let path = PathShape { + points: line_string + .coords() + .map(|coord| transform.mul_pos(Pos2::new(coord.x as f32, -coord.y as f32))) + .collect(), + closed: line_string.is_closed(), + fill: Color32::TRANSPARENT, + stroke: PathStroke { + width: 2.0, + color: ColorMode::Solid(Color32::WHITE), + kind: stroke_kind, + }, + }; + Shape::Path(path) +} + +pub fn build_fill_mesh_from_polygon(polygon: &interpreter::geo::Polygon) -> Arc { + let mut mesh = Mesh::default(); + let triangulation = polygon.earcut_triangles_raw(); + for vert in triangulation.vertices.chunks(2) { + let x = vert[0]; + let y = vert[1]; + + mesh.colored_vertex(Pos2::new(x as f32, -y as f32), Color32::GRAY); + } + + for triangle in triangulation.triangle_indices.chunks(3) { + let a = triangle[0]; + let b = triangle[1]; + let c = triangle[2]; + + mesh.add_triangle(a as u32, b as u32, c as u32); + } + + Arc::new(mesh) +} + +pub fn paint_polygon( + painter: &Painter, + draw_area: Rect, + view_state: &ViewState2d, + polygon: &interpreter::geo::Polygon, + mesh: Arc, +) { + let pixels_per_meter = view_state.pixels_per_meter(); + let center_offset = draw_area.center().to_vec2(); + let view_offset = Vec2::new(view_state.offset.x, view_state.offset.y); + + let transform = TSTransform { + scaling: pixels_per_meter, + translation: center_offset + view_offset * pixels_per_meter, + }; + + // Render fill + let mut shape = Shape::Mesh(mesh); + shape.transform(transform); + painter.add(shape); + + // Render exterior + painter.add(paint_linestring( + &transform, + StrokeKind::Inside, + polygon.exterior(), + )); + + // Render interior. + for interior in polygon.interiors() { + painter.add(paint_linestring(&transform, StrokeKind::Outside, interior)); + } +} diff --git a/gui/src/visualize3d.rs b/gui/src/visualize3d.rs new file mode 100644 index 0000000..d9b012c --- /dev/null +++ b/gui/src/visualize3d.rs @@ -0,0 +1,572 @@ +/* + * Copyright 2026 James Carl + * AGPL-3.0-only or AGPL-3.0-or-later + * + * This file is part of Command Cad. + * + * Command CAD is free software: you can redistribute it and/or modify it under the terms of + * the GNU Affero General Public License as published by the Free Software Foundation, either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License along with this + * program. If not, see . + */ +use bevy::{ + anti_alias::smaa::Smaa, + asset::RenderAssetUsages, + camera::ScalingMode, + color::palettes::css, + pbr::wireframe::{Wireframe, WireframeColor}, + prelude::*, + {ecs::system::Query, mesh::PrimitiveTopology}, +}; +use bevy_mod_outline::{OutlineMode, OutlineVolume}; + +use crate::grid::GridSettings; +use crate::{JobBridge, JobOutput}; +use interpreter::values::manifold_mesh::ManifoldMesh3D; + +const GRID_MAX_EXTENT: f32 = 10.0; +const GRID_LINE_SCREEN_WIDTH: f32 = 1.0; // target line width in screen pixels + +#[derive(Component)] +pub struct GridEntity; + +const VIEW_Z_OFFSET: f32 = -10.0; + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum AxisView { + XPlus, + XMinus, + YPlus, + YMinus, + ZPlus, + ZMinus, +} + +#[derive(Debug, Resource)] +pub struct ViewState3d { + offset: bevy::prelude::Vec3, + zoom: f32, + rotation_x: f32, + rotation_y: f32, + show_wireframe: bool, +} + +impl Default for ViewState3d { + fn default() -> Self { + let mut view_state = ViewState3d { + offset: bevy::prelude::Vec3::ZERO, + zoom: 0.0, + rotation_x: 0.0, + rotation_y: 0.0, + show_wireframe: false, + }; + view_state.set_pixels_per_meter(10.0); + view_state + } +} + +impl ViewState3d { + pub fn offset(&self) -> bevy::prelude::Vec3 { + self.offset + } +} + +impl ViewState3d { + // Percentage of scale per scale factor unit. + const SCALE_FACTOR: f32 = 1.01; + const POINTER_SCALE: f32 = 0.007; + + pub fn pixels_per_meter(&self) -> f32 { + Self::SCALE_FACTOR.powf(self.zoom) + } + + pub fn set_pixels_per_meter(&mut self, pixels_per_meter: f32) { + self.zoom = pixels_per_meter.log(Self::SCALE_FACTOR); + } + + pub fn fit_to_screen( + &mut self, + draw_area: egui::Rect, + camera_transform: &Transform, + toolbar_offset: f32, + manifold: &ManifoldMesh3D, + ) { + let camera_rotation = camera_transform.rotation; + let camera_inverse = camera_rotation.inverse(); + + let mut min = Vec3::MAX; + let mut max = Vec3::MIN; + + for p in manifold + .0 + .triangles() + .flat_map(|triangle| triangle.positions) + { + let v = Vec3::new(p.x as f32, p.y as f32, p.z as f32); + let p_local = camera_inverse * v; + + min = min.min(p_local); + max = max.max(p_local); + } + + let size = max - min; + let dx = draw_area.x_range().span() / size.x; + let dy = draw_area.y_range().span() / size.y; + let pixels_per_meter = dx.min(dy); + self.set_pixels_per_meter(pixels_per_meter); + + self.offset = camera_rotation * ((min + max) / 2.0) + + camera_rotation * Vec3::new(0.0, toolbar_offset / pixels_per_meter / 2.0, 0.0); + } + + pub fn snap_to_axis_view(&mut self, axis: AxisView) { + match axis { + AxisView::XPlus => { + self.rotation_y = 0.0; + self.rotation_x = 0.0; + } + AxisView::XMinus => { + self.rotation_y = std::f32::consts::PI; + self.rotation_x = 0.0; + } + AxisView::YPlus => { + self.rotation_y = std::f32::consts::FRAC_PI_2; + self.rotation_x = 0.0; + } + AxisView::YMinus => { + self.rotation_y = -std::f32::consts::FRAC_PI_2; + self.rotation_x = 0.0; + } + AxisView::ZPlus => { + self.rotation_y = 0.0; + self.rotation_x = -std::f32::consts::FRAC_PI_2; + } + AxisView::ZMinus => { + self.rotation_y = 0.0; + self.rotation_x = std::f32::consts::PI / 2.0; + } + } + } + + pub fn draw_interface( + &mut self, + ui: &mut egui::Ui, + last_result: &Option>, + ) { + if let Some(Ok(JobOutput::ManifoldMesh(_state))) = last_result { + ui.checkbox(&mut self.show_wireframe, "Show Wireframe"); + + ui.separator(); + + ui.horizontal(|ui| { + if ui.button("X+").clicked() { + self.snap_to_axis_view(AxisView::XPlus); + } + if ui.button("X-").clicked() { + self.snap_to_axis_view(AxisView::XMinus); + } + if ui.button("Y+").clicked() { + self.snap_to_axis_view(AxisView::YPlus); + } + if ui.button("Y-").clicked() { + self.snap_to_axis_view(AxisView::YMinus); + } + if ui.button("Z+").clicked() { + self.snap_to_axis_view(AxisView::ZPlus); + } + if ui.button("Z-").clicked() { + self.snap_to_axis_view(AxisView::ZMinus); + } + }); + } + } + + pub fn track_movement( + &mut self, + camera_transform: &Transform, + input_state: &egui::InputState, + draw_area: egui::Rect, + ) { + if let Some(pos) = input_state.pointer.interact_pos() { + if !draw_area.contains(pos) { + return; + } + } else { + return; + } + + self.zoom += input_state.smooth_scroll_delta.y; + self.zoom = self.zoom.max(0.0); + + if input_state.pointer.primary_down() { + let drag_delta = input_state.pointer.delta(); + let delta = drag_delta / self.pixels_per_meter(); + let right = camera_transform.right(); + let up = camera_transform.up(); + + self.offset += right * -delta.x + up * delta.y; + } else if input_state.pointer.secondary_down() { + let drag_delta = input_state.pointer.delta(); + + // TODO These probably need to be scaled differently on a 4k display. + // It would be best to base the rotation factor based off the viewport size. + self.rotation_x += drag_delta.y * Self::POINTER_SCALE; + self.rotation_y += drag_delta.x * Self::POINTER_SCALE; + + self.rotation_x = self + .rotation_x + .clamp(-89_f32.to_radians(), 89_f32.to_radians()); + self.rotation_y = self + .rotation_y + .clamp(-std::f32::consts::PI, std::f32::consts::PI); + } + } +} + +fn build_grid_mesh(world_step: f32, line_half_thickness: f32, grid_extent: f32) -> Mesh { + let mut m = Mesh::new( + PrimitiveTopology::TriangleList, + RenderAssetUsages::default(), + ); + let mut positions = vec![]; + let mut normals = vec![]; + + let first_line_idx = (-grid_extent / world_step).floor() as i32; + let last_line_idx = (grid_extent / world_step).ceil() as i32; + + for i in first_line_idx..=last_line_idx { + let pos = (i as f32) * world_step; + + // Vertical lines (along local Y axis) — thin quad centered at x = pos + let t = line_half_thickness; + let e = grid_extent; + + // Front face (CCW from +Z, normals +Z) + positions.push([pos - t, -e, 0.0]); + positions.push([pos + t, -e, 0.0]); + positions.push([pos - t, e, 0.0]); + positions.push([pos - t, e, 0.0]); + positions.push([pos + t, -e, 0.0]); + positions.push([pos + t, e, 0.0]); + + // Back face (CCW from -Z, normals -Z) + positions.push([pos - t, -e, 0.0]); + positions.push([pos - t, e, 0.0]); + positions.push([pos + t, -e, 0.0]); + positions.push([pos + t, -e, 0.0]); + positions.push([pos - t, e, 0.0]); + positions.push([pos + t, e, 0.0]); + + // Horizontal lines (along local X axis) — thin quad centered at y = pos + // Front face (CCW from +Z, normals +Z) + positions.push([-e, pos - t, 0.0]); + positions.push([e, pos - t, 0.0]); + positions.push([-e, pos + t, 0.0]); + positions.push([-e, pos + t, 0.0]); + positions.push([e, pos - t, 0.0]); + positions.push([e, pos + t, 0.0]); + + // Back face (CCW from -Z, normals -Z) + positions.push([-e, pos - t, 0.0]); + positions.push([-e, pos + t, 0.0]); + positions.push([e, pos - t, 0.0]); + positions.push([e, pos - t, 0.0]); + positions.push([-e, pos + t, 0.0]); + positions.push([e, pos + t, 0.0]); + + for _ in 0..12 { + normals.push([0.0, 0.0, 1.0]); + } + for _ in 0..12 { + normals.push([0.0, 0.0, -1.0]); + } + } + + m.insert_attribute(Mesh::ATTRIBUTE_POSITION, positions); + m.insert_attribute(Mesh::ATTRIBUTE_NORMAL, normals); + m +} + +#[allow(clippy::type_complexity)] +pub fn update_grid( + mut grid: Query<(&mut Transform, &mut Visibility, &GridEntity, &Mesh3d)>, + cameras: Query<(&Camera, &Transform), (With, Without)>, + view_state_3d: Res, + grid_settings: Res, + mut meshes: ResMut>, +) { + let Some((camera, camera_transform)) = cameras.iter().next() else { + return; + }; + + let cam_back = camera_transform.rotation * Vec3::Z; + let cam_right = camera_transform.rotation * Vec3::X; + let cam_up = camera_transform.rotation * Vec3::Y; + + let grid_rot = Mat4::from_cols( + Vec4::new(cam_right.x, cam_right.y, cam_right.z, 0.0), + Vec4::new(cam_up.x, cam_up.y, cam_up.z, 0.0), + Vec4::new(cam_back.x, cam_back.y, cam_back.z, 0.0), + Vec4::new(0.0, 0.0, 0.0, 1.0), + ); + + let viewport = match camera.physical_viewport_size() { + Some(size) => size, + None => return, + }; + + let pixels_per_meter = view_state_3d.pixels_per_meter(); + let visible_x = viewport.x as f32 / pixels_per_meter; + let visible_y = viewport.y as f32 / pixels_per_meter; + let grid_extent = (visible_x.max(visible_y) * 1.25).max(GRID_MAX_EXTENT); + + for (mut transform, mut visibility, _grid, mesh_handle) in &mut grid { + transform.translation = Vec3::ZERO; + transform.rotation = Quat::from_mat4(&grid_rot); + + if grid_settings.world_step().is_some() { + let world_step = grid_settings.world_step().unwrap_or(0.01); + let pixels_per_cell = world_step * pixels_per_meter; + + if pixels_per_cell < 3.0 { + *visibility = Visibility::Hidden; + } else { + *visibility = Visibility::Visible; + let line_half_thickness = GRID_LINE_SCREEN_WIDTH / pixels_per_meter / 2.0; + + if let Some(mesh) = meshes.get_mut(&mesh_handle.0) { + *mesh = build_grid_mesh(world_step, line_half_thickness, grid_extent); + } + } + } else { + *visibility = Visibility::Hidden; + } + } +} + +pub fn setup_3d( + mut commands: Commands, + grid_settings: Option>, + mut meshes: ResMut>, + mut materials: ResMut>, +) { + commands.spawn(( + Camera3d::default(), + Projection::from(OrthographicProjection { + scaling_mode: ScalingMode::WindowSize, + ..OrthographicProjection::default_3d() + }), + Transform::from_xyz(0.0, 0.0, VIEW_Z_OFFSET).looking_at(Vec3::ZERO, Vec3::Y), + Smaa::default(), + )); + + commands.spawn(( + DirectionalLight { + illuminance: light_consts::lux::AMBIENT_DAYLIGHT, + ..default() + }, + Transform::from_xyz(2.0, 4.0, -2.0).looking_at(Vec3::ZERO, Vec3::Y), + )); + commands.insert_resource(GlobalAmbientLight { + brightness: light_consts::lux::HALLWAY, + ..default() + }); + + if let Some(grid_settings) = grid_settings { + let world_step = grid_settings.world_step().unwrap_or(0.01); + let initial_thickness = GRID_LINE_SCREEN_WIDTH / 10.0; + let grid_mesh = meshes.add(build_grid_mesh( + world_step, + initial_thickness, + GRID_MAX_EXTENT, + )); + commands.spawn(( + Mesh3d(grid_mesh), + MeshMaterial3d(materials.add(StandardMaterial { + base_color: Color::Srgba(css::DARK_GRAY), + unlit: true, + depth_bias: 1_000_000.0, + ..default() + })), + Transform::default(), + Visibility::Visible, + GridEntity, + )); + } + + commands.insert_resource(ViewState3d::default()); +} + +pub fn update_3d_camera( + view_state_3d: Res, + mut cameras: Query<&mut Projection, With>, +) { + for mut projection in &mut cameras { + if let Projection::Orthographic(projection) = &mut *projection { + projection.scale = 1.0 / view_state_3d.pixels_per_meter(); + } + } +} + +pub fn orbit_camera( + view_state_3d: Res, + mut cameras: Query<(&mut Transform, &Camera3d), With>, +) { + let radius = VIEW_Z_OFFSET.abs(); + let (yaw, pitch) = (view_state_3d.rotation_y, view_state_3d.rotation_x); + + let x = view_state_3d.offset().x + yaw.sin() * pitch.cos() * radius; + let z = view_state_3d.offset().z - yaw.cos() * pitch.cos() * radius; + let y = view_state_3d.offset().y + pitch.sin() * radius; + + let camera_pos = Vec3::new(x, y, z); + let forward = (view_state_3d.offset() - camera_pos).normalize(); + let back = -forward; + + let right = Vec3::Y.cross(back).normalize(); + let up = back.cross(right); + + let cam_rot = Mat4::from_cols( + Vec4::new(right.x, right.y, right.z, 0.0), + Vec4::new(up.x, up.y, up.z, 0.0), + Vec4::new(back.x, back.y, back.z, 0.0), + Vec4::new(0.0, 0.0, 0.0, 1.0), + ); + + for (mut transform, _camera) in &mut cameras { + transform.translation = camera_pos; + transform.rotation = Quat::from_mat4(&cam_rot); + } +} + +#[allow(clippy::type_complexity)] +pub fn orbit_light( + cameras: Query<&Transform, (With, Without)>, + mut lights: Query< + &mut Transform, + ( + With, + Without, + Without, + ), + >, +) { + let camera_transform = cameras.single().unwrap(); + for mut light in &mut lights { + light.translation = camera_transform.translation; + light.rotation = camera_transform.rotation; + } +} + +#[derive(Component)] +pub struct MeshModel; + +pub fn sync_wireframe_visibility( + view_state_3d: Res, + mut commands: Commands, + wireframe_entities: Query, With)>, + non_wireframe_entities: Query, Without)>, +) { + if !view_state_3d.show_wireframe { + for entity in &wireframe_entities { + commands.entity(entity).remove::(); + } + } else { + for entity in &non_wireframe_entities { + commands.entity(entity).insert(( + Wireframe, + WireframeColor { + color: bevy::color::palettes::css::BLACK.into(), + }, + )); + } + } +} + +pub fn spawn_meshes( + mut commands: Commands, + mut command_cad: ResMut, + mut meshes: ResMut>, + mut materials: ResMut>, + mesh_models: Query<(Entity, &Mesh3d), With>, +) { + if let Some(Ok(JobOutput::ManifoldMesh(manifold_state))) = &mut command_cad.last_result + && !manifold_state.uploaded_to_gpu + { + manifold_state.uploaded_to_gpu = true; + + // Start by removing the old model. + for (entity, mesh) in mesh_models.iter() { + meshes.remove(mesh.id()); + commands.entity(entity).try_despawn(); + } + + // Now build our mesh. + let mut m = Mesh::new( + PrimitiveTopology::TriangleList, + RenderAssetUsages::default(), + ); + let mut pos = vec![]; + let mut vns = vec![]; + for tri in manifold_state.manifold.0.triangles() { + let [p0, p1, p2] = tri.positions; + pos.push([p0.x as f32, p0.y as f32, p0.z as f32]); + pos.push([p1.x as f32, p1.y as f32, p1.z as f32]); + pos.push([p2.x as f32, p2.y as f32, p2.z as f32]); + vns.push([ + tri.normal.x as f32, + tri.normal.y as f32, + tri.normal.z as f32, + ]); + vns.push([ + tri.normal.x as f32, + tri.normal.y as f32, + tri.normal.z as f32, + ]); + vns.push([ + tri.normal.x as f32, + tri.normal.y as f32, + tri.normal.z as f32, + ]); + } + m.insert_attribute(Mesh::ATTRIBUTE_POSITION, pos); + m.insert_attribute(Mesh::ATTRIBUTE_NORMAL, vns); + + let fill_color = egui::Color32::GRAY; + let wireframe_color = egui::Color32::WHITE; + + commands.spawn(( + Mesh3d(meshes.add(m).clone()), + MeshMaterial3d(materials.add(StandardMaterial { + base_color: Color::Srgba(Srgba::rgb( + fill_color.r() as f32 / 255.0, + fill_color.g() as f32 / 255.0, + fill_color.b() as f32 / 255.0, + )), + ..default() + })), + Transform::default(), + OutlineVolume { + visible: true, + width: 2.0, + colour: Color::Srgba(Srgba::rgb( + wireframe_color.r() as f32 / 255.0, + wireframe_color.g() as f32 / 255.0, + wireframe_color.b() as f32 / 255.0, + )), + }, + OutlineMode::FloodFlatDoubleSided, + Wireframe, + WireframeColor { + color: bevy::color::palettes::css::BLACK.into(), + }, + MeshModel, + )); + } +} diff --git a/interpreter/Cargo.toml b/interpreter/Cargo.toml index c6a0fe3..de95ef2 100644 --- a/interpreter/Cargo.toml +++ b/interpreter/Cargo.toml @@ -15,12 +15,13 @@ enum_dispatch = "0.3" enum_downcast = { version = "0.1", features = [ "derive" ] } num-traits = "0.2" hashable-map = { version = "0.4.0", features = ["serde"] } +indexmap = { version = "2", features = ["serde"] } imstr = "0.2.0" -nalgebra = "0.34.1" +nalgebra = { workspace = true } stack = "0.4.0" paste = "1.0.15" tempfile = { workspace = true } -rayon = "1.11.0" +rayon = "1.11" nom = "8.0.0" ariadne = { workspace = true } levenshtein = "1.0.5" @@ -29,10 +30,15 @@ sha2 = "0.10.9" serde = { version = "1.0.228", features = ["derive"] } hex = "0.4.3" # boolmesh = { version = "0.1.7", features = ["rayon"] } -boolmesh = { git = "https://github.com/IamTheCarl/boolmesh.git", branch = "serde", features = ["rayon", "serde"] } +boolmesh = { git = "https://github.com/IamTheCarl/boolmesh.git", branch = "opencode-refactors", features = ["rayon", "serde"] } +# boolmesh = { path = "../../boolmesh", features = ["rayon", "serde"] } stl_io = "0.10.0" itertools = "0.14.0" thiserror = "2.0.18" +# We have to disable multi-threading to get deterministic results from geo. +geo = { version = "0.32", default-features = false, features = ["serde", "earcutr", "spade"] } +svg = "0.18" +ciborium = "0.2.2" [build-dependencies] type-sitter-gen = "0.8" diff --git a/interpreter/src/compile/expressions.rs b/interpreter/src/compile/expressions.rs index be0e045..3fabc5b 100644 --- a/interpreter/src/compile/expressions.rs +++ b/interpreter/src/compile/expressions.rs @@ -7,7 +7,7 @@ use unwrap_enum::EnumAs; use crate::{ compile::{constraint_set::ConstraintSet, unwrap_missing, Scalar}, - execution::find_all_variable_accesses_in_expression, + execution::{find_all_variable_accesses_in_expression, values::dictionary::ArgumentName}, }; use super::{nodes, AstNode, Error, Parse}; @@ -15,7 +15,7 @@ use super::{nodes, AstNode, Error, Parse}; /// Used for sorting operations that have dependencies on other operations for parallel execution. trait DependentOperation { fn original_index(&self) -> usize; - fn name(&self) -> &ImString; + fn name(&self) -> &ArgumentName; fn dependencies(&self) -> &HashableSet; } @@ -32,16 +32,29 @@ where let a = a.dependencies(); let b = b.dependencies(); - // Dependency takes president. - if a.contains(b_name) && a_index > b_index { - Ordering::Greater - } else if b.contains(a_name) && b_index > a_index { - Ordering::Less - } else { - // If they have no dependency on each other, put the ones with fewer dependencies - // as a higher priority. - a.len().cmp(&b.len()) + // Extract ImString from ArgumentName for dependency comparison. + // Positional args have empty dependency sets, so they'll sort first naturally. + let a_name_str = match a_name { + ArgumentName::Named(s) => Some(s), + ArgumentName::Positional(_) => None, + }; + let b_name_str = match b_name { + ArgumentName::Named(s) => Some(s), + ArgumentName::Positional(_) => None, + }; + + // Only check dependencies for named arguments (positional args have empty deps). + if let (Some(b_str), Some(a_str)) = (b_name_str, a_name_str) { + if a.contains(b_str) && a_index > b_index { + return Ordering::Greater; + } else if b.contains(a_str) && b_index > a_index { + return Ordering::Less; + } } + + // If they have no dependency on each other, put the ones with fewer dependencies + // as a higher priority. + a.len().cmp(&b.len()) }); let mut compute_groups = Vec::new(); @@ -825,19 +838,33 @@ impl<'t> Parse<'t, nodes::If<'t>> for IfExpression { pub struct DictionaryMemberAssignment { pub index: usize, pub dependencies: HashableSet, - pub name: AstNode, + pub name: ArgumentName, pub assignment: AstNode, } -impl<'t> Parse<'t, nodes::DictionaryMemberAssignment<'t>> for DictionaryMemberAssignment { +impl<'t> Parse<'t, nodes::DictionaryArgument<'t>> for DictionaryMemberAssignment { fn parse<'i>( file: &Arc, input: &'i str, - value: nodes::DictionaryMemberAssignment<'t>, + value: nodes::DictionaryArgument<'t>, ) -> Result, Error<'t, 'i>> { - let name = value.name()?; - let name = ImString::parse(file, input, name)?; - let assignment = Expression::parse(file, input, value.assignment()?)?; + let key = value.key()?; + let key_expr = Expression::parse(file, input, key)?; + + // Determine if this is a named or positional argument. + // A key expression that is a bare identifier with no value = positional arg. + // A key expression that has a value = named arg (key is the name). + let (name, assignment) = if let Some(val_node) = value.value() { + // Named argument: key is the name identifier + let assignment = Expression::parse(file, input, val_node?)?; + let name = extract_name_from_key(&key_expr); + (name, assignment) + } else { + // Positional argument: no value field + let assignment = key_expr; + let name = ArgumentName::Positional(0); // index set later + (name, assignment) + }; let mut dependencies = HashableSet::new(); @@ -861,13 +888,41 @@ impl<'t> Parse<'t, nodes::DictionaryMemberAssignment<'t>> for DictionaryMemberAs } } +/// Extract an ArgumentName from a key expression. +/// If the key is a bare identifier (no value), it's positional. +/// If the key has a value, the key itself is the name. +fn extract_name_from_key(key_expr: &AstNode) -> ArgumentName { + // Check if this is a named argument by looking at the raw node. + // A named argument has both key and value fields; the key is an identifier. + // Since we can't easily check the raw node here, we use a heuristic: + // If the key expression is a bare identifier, it could be positional (no value) or named (key). + // The distinction is already made in the parse function based on value() presence. + // Here, if we're called, it means value() was Some, so this is a named arg. + // Extract the identifier from the key expression. + if let Some(ident) = extract_identifier_from_expr(&key_expr.node) { + ArgumentName::Named(ident.clone()) + } else { + // Fallback - shouldn't happen for valid named args + ArgumentName::Positional(0) + } +} + +/// Try to extract an ImString identifier from an expression AST node. +fn extract_identifier_from_expr(node: &Expression) -> Option { + // Check if this is a bare identifier expression + match node { + Expression::Identifier(ident_node) => Some(ident_node.node.clone()), + _ => None, + } +} + impl DependentOperation for AstNode { fn original_index(&self) -> usize { self.node.index } - fn name(&self) -> &ImString { - &self.node.name.node + fn name(&self) -> &ArgumentName { + &self.node.name } fn dependencies(&self) -> &HashableSet { @@ -897,7 +952,7 @@ impl<'t> Parse<'t, nodes::DictionaryConstruction<'t>> for DictionaryConstruction ) -> Result, Error<'t, 'i>> { let mut assignments = Vec::new(); let mut cursor = value.walk(); - let assignments_iter = value.assignmentss(&mut cursor); + let assignments_iter = value.argumentss(&mut cursor); let mut variable_names = HashSet::new(); let mut index = 0; @@ -906,16 +961,25 @@ impl<'t> Parse<'t, nodes::DictionaryConstruction<'t>> for DictionaryConstruction let assignment = assignment?; // Skip the commas. - if let Some(assignment) = assignment.as_dictionary_member_assignment() { + if let Some(assignment) = assignment.as_dictionary_argument() { let mut assignment = DictionaryMemberAssignment::parse(file, input, assignment)?; assignment .node .dependencies .retain(|name| variable_names.contains(name)); assignment.node.index = index; - index += 1; - variable_names.insert(assignment.node.name.node.clone()); + // Update positional arg names with their actual index. + if let ArgumentName::Positional(_) = assignment.node.name { + assignment.node.name = ArgumentName::Positional(index); + } + + // Only named args are added to variable_names for dependency tracking. + if let ArgumentName::Named(ref name) = assignment.node.name { + variable_names.insert(name.clone()); + } + + index += 1; assignments.push(assignment); } } @@ -1097,6 +1161,7 @@ impl<'t> Parse<'t, nodes::MethodCall<'t>> for MethodCall { pub struct LetInAssignment { pub index: usize, pub ident: AstNode, + pub argument_name: ArgumentName, pub dependencies: HashableSet, pub value: AstNode, } @@ -1106,8 +1171,8 @@ impl DependentOperation for AstNode { self.node.index } - fn name(&self) -> &ImString { - &self.node.ident.node + fn name(&self) -> &ArgumentName { + &self.node.argument_name } fn dependencies(&self) -> &HashableSet { @@ -1122,6 +1187,7 @@ impl<'t> Parse<'t, nodes::LetInAssignment<'t>> for LetInAssignment { node: nodes::LetInAssignment<'t>, ) -> Result, Error<'t, 'i>> { let ident = ImString::parse(file, input, node.ident()?)?; + let ident_name = ident.node.clone(); let value = Expression::parse(file, input, node.value()?)?; @@ -1140,6 +1206,7 @@ impl<'t> Parse<'t, nodes::LetInAssignment<'t>> for LetInAssignment { Self { index: 0, ident, + argument_name: ArgumentName::Named(ident_name), dependencies, value, }, @@ -1351,13 +1418,7 @@ mod test { let a = &construction_expression.node.assignments[0]; let b = &construction_expression.node.assignments[1]; - assert_eq!( - a.node.name, - AstNode { - reference: a.node.name.reference.clone(), - node: "a".into() - } - ); + assert_eq!(a.node.name, ArgumentName::Named("a".into())); assert_eq!( a.node.assignment, AstNode { @@ -1369,13 +1430,7 @@ mod test { } ); - assert_eq!( - b.node.name, - AstNode { - reference: b.node.name.reference.clone(), - node: "b".into() - } - ); + assert_eq!(b.node.name, ArgumentName::Named("b".into())); assert_eq!( b.node.assignment, AstNode { @@ -2028,10 +2083,7 @@ mod test { reference: dict_assignment.reference.clone(), node: DictionaryMemberAssignment { index: 0, - name: AstNode { - reference: dict_assignment.node.name.reference.clone(), - node: "value".into() - }, + name: ArgumentName::Named("value".into()), dependencies: HashableSet::from(HashSet::from_iter([])), assignment: AstNode { reference: dict_assignment @@ -2146,10 +2198,7 @@ mod test { node: DictionaryMemberAssignment { index: 0, dependencies: HashableSet::from(HashSet::from_iter([])), - name: AstNode { - reference: dict_assignment.node.name.reference.clone(), - node: "value".into() - }, + name: ArgumentName::Named("value".into()), assignment: AstNode { reference: dict_assignment .node @@ -2215,6 +2264,7 @@ mod test { reference: value1_ident.reference.clone(), node: "value1".into(), }, + argument_name: ArgumentName::Named("value1".into()), index: 0, dependencies: HashableSet::new(), value: AstNode { @@ -2233,6 +2283,7 @@ mod test { reference: value2_ident.reference.clone(), node: "value2".into(), }, + argument_name: ArgumentName::Named("value2".into()), index: 1, dependencies: HashableSet::new(), value: AstNode { @@ -2265,6 +2316,7 @@ mod test { #[derive(Debug, PartialEq, Eq)] struct TestDependency { name: ImString, + argument_name: ArgumentName, index: usize, dependencies: HashableSet, } @@ -2275,9 +2327,11 @@ mod test { name: impl Into, dependencies: impl IntoIterator, ) -> Self { + let name = name.into(); Self { index, - name: name.into(), + name: name.clone(), + argument_name: ArgumentName::Named(name), dependencies: HashableSet::from(HashSet::from_iter( dependencies.into_iter().map(ImString::from), )), @@ -2290,8 +2344,8 @@ mod test { self.index } - fn name(&self) -> &ImString { - &self.name + fn name(&self) -> &ArgumentName { + &self.argument_name } fn dependencies(&self) -> &HashableSet { @@ -2371,7 +2425,7 @@ mod test { #[test] fn vector2() { - let root = full_compile("<(1.0, 2.0)>"); + let root = full_compile("{1.0, 2.0}"); let vector = root.node.as_vector2().unwrap(); let x = &vector.node.x; let x_scalar = x.node.as_scalar().unwrap(); @@ -2413,7 +2467,7 @@ mod test { #[test] fn vector3() { - let root = full_compile("<(1.0, 2.0, 3.0)>"); + let root = full_compile("{1.0, 2.0, 3.0}"); let vector = root.node.as_vector3().unwrap(); let x = &vector.node.x; let x_scalar = x.node.as_scalar().unwrap(); @@ -2467,7 +2521,7 @@ mod test { #[test] fn vector4() { - let root = full_compile("<(1.0, 2.0, 3.0, 4.0)>"); + let root = full_compile("{1.0, 2.0, 3.0, 4.0}"); let vector = root.node.as_vector4().unwrap(); let x = &vector.node.x; let x_scalar = x.node.as_scalar().unwrap(); diff --git a/interpreter/src/execution/export.rs b/interpreter/src/execution/export.rs new file mode 100644 index 0000000..9f38f02 --- /dev/null +++ b/interpreter/src/execution/export.rs @@ -0,0 +1,769 @@ +/* + * Copyright 2026 James Carl + * AGPL-3.0-only or AGPL-3.0-or-later + * + * This file is part of Command Cad. + * + * Command CAD is free software: you can redistribute it and/or modify it under the terms of + * the GNU Affero General Public License as published by the Free Software Foundation, either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License along with this + * program. If not, see . + */ + +use std::{hash::Hash, sync::Arc}; + +use common_data_types::{Dimension, Float}; +use sha2::Digest; + +use crate::{ + build_function, + execution::{ + errors::{ExecutionResult, Raise as _}, + store::StoreHasher, + values::{ + scalar::{Length, Scalar}, + BuiltinCallableDatabase, File, IString, List, Value, + }, + ExecutionContext, StoreTrait, + }, + values::Object, +}; + +/// Shape styling properties. +struct ShapeStyle { + fill: String, + stroke: String, + stroke_width: f64, +} + +impl std::hash::Hash for ShapeStyle { + fn hash(&self, state: &mut H) { + self.fill.hash(state); + self.stroke.hash(state); + // Hash the bits of f64 since f64 doesn't implement Hash + state.write_u64(self.stroke_width.to_bits()); + } +} + +impl Default for ShapeStyle { + fn default() -> Self { + Self { + fill: "gray".to_string(), + stroke: "white".to_string(), + stroke_width: 2.0, + } + } +} + +/// A single exported shape with its geometry and styling. +struct ExportedShape { + paths: Vec, + style: ShapeStyle, + /// Bounding box of the raw geometry (in CAD meters). + bbox: (f64, f64, f64, f64), + /// SHA-256 hash of the raw geometry coordinates. + geometry_hash: [u8; 32], +} + +/// Hashable representation of exported shapes for store caching. +struct ExportCacheKey { + shape_hashes: Vec<[u8; 32]>, + units: Length, +} + +impl std::hash::Hash for ExportCacheKey { + fn hash(&self, state: &mut H) { + self.shape_hashes.hash(state); + // Hash the raw float value and dimension of units + self.units.value.hash(state); + } +} + +/// Feeds coordinate bytes into a SHA-256 hasher. +fn hash_coords(coords: &[geo::Coord], state: &mut StoreHasher) { + coords.len().hash(state); + for coord in coords { + coord.x.to_le_bytes().hash(state); + coord.y.to_le_bytes().hash(state); + } +} + +/// Hashes a LineString's coordinates using SHA-256. +fn hash_linestring(line_string: &geo::LineString, is_closed: bool) -> [u8; 32] { + let mut hasher = StoreHasher::new(); + let coords: Vec<_> = line_string.coords().cloned().collect(); + hash_coords(&coords, &mut hasher); + is_closed.hash(&mut hasher); + hasher.0.finalize().into() +} + +/// Hashes a Polygon's exterior and interior ring coordinates using SHA-256. +fn hash_polygon(polygon: &geo::Polygon) -> [u8; 32] { + let mut hasher = StoreHasher::new(); + // Hash exterior ring + let exterior_coords: Vec<_> = polygon.exterior().coords().cloned().collect(); + hash_coords(&exterior_coords, &mut hasher); + // Hash number of interior rings + polygon.interiors().len().hash(&mut hasher); + // Hash each interior ring + for interior in polygon.interiors() { + let interior_coords: Vec<_> = interior.coords().cloned().collect(); + hash_coords(&interior_coords, &mut hasher); + } + hasher.0.finalize().into() +} + +/// Hashes a PolygonSet's constituent polygons using SHA-256. +fn hash_polygon_set(polygon_set: &geo::MultiPolygon) -> [u8; 32] { + let mut hasher = StoreHasher::new(); + polygon_set.0.len().hash(&mut hasher); + for polygon in polygon_set.0.iter() { + hash_polygon(polygon).hash(&mut hasher); + } + hasher.0.finalize().into() +} + +/// Parses a single item from the shapes list. +fn parse_shape_item( + context: &ExecutionContext, + value: Value, + units: &Length, +) -> ExecutionResult { + let style = if let Value::Dictionary(dict) = &value { + let fill = match dict.get("fill") { + Some(v) => { + let cloned = v.clone(); + cloned.downcast::(context)?.0.as_str().to_string() + } + None => "gray".to_string(), + }; + let stroke = match dict.get("stroke") { + Some(v) => { + let cloned = v.clone(); + cloned.downcast::(context)?.0.as_str().to_string() + } + None => "white".to_string(), + }; + let stroke_width = match dict.get("stroke_width") { + Some(v) => { + let cloned = v.clone(); + *cloned.downcast::(context)?.value + } + None => 2.0, + }; + ShapeStyle { + fill, + stroke, + stroke_width, + } + } else { + ShapeStyle::default() + }; + + let shape_value = if let Value::Dictionary(dict) = &value { + dict.get("shape") + .ok_or_else(|| { + crate::values::MissingAttributeError { + name: "shape".to_string(), + } + .to_error(context) + })? + .clone() + } else { + value.clone() + }; + + let multiplier = *units.value; + let (paths, bbox, geometry_hash) = + geometry_to_paths_with_hash(&shape_value, context, multiplier)?; + + Ok(ExportedShape { + paths, + style, + bbox, + geometry_hash, + }) +} + +/// Converts geometry to SVG path elements, computes bounding box, and hashes the raw geometry. +#[allow(clippy::type_complexity)] +fn geometry_to_paths_with_hash( + value: &Value, + context: &ExecutionContext, + multiplier: f64, +) -> ExecutionResult<( + Vec, + (f64, f64, f64, f64), + [u8; 32], +)> { + match value { + Value::LineString(line_string) => { + Ok(linestring_to_paths_with_hash(&line_string.0, multiplier)) + } + Value::Polygon(polygon) => Ok(polygon_to_paths_with_hash(&polygon.0, multiplier)), + Value::PolygonSet(polygon_set) => { + let mut all_paths = Vec::new(); + let mut bbox = ( + f64::INFINITY, + f64::INFINITY, + f64::NEG_INFINITY, + f64::NEG_INFINITY, + ); + for polygon in polygon_set.0.iter() { + let (paths, poly_bbox, _) = polygon_to_paths_with_hash(polygon, multiplier); + all_paths.extend(paths); + bbox = merge_bbox(bbox, poly_bbox); + } + Ok((all_paths, bbox, hash_polygon_set(&polygon_set.0))) + } + value => Err(crate::values::DowncastError { + expected: "Polygon, PolygonSet, or LineString".into(), + got: value.get_type(context).name(), + } + .to_error(context)), + } +} + +fn merge_bbox(a: (f64, f64, f64, f64), b: (f64, f64, f64, f64)) -> (f64, f64, f64, f64) { + (a.0.min(b.0), a.1.min(b.1), a.2.max(b.2), a.3.max(b.3)) +} + +/// Converts a single LineString to SVG path elements, bounding box, and geometry hash. +fn linestring_to_paths_with_hash( + line_string: &geo::LineString, + multiplier: f64, +) -> ( + Vec, + (f64, f64, f64, f64), + [u8; 32], +) { + let mut data = svg::node::element::path::Data::new(); + + let coords: Vec<_> = line_string.coords().collect(); + if coords.is_empty() { + return ( + vec![], + (0.0, 0.0, 100.0, 100.0), + hash_linestring(line_string, false), + ); + } + + let mut min_x = f64::INFINITY; + let mut min_y = f64::INFINITY; + let mut max_x = f64::NEG_INFINITY; + let mut max_y = f64::NEG_INFINITY; + + let first = coords[0]; + let sx = first.x * multiplier; + let sy = -first.y * multiplier; + min_x = min_x.min(sx); + min_y = min_y.min(sy); + max_x = max_x.max(sx); + max_y = max_y.max(sy); + data = data.move_to((sx, sy)); + + for coord in &coords[1..] { + let sx = coord.x * multiplier; + let sy = -coord.y * multiplier; + min_x = min_x.min(sx); + min_y = min_y.min(sy); + max_x = max_x.max(sx); + max_y = max_y.max(sy); + data = data.line_to((sx, sy)); + } + + if line_string.is_closed() { + data = data.close(); + } + + ( + vec![svg::node::element::Path::new().set("d", data)], + (min_x, min_y, max_x - min_x, max_y - min_y), + hash_linestring(line_string, line_string.is_closed()), + ) +} + +/// Converts a single Polygon to SVG path elements, bounding box, and geometry hash. +fn polygon_to_paths_with_hash( + polygon: &geo::Polygon, + multiplier: f64, +) -> ( + Vec, + (f64, f64, f64, f64), + [u8; 32], +) { + let exterior = polygon.exterior(); + let mut data = svg::node::element::path::Data::new(); + + let coords: Vec<_> = exterior.coords().collect(); + let mut min_x = f64::INFINITY; + let mut min_y = f64::INFINITY; + let mut max_x = f64::NEG_INFINITY; + let mut max_y = f64::NEG_INFINITY; + + if !coords.is_empty() { + let first = coords[0]; + let sx = first.x * multiplier; + let sy = -first.y * multiplier; + min_x = min_x.min(sx); + min_y = min_y.min(sy); + max_x = max_x.max(sx); + max_y = max_y.max(sy); + data = data.move_to((sx, sy)); + + for coord in &coords[1..] { + let sx = coord.x * multiplier; + let sy = -coord.y * multiplier; + min_x = min_x.min(sx); + min_y = min_y.min(sy); + max_x = max_x.max(sx); + max_y = max_y.max(sy); + data = data.line_to((sx, sy)); + } + + for interior in polygon.interiors() { + let interior_coords: Vec<_> = interior.coords().collect(); + if !interior_coords.is_empty() { + let first = interior_coords[0]; + let sx = first.x * multiplier; + let sy = -first.y * multiplier; + min_x = min_x.min(sx); + min_y = min_y.min(sy); + max_x = max_x.max(sx); + max_y = max_y.max(sy); + data = data.line_to((sx, sy)); + for coord in &interior_coords[1..] { + let sx = coord.x * multiplier; + let sy = -coord.y * multiplier; + min_x = min_x.min(sx); + min_y = min_y.min(sy); + max_x = max_x.max(sx); + max_y = max_y.max(sy); + data = data.line_to((sx, sy)); + } + } + } + + data = data.close(); + } + + ( + vec![svg::node::element::Path::new().set("d", data)], + (min_x, min_y, max_x - min_x, max_y - min_y), + hash_polygon(polygon), + ) +} + +/// Builds the SVG document from exported shapes with optional size overrides. +fn build_document( + shapes: &[ExportedShape], + width_override: Option, + height_override: Option, +) -> svg::Document { + // Compute overall bounding box from all shapes. + let mut min_x = f64::INFINITY; + let mut min_y = f64::INFINITY; + let mut max_x = f64::NEG_INFINITY; + let mut max_y = f64::NEG_INFINITY; + + for shape in shapes { + min_x = min_x.min(shape.bbox.0); + min_y = min_y.min(shape.bbox.1); + max_x = max_x.max(shape.bbox.0 + shape.bbox.2); + max_y = max_y.max(shape.bbox.1 + shape.bbox.3); + } + + let (bbox_width, bbox_height) = if min_x == f64::INFINITY { + (100.0, 100.0) + } else { + (max_x - min_x, max_y - min_y) + }; + + // Determine final width and height with aspect ratio preservation. + let (final_width, final_height) = match (width_override, height_override) { + (Some(w), Some(h)) => (w, h), + (Some(w), None) => { + let h = bbox_height * (w / bbox_width); + (w, h) + } + (None, Some(h)) => { + let w = bbox_width * (h / bbox_height); + (w, h) + } + (None, None) => (bbox_width, bbox_height), + }; + + let mut document = svg::Document::new() + .set("xmlns", "http://www.w3.org/2000/svg") + .set("version", "1.1") + .set( + "viewBox", + format!("{min_x} {min_y} {final_width} {final_height}"), + ) + .set("width", format!("{final_width}")) + .set("height", format!("{final_height}")); + + for shape in shapes { + for path in &shape.paths { + let styled = path + .clone() + .set("fill", svg::node::Value::from(shape.style.fill.as_str())) + .set( + "stroke", + svg::node::Value::from(shape.style.stroke.as_str()), + ) + .set( + "stroke-width", + svg::node::Value::from(format!("{}", shape.style.stroke_width).as_str()), + ); + + document = document.add(styled); + } + } + + document +} + +/// `std.export.svg` function. +pub struct ExportSvg; + +/// Registers all export functions with the callable database. +pub fn register_methods_and_functions(database: &mut BuiltinCallableDatabase) { + build_function!( + database, + ExportSvg, "std.export.svg", ( + context: &ExecutionContext, + shapes: List, + name: IString, + units: Length = Scalar { + dimension: Dimension::length(), + value: Float::new(1000.0).expect("Default svg units was NaN") + }.into(), + width: Length = Scalar { + dimension: Dimension::length(), + value: Float::new(0.0).expect("Default svg width was NaN") + }.into(), + height: Length = Scalar { + dimension: Dimension::length(), + value: Float::new(0.0).expect("Default svg height was NaN") + }.into() + ) -> File { + let mut exported_shapes = Vec::with_capacity(shapes.len()); + + for value in shapes { + let shape = parse_shape_item(context, value, &units)?; + exported_shapes.push(shape); + } + + let width_override = if *width.value > 0.0 { + Some(*width.value) + } else { + None + }; + + let height_override = if *height.value > 0.0 { + Some(*height.value) + } else { + None + }; + + let document = build_document(&exported_shapes, width_override, height_override); + + let cache_key = ExportCacheKey { + shape_hashes: exported_shapes.iter().map(|s| s.geometry_hash).collect(), + units: units.clone(), + }; + let path = context.store.get_or_init_file( + context, + &(&cache_key,), + format!("{}.svg", name.0), + |file| { + svg::write(file, &document).map_err(|error| { + let msg = format!("Failed to write SVG: {error}"); + crate::execution::errors::StringError(msg).to_error(context) + })?; + Ok(()) + }, + )?; + + Ok(File { path: Arc::new(path) }) + } + ); +} + +#[cfg(test)] +mod test { + use super::*; + use crate::execution::standard_environment::build_prelude; + use crate::execution::store::FsStore; + use crate::execution::test_run; + use std::collections::HashMap; + use std::path::Path; + use std::sync::Mutex; + use tempfile::TempDir; + + fn test_run_with_content(input: &str) -> (ExecutionResult, TempDir) { + let database = crate::execution::values::BuiltinCallableDatabase::new(); + let prelude = build_prelude(&database); + let store_directory = TempDir::new().unwrap(); + let store = crate::execution::Store::FsStore(FsStore::new(store_directory.path())); + let file_cache = Mutex::new(HashMap::new()); + let working_directory = Path::new("."); + let shutdown_signal = std::sync::atomic::AtomicBool::new(false); + + let context = crate::execution::ExecutionContext { + shutdown_singal: &shutdown_signal, + log: &Mutex::new(Vec::new()), + stack_trace: &crate::execution::StackTrace::test(), + stack: &crate::execution::StackScope::top(&prelude), + database: &database, + store: &store, + file_cache: &file_cache, + working_directory, + import_limit: 100, + }; + + let root = crate::compile::full_compile(input); + let result = crate::execution::execute_expression(&context, &root); + (result, store_directory) + } + + #[test] + fn export_svg_basic_polygon() { + let result = test_run( + "std.export.svg(shapes = [std.polygon.box(size = {1m, 1m})], name = \"test_box\")", + ); + assert!( + result.is_ok(), + "Basic polygon export failed: {:?}", + result.err() + ); + } + + #[test] + fn export_svg_line_string() { + let result = test_run( + "std.export.svg(shapes = [std.line_string.from_points(points = [{0m, 0m}, {1m, 1m}])], name = \"test_line\")" + ); + assert!( + result.is_ok(), + "LineString export failed: {:?}", + result.err() + ); + } + + #[test] + fn export_svg_polygon_set() { + let result = test_run( + "std.export.svg(shapes = [std.polygon_set.from_polys(polys = [std.polygon.box(size = {1m, 1m}), std.polygon.box(size = {2m, 2m})])], name = \"test_set\")" + ); + assert!( + result.is_ok(), + "PolygonSet export failed: {:?}", + result.err() + ); + } + + #[test] + fn export_svg_dictionary_styling() { + let result = test_run( + "std.export.svg(shapes = [(shape = std.polygon.box(size = {1m, 1m}), fill = \"blue\", stroke = \"red\", stroke_width = 3)], name = \"test_styled\")" + ); + assert!(result.is_ok(), "Styled export failed: {:?}", result.err()); + } + + #[test] + fn export_svg_mixed_shapes() { + let result = test_run( + r#"std.export.svg(shapes = [ + std.polygon.box(size = {1m, 1m}), + (shape = std.polygon.circle(radius = 1m, number_of_points = 24u), fill = "none", stroke = "green"), + std.line_string.from_points(points = [{0m, 0m}, {2m, 2m}]) + ], name = "test_mixed")"#, + ); + assert!( + result.is_ok(), + "Mixed shapes export failed: {:?}", + result.err() + ); + } + + #[test] + fn export_svg_no_shapes() { + let result = test_run("std.export.svg(shapes = [], name = \"test_empty\")"); + assert!( + result.is_ok(), + "Empty shapes export failed: {:?}", + result.err() + ); + } + + #[test] + fn hash_linestring_different_coords() { + let mut hasher1 = StoreHasher::new(); + let mut hasher2 = StoreHasher::new(); + // Hash using bit representation since f64 doesn't implement Hash + 1.0f64.to_bits().hash(&mut hasher1); + 2.0f64.to_bits().hash(&mut hasher1); + 1.0f64.to_bits().hash(&mut hasher2); + 3.0f64.to_bits().hash(&mut hasher2); + assert_ne!(hasher1.0.finalize(), hasher2.0.finalize()); + } + + #[test] + fn hash_polygon_different_exterior() { + let mut hasher1 = StoreHasher::new(); + let mut hasher2 = StoreHasher::new(); + // Hash using bit representation since Coord doesn't implement Hash + 0.0f64.to_bits().hash(&mut hasher1); + 0.0f64.to_bits().hash(&mut hasher1); + 1.0f64.to_bits().hash(&mut hasher1); + 0.0f64.to_bits().hash(&mut hasher1); + 0.0f64.to_bits().hash(&mut hasher2); + 0.0f64.to_bits().hash(&mut hasher2); + 2.0f64.to_bits().hash(&mut hasher2); + 0.0f64.to_bits().hash(&mut hasher2); + assert_ne!(hasher1.0.finalize(), hasher2.0.finalize()); + } + + #[test] + fn export_svg_auto_size_tight_fit() { + let (result, _temp_dir) = test_run_with_content( + "std.export.svg(shapes = [std.polygon.box(size = {1m, 2m})], name = \"test_tight\")", + ); + assert!( + result.is_ok(), + "Auto size export failed: {:?}", + result.err() + ); + let content = match result.unwrap() { + Value::File(file) => std::fs::read_to_string(file.path.as_path()).unwrap(), + _ => panic!("Expected File"), + }; + assert!( + content.contains("viewBox=\"0 -2000 1000 2000\""), + "Expected viewBox=\"0 -2000 1000 2000\", got: {}", + content + ); + } + + #[test] + fn export_svg_auto_size_with_offset() { + let (result, _temp_dir) = test_run_with_content( + "std.export.svg(shapes = [std.polygon.box_from_points(a = {1m, 1m}, b = {3m, 4m})], name = \"test_offset\")", + ); + assert!( + result.is_ok(), + "Auto size with offset export failed: {:?}", + result.err() + ); + let content = match result.unwrap() { + Value::File(file) => std::fs::read_to_string(file.path.as_path()).unwrap(), + _ => panic!("Expected File"), + }; + assert!( + content.contains("viewBox=\"1000 -4000 2000 3000\""), + "Expected viewBox=\"1000 -4000 2000 3000\", got: {}", + content + ); + } + + #[test] + fn export_svg_explicit_width_and_height() { + let (result, _temp_dir) = test_run_with_content( + "std.export.svg(shapes = [std.polygon.box(size = {1m, 1m})], name = \"test_explicit\", width = 500mm, height = 500mm)", + ); + assert!( + result.is_ok(), + "Explicit size export failed: {:?}", + result.err() + ); + let content = match result.unwrap() { + Value::File(file) => std::fs::read_to_string(file.path.as_path()).unwrap(), + _ => panic!("Expected File"), + }; + assert!( + content.contains("viewBox=\"0 -1000 0.5 0.5\""), + "Expected viewBox=\"0 -1000 0.5 0.5\", got: {}", + content + ); + assert!( + content.contains("width=\"0.5\""), + "Expected width=\"0.5\", got: {}", + content + ); + assert!( + content.contains("height=\"0.5\""), + "Expected height=\"0.5\", got: {}", + content + ); + } + + #[test] + fn export_svg_width_only_derives_height() { + let (result, _temp_dir) = test_run_with_content( + "std.export.svg(shapes = [std.polygon.box(size = {1m, 2m})], name = \"test_width_only\", width = 200mm)", + ); + assert!( + result.is_ok(), + "Width-only size export failed: {:?}", + result.err() + ); + let content = match result.unwrap() { + Value::File(file) => std::fs::read_to_string(file.path.as_path()).unwrap(), + _ => panic!("Expected File"), + }; + assert!( + content.contains("viewBox=\"0 -2000 0.2 0.4\""), + "Expected viewBox=\"0 -2000 0.2 0.4\", got: {}", + content + ); + assert!( + content.contains("width=\"0.2\""), + "Expected width=\"0.2\", got: {}", + content + ); + assert!( + content.contains("height=\"0.4\""), + "Expected height=\"0.4\", got: {}", + content + ); + } + + #[test] + fn export_svg_height_only_derives_width() { + let (result, _temp_dir) = test_run_with_content( + "std.export.svg(shapes = [std.polygon.box(size = {1m, 1m})], name = \"test_height_only\", height = 300mm)", + ); + assert!( + result.is_ok(), + "Height-only size export failed: {:?}", + result.err() + ); + let content = match result.unwrap() { + Value::File(file) => std::fs::read_to_string(file.path.as_path()).unwrap(), + _ => panic!("Expected File"), + }; + assert!( + content.contains("viewBox=\"0 -1000 0.3 0.3\""), + "Expected viewBox=\"0 -1000 0.3 0.3\", got: {}", + content + ); + assert!( + content.contains("width=\"0.3\""), + "Expected width=\"0.3\", got: {}", + content + ); + assert!( + content.contains("height=\"0.3\""), + "Expected height=\"0.3\", got: {}", + content + ); + } +} diff --git a/interpreter/src/execution/mod.rs b/interpreter/src/execution/mod.rs index 6893345..f4e2dab 100644 --- a/interpreter/src/execution/mod.rs +++ b/interpreter/src/execution/mod.rs @@ -19,9 +19,9 @@ use std::{ borrow::Cow, cmp::Ordering, - collections::HashMap, + collections::{HashMap, HashSet}, path::{Path, PathBuf}, - sync::{Arc, Mutex}, + sync::{atomic::AtomicBool, Arc, Mutex}, }; use crate::{ @@ -54,8 +54,9 @@ use imstr::ImString; use logging::LocatedStr; pub use logging::{ExecutionFileCache, LogLevel, LogMessage, RuntimeLog, StackTrace}; pub use stack::StackScope; +mod export; mod store; -pub use store::Store; +pub use store::{FsStore, Store, StoreTrait}; use thiserror::Error; use values::{ @@ -156,32 +157,28 @@ pub fn find_all_variable_accesses_in_expression( Ok(()) } Expression::LetIn(ast_node) => { + // Collect environment dependencies of all our variable assignments. + let mut variable_names = HashSet::new(); for assignment in ast_node.node.assignments.iter() { find_all_variable_accesses_in_expression( &assignment.node.value.node, - access_collector, + &mut |variable_name| { + if !variable_names.contains(&variable_name.node) { + access_collector(variable_name)?; + } + + Ok(()) + }, )?; + variable_names.insert(assignment.node.ident.node.clone()); } - let variable_names: Vec<&ImString> = { - let mut variable_names = Vec::with_capacity(ast_node.node.assignments.len()); - - for argument in ast_node.node.assignments.iter() { - variable_names.push(&argument.node.ident.node); - } - - // We typically won't have more than 6 arguments, so a binary search will typically - // outperform a hashset. - variable_names.sort(); - - variable_names - }; - + // Report wanted variables that we also don't provide. find_all_variable_accesses_in_expression( &ast_node.node.expression.node, &mut move |variable_name| { - if variable_names.binary_search(&&variable_name.node).is_err() { - // This is not an argument, which means it must be captured from the environment. + if !variable_names.contains(&variable_name.node) { + // We do not provide this, so it must have been captured by environment. access_collector(variable_name)?; } @@ -210,6 +207,7 @@ pub fn find_all_variable_accesses_in_expression( #[derive(Debug, Clone)] pub struct ExecutionContext<'c> { + pub shutdown_singal: &'c AtomicBool, pub log: &'c dyn RuntimeLog, pub stack_trace: &'c StackTrace<'c>, pub stack: &'c StackScope<'c>, @@ -286,10 +284,24 @@ impl<'s> IntoIterator for &'s ExecutionContext<'_> { } } +#[derive(Debug, Error, Eq, PartialEq)] +pub enum AbortError { + #[error("Execution Aborted")] + Aborted, +} + pub fn execute_expression( context: &ExecutionContext, expression: &compile::AstNode, ) -> ExecutionResult { + if context + .shutdown_singal + .load(std::sync::atomic::Ordering::Relaxed) + { + // We've been told to shutdown. + return Err(AbortError::Aborted.to_error(context)); + } + context.trace_scope( None, expression.reference.clone(), @@ -547,6 +559,19 @@ pub(crate) fn test_run(input: &str) -> ExecutionResult { test_context([], |context| execute_expression(context, &root)) } +#[cfg(test)] +pub(crate) fn run_assert_eq(left: &str, right: &str) { + let left = compile::full_compile(left); + let right = compile::full_compile(right); + + test_context([], |context| { + let left = execute_expression(context, &left).expect("Left expression failed"); + let right = execute_expression(context, &right).expect("Right expression failed"); + + pretty_assertions::assert_eq!(left, right) + }) +} + #[cfg(test)] pub(crate) fn test_context( extra_prelude: impl IntoIterator, @@ -566,19 +591,24 @@ pub(crate) fn test_context_custom_database( use std::sync::Mutex; use tempfile::TempDir; - let mut prelude = build_prelude(&database).unwrap(); + use crate::execution::store::FsStore; + + let mut prelude = build_prelude(&database); for (name, value) in extra_prelude.into_iter() { prelude.insert(name, value); } let store_directory = TempDir::new().unwrap(); - let store = Store::new(store_directory.path()); + let store = Store::FsStore(FsStore::new(store_directory.path())); let file_cache = Mutex::new(HashMap::new()); let working_directory = Path::new("."); + let shutdown_signal = AtomicBool::new(false); + let context = ExecutionContext { + shutdown_singal: &shutdown_signal, log: &Mutex::new(Vec::new()), stack_trace: &StackTrace::test(), stack: &StackScope::top(&prelude), @@ -691,7 +721,6 @@ pub fn register_methods_and_functions(database: &mut BuiltinCallableDatabase) { #[cfg(test)] mod test { - use hashable_map::HashableMap; use std::{collections::HashMap, sync::Arc}; use super::*; @@ -727,13 +756,17 @@ mod test { assert_eq!( product, values::ValueType::Dictionary(values::StructDefinition { - members: Arc::new(HashableMap::from(HashMap::from([( - "name".into(), - values::StructMember { - ty: ValueType::TypeNone, - default: Some(Value::ValueNone(values::ValueNone)) - } - )]))), + members: Arc::new( + HashMap::from([( + "name".into(), + values::StructMember { + ty: ValueType::TypeNone, + default: Some(Value::ValueNone(values::ValueNone)) + } + )]) + .into_iter() + .collect() + ), variadic: true }) .into() @@ -752,6 +785,15 @@ mod test { assert_eq!(product, values::UnsignedInteger::from(23).into()); } + #[test] + fn nested_let_in() { + let product = test_run( + "let a = 23u; closure = () -> std.types.UInt: let value = a; in value; in closure()", + ) + .unwrap(); + assert_eq!(product, values::UnsignedInteger::from(23).into()); + } + #[test] fn let_in_self_ref() { let product = test_run("let value = 23u; value2 = value + 2u; in value2").unwrap(); diff --git a/interpreter/src/execution/standard_environment.rs b/interpreter/src/execution/standard_environment.rs index 4bceef8..b3e7e30 100644 --- a/interpreter/src/execution/standard_environment.rs +++ b/interpreter/src/execution/standard_environment.rs @@ -16,42 +16,48 @@ * program. If not, see . */ -use std::{collections::HashMap, path::Path, sync::Mutex}; +use std::{ + collections::HashMap, + path::Path, + sync::{atomic::AtomicBool, Mutex}, +}; use common_data_types::{Dimension, Float}; use imstr::ImString; -use tempfile::TempDir; +use nalgebra::{Matrix3, Matrix4}; use crate::{ execution::{ functions::Import, logging::StackTrace, stack::StackScope, - store::Store, + store::{DummyStore, Store}, values::{ integer::functions::{RangeSInt, RangeUInt}, BuiltinCallableDatabase, Scalar, SignedInteger, UnsignedInteger, ValueNone, }, ExecutionContext, }, - values::BuiltinFunction, + values::{BuiltinFunction, Transform2d, Transform3d}, }; use super::values::{Dictionary, Value, ValueType}; /// Builds standard library. -pub fn build_prelude( - database: &BuiltinCallableDatabase, -) -> std::io::Result> { +pub fn build_prelude(database: &BuiltinCallableDatabase) -> HashMap { // Build an incomplete context for bootstrapping. let prelude = HashMap::new(); - let store_directory = TempDir::new()?; - let store = Store::new(store_directory.path()); + + // We don't actually use the store for anything during prelude bringup. Use a dummy store for + // this. + let store = Store::DummyStore(DummyStore); let file_cache = Mutex::new(HashMap::new()); let working_directory = Path::new("."); + let shutdown_signal = AtomicBool::new(false); let context = ExecutionContext { + shutdown_singal: &shutdown_signal, log: &Mutex::new(Vec::new()), stack_trace: &StackTrace::bootstrap(), stack: &StackScope::top(&prelude), @@ -62,13 +68,11 @@ pub fn build_prelude( import_limit: 100, }; - let global = HashMap::from([("std".into(), build_std(&context).into())]); - - Ok(global) + HashMap::from([("std".into(), build_std(&context).into())]) } fn build_std(context: &ExecutionContext) -> Dictionary { - let std = HashMap::from([ + let std: HashMap = HashMap::from([ ("types".into(), build_types(context).into()), ( "scalar".into(), @@ -87,9 +91,14 @@ fn build_std(context: &ExecutionContext) -> Dictionary { build_dimension_types(context, ValueType::Vector4).into(), ), ("consts".into(), build_consts(context).into()), - ("mesh3d".into(), build_mesh_3d(context).into()), + ("mesh".into(), build_mesh_3d(context).into()), + ("line_string".into(), build_line_string(context).into()), + ("polygon".into(), build_polygon(context).into()), + ("polygon_set".into(), build_polygon_set(context).into()), ("import".into(), BuiltinFunction::new::().into()), ("range".into(), build_range(context).into()), + ("export".into(), build_export(context).into()), + ("log".into(), build_log(context).into()), ]); Dictionary::new(context, std) } @@ -127,6 +136,14 @@ fn build_consts(context: &ExecutionContext) -> Dictionary { "SIntBits".into(), UnsignedInteger::from(i64::BITS as u64).into(), ), + ( + "Transform2d".into(), + Transform2d::new(Matrix3::identity()).into(), + ), + ( + "Transform3d".into(), + Transform3d::new(Matrix4::identity()).into(), + ), ]); Dictionary::new(context, types) } @@ -142,11 +159,19 @@ fn build_types(context: &ExecutionContext) -> Dictionary { ("String".into(), ValueType::String.into()), ("ValueType".into(), ValueType::ValueType.into()), ("ManifoldMesh".into(), ValueType::ManifoldMesh3D.into()), - // TODO we need File types. + ("Transform2d".into(), ValueType::Transform2d.into()), + ("Transform3d".into(), ValueType::Transform3d.into()), + ("Transform3d".into(), ValueType::Transform3d.into()), + ("Iterator".into(), ValueType::Iterator.into()), + ( + "List".into(), + BuiltinFunction::new::().into(), + ), + ("File".into(), ValueType::File.into()), // TODO we'll need a function to build custom function signature types. // ("Function".into(), ValueType::Closure(Arc)), - // TODO add a function to build custom unit types. + // TODO add a function to build custom scalar and vector unit types. ]); Dictionary::new(context, types) } @@ -165,6 +190,47 @@ fn build_dimension_types( Dictionary::new(context, types) } +fn build_line_string(context: &ExecutionContext) -> Dictionary { + use crate::values::polygon::methods_and_functions::line_string::*; + + let types: HashMap = HashMap::from_iter([( + "from_points".into(), + BuiltinFunction::new::().into(), + )]); + Dictionary::new(context, types) +} + +fn build_polygon(context: &ExecutionContext) -> Dictionary { + use crate::values::polygon::methods_and_functions::polygon::*; + + let types: HashMap = HashMap::from_iter([ + ( + "from_points".into(), + BuiltinFunction::new::().into(), + ), + ( + "from_line_strings".into(), + BuiltinFunction::new::().into(), + ), + ("circle".into(), BuiltinFunction::new::().into()), + ("box".into(), BuiltinFunction::new::().into()), + ( + "box_from_points".into(), + BuiltinFunction::new::().into(), + ), + ]); + Dictionary::new(context, types) +} + +fn build_polygon_set(context: &ExecutionContext) -> Dictionary { + use crate::values::polygon::methods_and_functions::polygon_set::*; + let types: HashMap = HashMap::from_iter([( + "from_polys".into(), + BuiltinFunction::new::().into(), + )]); + Dictionary::new(context, types) +} + fn build_mesh_3d(context: &ExecutionContext) -> Dictionary { use crate::values::manifold_mesh::methods::*; @@ -190,3 +256,25 @@ fn build_mesh_3d(context: &ExecutionContext) -> Dictionary { ]); Dictionary::new(context, types) } + +fn build_export(context: &ExecutionContext) -> Dictionary { + let export: HashMap = HashMap::from_iter([( + "svg".into(), + BuiltinFunction::new::().into(), + )]); + Dictionary::new(context, export) +} + +fn build_log(context: &ExecutionContext) -> Dictionary { + let log: HashMap = HashMap::from_iter([ + ( + "info".into(), + BuiltinFunction::new::().into(), + ), + ( + "warn".into(), + BuiltinFunction::new::().into(), + ), + ]); + Dictionary::new(context, log) +} diff --git a/interpreter/src/execution/store.rs b/interpreter/src/execution/store.rs index 1d659dc..97d5528 100644 --- a/interpreter/src/execution/store.rs +++ b/interpreter/src/execution/store.rs @@ -17,103 +17,130 @@ */ use std::{ - io::{ErrorKind, Write}, + io::{BufReader, BufWriter, ErrorKind, Write}, path::{Path, PathBuf}, }; +use enum_dispatch::enum_dispatch; +use serde::{de::DeserializeOwned, Serialize}; use sha2::{Digest, Sha256}; use tempfile::{NamedTempFile, TempDir}; use crate::{ - execution::errors::{ExecutionResult, Raise}, + execution::errors::{ExecutionResult, Raise, StringError}, ExecutionContext, }; -#[derive(Debug)] -pub struct Store { - path: PathBuf, -} - -impl Store { - pub fn new(path: impl Into) -> Self { - Self { path: path.into() } - } - - pub fn get_or_init_file( +#[enum_dispatch] +pub trait StoreTrait { + fn get_or_init_file( &self, context: &ExecutionContext, hashable: &impl std::hash::Hash, name: impl AsRef, init: impl FnOnce(&mut NamedTempFile) -> ExecutionResult<()>, - ) -> ExecutionResult { - let name = name.as_ref(); - - context.trace_scope( - Some(format!("Failed to fetch or create file {name} in store").into()), - context.stack_trace.bottom().clone(), - |context| { - let store_path = self.generate_store_path(hashable, name); + ) -> ExecutionResult; - if std::fs::exists(&store_path).map_err(|error| error.to_error(context))? { - Ok(store_path) - } else { - // TODO should we be creating these in the project directory to increase the chances of - // them being on the same filesystem as the store? - let mut asset = PendingAsset { - store_path, - asset: NamedTempFile::new().map_err(|error| error.to_error(context))?, - }; - init(&mut asset.asset)?; - - let (mut file, temp_path) = asset - .asset - .keep() - .map_err(|error| error.error.to_error(context))?; + fn get_or_init_object( + &self, + context: &ExecutionContext, + hashable: &impl std::hash::Hash, + name: impl AsRef, + init: impl FnOnce() -> ExecutionResult, + ) -> ExecutionResult + where + S: Serialize + DeserializeOwned, + { + let mut object = None; + let file_path = self.get_or_init_file(context, hashable, name, |file| { + let new_object = init()?; + let mut buf_writer = BufWriter::new(file); + ciborium::into_writer(&new_object, &mut buf_writer) + .map_err(|error| error.to_error(context))?; + buf_writer + .flush() + .map_err(|error| error.to_error(context))?; - // Make sure that file is flushed and closed. - file.flush().map_err(|error| error.to_error(context))?; - drop(file); + object = Some(new_object); - self.move_path_into_store(context, &temp_path, &asset.store_path)?; + Ok(()) + })?; - Ok(asset.store_path) - } - }, - ) + if let Some(object) = object { + Ok(object) + } else { + let file = std::fs::File::open(file_path).map_err(|error| error.to_error(context))?; + let reader = BufReader::new(file); + let object = ciborium::from_reader(reader).map_err(|error| error.to_error(context))?; + Ok(object) + } } - pub fn get_or_init_directory( + fn get_or_init_directory( &self, context: &ExecutionContext, hashable: &impl std::hash::Hash, name: impl AsRef, init: impl FnOnce(&mut TempDir) -> ExecutionResult<()>, + ) -> ExecutionResult; +} + +#[enum_dispatch(StoreTrait)] +#[derive(Debug)] +pub enum Store { + FsStore, + DummyStore, +} + +#[derive(Debug)] +pub struct DummyStore; + +impl StoreTrait for DummyStore { + fn get_or_init_file( + &self, + context: &ExecutionContext, + _hashable: &impl std::hash::Hash, + name: impl AsRef, + _init: impl FnOnce(&mut NamedTempFile) -> ExecutionResult<()>, ) -> ExecutionResult { - let name = name.as_ref(); + Err(StringError(format!( + "Cannot store a file with a dummy store: {}", + name.as_ref() + )) + .to_error(context)) + } - context.trace_scope( - Some(format!("Failed to fetch or create directory {name} in store").into()), - context.stack_trace.bottom().clone(), - |context| { - let store_path = self.generate_store_path(hashable, name); + fn get_or_init_directory( + &self, + context: &ExecutionContext, + _hashable: &impl std::hash::Hash, + name: impl AsRef, + _init: impl FnOnce(&mut TempDir) -> ExecutionResult<()>, + ) -> ExecutionResult { + Err(StringError(format!( + "Cannot store a directory with a dummy store: {}", + name.as_ref() + )) + .to_error(context)) + } +} - if std::fs::exists(&store_path).map_err(|error| error.to_error(context))? { - Ok(store_path) - } else { - // TODO should we be creating these in the project directory to increase the chances of - // them being on the same filesystem as the store? - let mut asset = PendingAsset { - store_path, - asset: TempDir::new().map_err(|error| error.to_error(context))?, - }; - init(&mut asset.asset)?; - let temp_path = asset.asset.keep(); - self.move_path_into_store(context, &temp_path, &asset.store_path)?; +#[derive(Debug)] +pub struct FsStore { + /// Path to the store itself. + path: PathBuf, - Ok(asset.store_path) - } - }, - ) + /// Temporary directory within the store. + /// Is put into the parent directory of the store because it MUST live on the same filesystem + /// as the store itself, otherwise transferring files into the store may fail. + temp_dir: PathBuf, +} + +impl FsStore { + pub fn new(path: impl Into) -> Self { + let path = path.into(); + let temp_dir = path.join("../temp"); + Self { path, temp_dir } } fn generate_store_path( @@ -172,6 +199,87 @@ impl Store { } } +impl StoreTrait for FsStore { + fn get_or_init_file( + &self, + context: &ExecutionContext, + hashable: &impl std::hash::Hash, + name: impl AsRef, + init: impl FnOnce(&mut NamedTempFile) -> ExecutionResult<()>, + ) -> ExecutionResult { + let name = name.as_ref(); + + context.trace_scope( + Some(format!("Failed to fetch or create file {name} in store").into()), + context.stack_trace.bottom().clone(), + |context| { + let store_path = self.generate_store_path(hashable, name); + + if std::fs::exists(&store_path).map_err(|error| error.to_error(context))? { + Ok(store_path) + } else { + std::fs::create_dir_all(&self.temp_dir) + .map_err(|error| error.to_error(context))?; + let mut asset = PendingAsset { + store_path, + asset: NamedTempFile::new_in(&self.temp_dir) + .map_err(|error| error.to_error(context))?, + }; + init(&mut asset.asset)?; + + let (mut file, temp_path) = asset + .asset + .keep() + .map_err(|error| error.error.to_error(context))?; + + // Make sure that file is flushed and closed. + file.flush().map_err(|error| error.to_error(context))?; + drop(file); + + self.move_path_into_store(context, &temp_path, &asset.store_path)?; + + Ok(asset.store_path) + } + }, + ) + } + + fn get_or_init_directory( + &self, + context: &ExecutionContext, + hashable: &impl std::hash::Hash, + name: impl AsRef, + init: impl FnOnce(&mut TempDir) -> ExecutionResult<()>, + ) -> ExecutionResult { + let name = name.as_ref(); + + context.trace_scope( + Some(format!("Failed to fetch or create directory {name} in store").into()), + context.stack_trace.bottom().clone(), + |context| { + let store_path = self.generate_store_path(hashable, name); + + if std::fs::exists(&store_path).map_err(|error| error.to_error(context))? { + Ok(store_path) + } else { + std::fs::create_dir_all(&self.temp_dir) + .map_err(|error| error.to_error(context))?; + let mut asset = PendingAsset { + store_path, + asset: TempDir::new_in(&self.temp_dir) + .map_err(|error| error.to_error(context))?, + }; + init(&mut asset.asset)?; + let temp_path = asset.asset.keep(); + self.move_path_into_store(context, &temp_path, &asset.store_path)?; + + Ok(asset.store_path) + } + }, + ) + } +} + #[derive(Debug)] pub struct PendingAsset { store_path: PathBuf, @@ -192,7 +300,13 @@ impl std::ops::DerefMut for PendingAsset { } } -struct StoreHasher(Sha256); +pub(crate) struct StoreHasher(pub(crate) Sha256); + +impl StoreHasher { + pub(crate) fn new() -> Self { + Self(Sha256::new()) + } +} impl std::hash::Hasher for StoreHasher { fn finish(&self) -> u64 { diff --git a/interpreter/src/execution/values/closure.rs b/interpreter/src/execution/values/closure.rs index 24eefd5..32539d3 100644 --- a/interpreter/src/execution/values/closure.rs +++ b/interpreter/src/execution/values/closure.rs @@ -16,10 +16,16 @@ * program. If not, see . */ -use std::{any::TypeId, borrow::Cow, collections::HashMap, fmt::Display, sync::Arc}; +use std::{ + any::TypeId, + borrow::Cow, + collections::HashMap, + fmt::Display, + sync::{Arc, OnceLock}, +}; -use hashable_map::HashableMap; use imstr::ImString; +use indexmap::IndexMap; use crate::{ compile::{AstNode, ClosureDefinition, Expression}, @@ -29,12 +35,14 @@ use crate::{ find_all_variable_accesses_in_expression, logging::{LocatedStr, LogLevel, LogMessage}, stack::ScopeType, + values::dictionary::ArgumentName, values::{string::formatting::Style, Dictionary, Value}, ExecutionContext, }, }; -use super::{Object, StaticTypeName, StructDefinition, ValueType}; +use super::{Object, StaticType, StaticTypeName, StructDefinition, ValueType}; +use enum_downcast::IntoVariant; #[derive(Debug, Default)] pub struct BuiltinCallableDatabase { @@ -57,6 +65,10 @@ impl BuiltinCallableDatabase { super::manifold_mesh::register_methods_and_functions(&mut database); crate::execution::register_methods_and_functions(&mut database); super::iterators::register_methods(&mut database); + super::transform::register_methods(&mut database); + super::polygon::register_methods_and_functions(&mut database); + crate::execution::export::register_methods_and_functions(&mut database); + register_log_functions(&mut database); database } @@ -70,12 +82,15 @@ impl BuiltinCallableDatabase { panic!("Duplicate bultin function name: {}", callable.name()); } - if self + if let Some(old_callable) = self .callables .insert(TypeId::of::(), CallableStorage { callable }) - .is_some() { - panic!("Duplicate bultin function tag: {:?}", TypeId::of::()); + panic!( + "Duplicate bultin function tag: {:?}, originally registered with function `{}`", + TypeId::of::(), + old_callable.name() + ); } } @@ -150,7 +165,7 @@ pub fn find_all_variable_accesses_in_closure_capture( #[derive(Debug, Eq, PartialEq)] struct UserClosureInternals { signature: Arc, - captured_values: HashableMap, + captured_values: IndexMap, expression: Arc>, } @@ -187,9 +202,15 @@ impl UserClosure { let expression = source.node.expression.clone(); - let mut captured_values = HashableMap::new(); + let mut captured_values = IndexMap::new(); find_all_variable_accesses_in_closure_capture(&source.node, &mut |field_name| { - let local_variables = signature.argument_type.members.keys().cloned(); + let local_variables = signature.argument_type.members.keys().filter_map(|name| { + if let ArgumentName::Named(s) = name { + Some(s.clone()) + } else { + None + } + }); let value = context .get_variable_for_closure( @@ -201,7 +222,7 @@ impl UserClosure { )? .clone(); - captured_values.insert(field_name.node.clone(), value); + captured_values.insert(ArgumentName::Named(field_name.node.clone()), value); Ok(()) })?; @@ -256,10 +277,32 @@ impl Object for UserClosure { let argument = self.data.signature.argument_type.fill_defaults(argument); + let signature_members: Vec = self + .data + .signature + .argument_type + .members + .iter() + .map(|(name, _)| name.clone()) + .collect(); + let variables: HashMap = argument .iter() .chain(self.data.captured_values.iter()) - .map(|(name, value)| (name.clone(), value.clone())) + .filter_map(|(name, value)| match name { + ArgumentName::Named(s) => Some((s.clone(), value.clone())), + ArgumentName::Positional(idx) => { + if *idx < signature_members.len() { + if let ArgumentName::Named(s) = &signature_members[*idx] { + Some((s.clone(), value.clone())) + } else { + None + } + } else { + None + } + } + }) .collect(); context.stack_scope(ScopeType::Inherited, variables, |context| { @@ -307,7 +350,9 @@ impl std::fmt::Debug for dyn BuiltinCallable { macro_rules! build_member_from_sig { ($name:ident: $ty:ty) => { ( - imstr::ImString::from(stringify!($name)), + $crate::execution::values::dictionary::ArgumentName::Named(imstr::ImString::from( + stringify!($name), + )), $crate::execution::values::StructMember { ty: <$ty as $crate::execution::values::StaticType>::static_type(), default: None, @@ -316,7 +361,9 @@ macro_rules! build_member_from_sig { }; ($name:ident: $ty:ty = $default:expr) => { ( - imstr::ImString::from(stringify!($name)), + $crate::execution::values::dictionary::ArgumentName::Named(imstr::ImString::from( + stringify!($name), + )), $crate::execution::values::StructMember { ty: <$ty as $crate::execution::values::StaticType>::static_type(), default: Some($default), @@ -328,7 +375,7 @@ macro_rules! build_member_from_sig { #[macro_export] macro_rules! build_argument_signature_list { ($($arg:ident: $ty:path $(= $default:expr)?),*) => {{ - let list: [(imstr::ImString, $crate::execution::values::StructMember); _] = [$($crate::build_member_from_sig!($arg: $ty $(= $default)?),)*]; + let list: [($crate::execution::values::dictionary::ArgumentName, $crate::execution::values::StructMember); _] = [$($crate::build_member_from_sig!($arg: $ty $(= $default)?),)*]; list }}; } @@ -336,8 +383,10 @@ macro_rules! build_argument_signature_list { #[macro_export] macro_rules! build_struct_definition { (variadic: $variadic:literal, ($($arg:ident: $ty:path $(= $default:expr)?),*)) => {{ + let list: [($crate::execution::values::dictionary::ArgumentName, $crate::execution::values::StructMember); _] = $crate::build_argument_signature_list!($($arg: $ty $(= $default)?),*); + let converted: indexmap::IndexMap<$crate::execution::values::dictionary::ArgumentName, $crate::execution::values::StructMember> = list.into_iter().collect(); $crate::execution::values::StructDefinition { - members: std::sync::Arc::new(hashable_map::HashableMap::from(std::collections::HashMap::from($crate::build_argument_signature_list!($($arg: $ty $(= $default)?),*)))), + members: std::sync::Arc::new(converted), variadic: $variadic, } }}; @@ -448,7 +497,7 @@ macro_rules! build_function_callable { let mut _argument = signature.argument_type.fill_defaults(argument); let _data = std::sync::Arc::make_mut(&mut _argument.data); - $($(let $arg: $ty = _data.members.remove(stringify!($arg)) + $($(let $arg: $ty = _data.members.shift_remove(&$crate::execution::values::dictionary::ArgumentName::Named(stringify!($arg).into())) .expect("Argument was not present after argument check.").downcast::<$ty>($context)?;)*)? let result: $return_type = { @@ -532,7 +581,7 @@ macro_rules! build_method_callable { let mut _argument = signature.argument_type.fill_defaults(argument); let _data = std::sync::Arc::make_mut(&mut _argument.data); - $($(let $arg: $ty = _data.members.remove(stringify!($arg)) + $($(let $arg: $ty = _data.members.shift_remove(&$crate::execution::values::dictionary::ArgumentName::Named(stringify!($arg).into())) .expect("Argument was not present after argument check.").downcast::<$ty>($context)?;)*)? let result: $return_type = { @@ -559,6 +608,41 @@ macro_rules! build_method { }}; } +#[derive(Debug, Eq, PartialEq, Clone)] +pub struct MessageClosure(pub UserClosure); + +impl StaticType for MessageClosure { + fn static_type() -> ValueType { + static TYPE: OnceLock> = OnceLock::new(); + let signature = TYPE.get_or_init(|| build_closure_signature!((v: Value) -> Value)); + ValueType::Closure(signature.clone()) + } +} + +impl StaticTypeName for MessageClosure { + fn static_type_name() -> Cow<'static, str> { + "Closure".into() + } +} + +impl IntoVariant for Value { + fn into_variant(self) -> Result { + Ok(MessageClosure(self.into_variant()?)) + } +} + +impl From for UserClosure { + fn from(value: MessageClosure) -> Self { + value.0 + } +} + +impl From for Value { + fn from(value: MessageClosure) -> Self { + value.0.into() + } +} + #[derive(Clone, Debug, PartialEq, Eq)] pub struct BuiltinFunction(pub TypeId); @@ -617,6 +701,69 @@ impl StaticTypeName for BuiltinFunction { } } +pub struct LogInfo; +pub struct LogWarn; + +pub fn register_log_functions(database: &mut BuiltinCallableDatabase) { + build_function!( + database, + LogInfo, "log_info", ( + context: &ExecutionContext, + expression: Value, + message: MessageClosure + ) -> Value { + use crate::execution::values::IString; + + let arg_dict = Dictionary::new( + context, + HashMap::from([ + (ArgumentName::Named("v".into()), expression.clone()) + ]) + ); + let result = message.0.call(context, arg_dict)?; + + if let Ok(msg) = result.downcast::(context) { + context.log.push_message(LogMessage { + origin: context.stack_trace.bottom().clone(), + level: LogLevel::Info, + message: msg.0.to_string().into(), + }); + } + + Ok(expression) + } + ); + + build_function!( + database, + LogWarn, "log_warn", ( + context: &ExecutionContext, + expression: Value, + message: MessageClosure + ) -> Value { + use crate::execution::values::IString; + + let arg_dict = Dictionary::new( + context, + HashMap::from([ + (ArgumentName::Named("v".into()), expression.clone()) + ]) + ); + let result = message.0.call(context, arg_dict)?; + + if let Ok(msg) = result.downcast::(context) { + context.log.push_message(LogMessage { + origin: context.stack_trace.bottom().clone(), + level: LogLevel::Warning, + message: msg.0.to_string().into(), + }); + } + + Ok(expression) + } + ); +} + #[cfg(test)] mod test { use super::*; @@ -627,7 +774,8 @@ mod test { }, values::value_type::{MissmatchedField, TypeQualificationError}, }; - use hashable_map::HashableMap; + + use indexmap::IndexMap; use pretty_assertions::assert_eq; #[test] @@ -642,12 +790,12 @@ mod test { data: Arc::new(UserClosureInternals { signature: Arc::new(Signature { argument_type: StructDefinition { - members: HashableMap::new().into(), + members: Arc::new(IndexMap::new()), variadic: false, }, return_type: ValueType::UnsignedInteger, }), - captured_values: HashableMap::new(), + captured_values: IndexMap::new(), expression }) } @@ -735,7 +883,7 @@ mod test { assert_eq!( build_argument_signature_list!(value: SignedInteger), [( - ImString::from("value"), + ArgumentName::Named(ImString::from("value")), StructMember { ty: ValueType::SignedInteger, default: None @@ -745,7 +893,7 @@ mod test { assert_eq!( build_argument_signature_list!(value: UnsignedInteger), [( - ImString::from("value"), + ArgumentName::Named(ImString::from("value")), StructMember { ty: ValueType::UnsignedInteger, default: None @@ -755,7 +903,7 @@ mod test { assert_eq!( build_argument_signature_list!(value: UnsignedInteger = UnsignedInteger::from(23).into()), [( - ImString::from("value"), + ArgumentName::Named(ImString::from("value")), StructMember { ty: ValueType::UnsignedInteger, default: Some(Value::UnsignedInteger(23.into())) @@ -767,14 +915,14 @@ mod test { build_argument_signature_list!(value: UnsignedInteger, value1: SignedInteger), [ ( - ImString::from("value"), + ArgumentName::Named(ImString::from("value")), StructMember { ty: ValueType::UnsignedInteger, default: None } ), ( - ImString::from("value1"), + ArgumentName::Named(ImString::from("value1")), StructMember { ty: ValueType::SignedInteger, default: None @@ -787,14 +935,14 @@ mod test { build_argument_signature_list!(value: UnsignedInteger = UnsignedInteger::from(32).into(), value1: SignedInteger), [ ( - ImString::from("value"), + ArgumentName::Named(ImString::from("value")), StructMember { ty: ValueType::UnsignedInteger, default: Some(UnsignedInteger::from(32).into()) } ), ( - ImString::from("value1"), + ArgumentName::Named(ImString::from("value1")), StructMember { ty: ValueType::SignedInteger, default: None @@ -987,4 +1135,166 @@ mod test { }, ) } + + #[test] + fn builtin_function_positional_args() { + let mut database = BuiltinCallableDatabase::new(); + struct TestFunction; + build_function!( + database, + TestFunction, "test_function", ( + _context: &ExecutionContext, + a: UnsignedInteger, + b: UnsignedInteger + ) -> UnsignedInteger { + Ok(values::UnsignedInteger::from(a.0 + b.0)) + } + ); + + let root = crate::compile::full_compile("test_function(1u, 2u)"); + test_context_custom_database( + database, + [( + "test_function".into(), + BuiltinFunction::new::().into(), + )], + |context| { + let product = execute_expression(context, &root).unwrap(); + + assert_eq!(product, values::UnsignedInteger::from(3).into()); + }, + ) + } + + #[test] + fn builtin_function_mixed_args() { + let mut database = BuiltinCallableDatabase::new(); + struct TestFunction; + build_function!( + database, + TestFunction, "test_function", ( + _context: &ExecutionContext, + a: UnsignedInteger, + b: UnsignedInteger, + c: UnsignedInteger + ) -> UnsignedInteger { + Ok(values::UnsignedInteger::from(a.0 + b.0 + c.0)) + } + ); + + let root = crate::compile::full_compile("test_function(1u, 2u, c = 3u)"); + test_context_custom_database( + database, + [( + "test_function".into(), + BuiltinFunction::new::().into(), + )], + |context| { + let product = execute_expression(context, &root).unwrap(); + + assert_eq!(product, values::UnsignedInteger::from(6).into()); + }, + ) + } + + #[test] + fn builtin_function_positional_with_default() { + let mut database = BuiltinCallableDatabase::new(); + struct TestFunction; + build_function!( + database, + TestFunction, "test_function", ( + _context: &ExecutionContext, + a: UnsignedInteger, + b: UnsignedInteger = UnsignedInteger::from(10).into() + ) -> UnsignedInteger { + Ok(values::UnsignedInteger::from(a.0 + b.0)) + } + ); + + let root = crate::compile::full_compile("test_function(5u)"); + test_context_custom_database( + database, + [( + "test_function".into(), + BuiltinFunction::new::().into(), + )], + |context| { + let product = execute_expression(context, &root).unwrap(); + + assert_eq!(product, values::UnsignedInteger::from(15).into()); + }, + ) + } + + #[test] + fn builtin_method_positional_args() { + let mut database = BuiltinCallableDatabase::new(); + struct TestMethod; + + build_method!( + database, + TestMethod, "test_method", ( + context: &ExecutionContext, + this: Dictionary, + to_add: UnsignedInteger + ) -> UnsignedInteger { + let value: UnsignedInteger = this.get_attribute(context, "value")?.downcast(context)?; + + Ok(values::UnsignedInteger::from(value.0 + to_add.0)) + } + ); + + let root = crate::compile::full_compile( + "let object = (value = 5u, test_method = provided_test_method); in object::test_method(10u)", + ); + test_context_custom_database( + database, + [( + "provided_test_method".into(), + BuiltinFunction::new::().into(), + )], + |context| { + let product = execute_expression(context, &root).unwrap(); + + assert_eq!(product, values::UnsignedInteger::from(15).into()); + }, + ) + } + + #[test] + fn builtin_method_mixed_args() { + let mut database = BuiltinCallableDatabase::new(); + struct TestMethod; + + build_method!( + database, + TestMethod, "test_method", ( + context: &ExecutionContext, + this: Dictionary, + to_add: UnsignedInteger, + to_mul: UnsignedInteger + ) -> UnsignedInteger { + let value: UnsignedInteger = this.get_attribute(context, "value")?.downcast(context)?; + + Ok(values::UnsignedInteger::from((value.0 + to_add.0) * to_mul.0)) + } + ); + + let root = crate::compile::full_compile( + "let object = (value = 5u, test_method = provided_test_method); in object::test_method(10u, to_mul = 2u)", + ); + test_context_custom_database( + database, + [( + "provided_test_method".into(), + BuiltinFunction::new::().into(), + )], + |context| { + let product = execute_expression(context, &root).unwrap(); + + assert_eq!(product, values::UnsignedInteger::from(30).into()); + }, + ) + } } diff --git a/interpreter/src/execution/values/constraint_set.rs b/interpreter/src/execution/values/constraint_set.rs index 837017b..881d5e5 100644 --- a/interpreter/src/execution/values/constraint_set.rs +++ b/interpreter/src/execution/values/constraint_set.rs @@ -19,6 +19,10 @@ use common_data_types::{Dimension, Float}; use hashable_map::{HashableMap, HashableSet}; use imstr::ImString; + +use indexmap::IndexMap; + +use crate::execution::values::dictionary::ArgumentName; use selen::api::{add, div, eq, float, ge, gt, le, lt, mul, ne, sub, ExprBuilder, Model, VarId}; use crate::{ @@ -389,12 +393,12 @@ impl ConstraintSet { StrError("Could not determine dimension of constraint set").to_error(context) })?; - let mut members = HashMap::new(); + let mut members: HashMap = HashMap::new(); for (variable_name, variable_id) in variables { // Values that do not get solved are our inputs. if let Some(value) = solution.as_float(variable_id) { members.insert( - variable_name, + ArgumentName::Named(variable_name), Scalar { dimension, value: Float::new(value).unwrap_not_nan(context)?, @@ -629,11 +633,11 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { let callable = BuiltFunction { signature: Arc::new(Signature { argument_type: StructDefinition { - members: Arc::new(HashableMap::from(HashMap::new())), + members: Arc::new(IndexMap::new()), variadic: true, }, return_type: ValueType::Dictionary(StructDefinition { - members: Arc::new(HashableMap::new()), + members: Arc::new(IndexMap::new()), variadic: true, }), }), diff --git a/interpreter/src/execution/values/dictionary.rs b/interpreter/src/execution/values/dictionary.rs index 22ef3fa..43ebfb4 100644 --- a/interpreter/src/execution/values/dictionary.rs +++ b/interpreter/src/execution/values/dictionary.rs @@ -18,8 +18,9 @@ use std::{borrow::Cow, collections::HashMap, fmt::Display, sync::Arc}; -use hashable_map::HashableMap; use imstr::ImString; + +use indexmap::IndexMap; use rayon::prelude::*; use crate::{ @@ -40,18 +41,54 @@ use super::{ MissingAttributeError, Object, StaticTypeName, StructDefinition, StructMember, Value, ValueType, }; -#[derive(Clone, Debug, Eq)] -pub(crate) struct DictionaryData { - pub members: HashableMap, - pub struct_def: StructDefinition, +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum ArgumentName { + Positional(usize), + Named(ImString), +} + +impl Display for ArgumentName { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + ArgumentName::Positional(n) => write!(f, "{}", n), + ArgumentName::Named(name) => write!(f, "{}", name), + } + } +} + +impl std::borrow::Borrow for ArgumentName { + fn borrow(&self) -> &str { + match self { + ArgumentName::Named(name) => name.as_str(), + ArgumentName::Positional(_) => "", + } + } +} + +impl From<&str> for ArgumentName { + fn from(s: &str) -> Self { + ArgumentName::Named(s.into()) + } } -impl PartialEq for DictionaryData { - fn eq(&self, other: &Self) -> bool { - self.members == other.members +impl From for ArgumentName { + fn from(s: String) -> Self { + ArgumentName::Named(s.into()) } } +impl From for ArgumentName { + fn from(s: ImString) -> Self { + ArgumentName::Named(s) + } +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub(crate) struct DictionaryData { + pub members: IndexMap, + pub struct_def: StructDefinition, +} + pub fn find_all_variable_accesses_in_dictionary_construction( dictionary_construction: &crate::compile::DictionaryConstruction, access_collector: &mut dyn FnMut(&AstNode) -> ExecutionResult<()>, @@ -101,7 +138,11 @@ impl Object for Dictionary { } fn get_attribute(&self, context: &ExecutionContext, attribute: &str) -> ExecutionResult { - if let Some(member) = self.data.members.get(attribute) { + if let Some(member) = self + .data + .members + .get(&ArgumentName::Named(attribute.into())) + { Ok(member.clone()) } else { Err(MissingAttributeError { @@ -120,9 +161,9 @@ impl StaticTypeName for Dictionary { impl StaticType for Dictionary { fn static_type() -> ValueType { - static TYPE: std::sync::OnceLock>> = + static TYPE: std::sync::OnceLock>> = std::sync::OnceLock::new(); - let signature = TYPE.get_or_init(|| Arc::new(HashableMap::new())); + let signature = TYPE.get_or_init(|| Arc::new(IndexMap::new())); ValueType::Dictionary(StructDefinition { members: signature.clone(), variadic: true, @@ -139,7 +180,7 @@ impl Dictionary { context: &ExecutionContext, ast_node: &AstNode, ) -> ExecutionResult { - let mut members = HashMap::with_capacity(ast_node.node.assignments.len()); + let mut members = IndexMap::with_capacity(ast_node.node.assignments.len()); context.stack.scope_mut( context.stack_trace, @@ -156,19 +197,26 @@ impl Dictionary { }; buffer.par_extend(group.par_iter().map(|assignment| { + let name_str = match &assignment.node.name { + ArgumentName::Named(s) => s.clone(), + ArgumentName::Positional(idx) => { + ImString::from(format!("__{}", idx)) + } + }; ( - assignment.node.name.node.clone(), + assignment.node.name.clone(), + name_str, execute_expression(&context, &assignment.node.assignment), ) })); } - for (name, result) in buffer.drain(..) { + for (arg_name, name, result) in buffer.drain(..) { let value = result?; - if members.insert(name.clone(), value.clone()).is_some() { + if members.contains_key(&arg_name) { // That's a duplicate member. - return Err(DuplicateMemberError { name }.to_error( + return Err(DuplicateMemberError { name: name.clone() }.to_error( context.stack_trace.iter().chain([&StackTrace { parent: None, reference: ast_node.reference.clone(), @@ -177,6 +225,7 @@ impl Dictionary { )); } + members.insert(arg_name.clone(), value.clone()); stack.insert_value(name, value); } } @@ -188,10 +237,16 @@ impl Dictionary { Ok(Self::new(context, members)) } - pub fn new(context: &ExecutionContext, map: HashMap) -> Self { - let mut struct_members = HashMap::with_capacity(map.len()); + pub fn new(context: &ExecutionContext, map: I) -> Self + where + I: IntoIterator, + K: Into, + { + let members: IndexMap = + map.into_iter().map(|(k, v)| (k.into(), v)).collect(); + let mut struct_members = IndexMap::with_capacity(members.len()); - for (name, value) in map.iter() { + for (name, value) in members.iter() { let member = StructMember { ty: value.get_type(context), default: None, @@ -200,11 +255,10 @@ impl Dictionary { struct_members.insert(name.clone(), member); } - // HashableMap is just a wrapper around HashMap, so this has no additional cost. let data = Arc::new(DictionaryData { - members: HashableMap::from(map), + members, struct_def: StructDefinition { - members: Arc::new(HashableMap::from(struct_members)), + members: Arc::new(struct_members), variadic: false, }, }); @@ -212,12 +266,12 @@ impl Dictionary { Self { data } } - pub fn iter(&self) -> impl Iterator { + pub fn iter(&self) -> impl Iterator { self.data.members.iter() } pub fn get(&self, name: &str) -> Option<&Value> { - self.data.members.get(name) + self.data.members.get(&ArgumentName::Named(name.into())) } } @@ -247,18 +301,24 @@ mod test { fn build_dictionary() { let product = test_run("(none = std.consts.None)").unwrap(); let expected = Arc::new(DictionaryData { - members: HashableMap::from(HashMap::from_iter([( - "none".into(), - values::ValueNone.into(), - )])), + members: { + let map: HashMap = HashMap::from_iter([( + ArgumentName::Named("none".into()), + values::ValueNone.into(), + )]); + map.into_iter().collect() + }, struct_def: StructDefinition { - members: Arc::new(HashableMap::from(HashMap::from([( - "none".into(), - StructMember { - ty: ValueType::TypeNone, - default: None, - }, - )]))), + members: Arc::new({ + let map: HashMap = HashMap::from_iter([( + ArgumentName::Named("none".into()), + StructMember { + ty: ValueType::TypeNone, + default: None, + }, + )]); + map.into_iter().collect() + }), variadic: false, }, }); @@ -295,8 +355,7 @@ mod test { assert_eq!(product, values::Boolean(true).into()); let product = - test_run("let result = \"{value}\"::format(value = (a = 1u, b = 2u)); in result == \"(a = 1, b = 2)\" || result == \"(b = 2, a = 1)\"") - .unwrap(); + test_run("let result = \"{value}\"::format(value = (a = 1u, b = 2u)); in result == \"(a = 1, b = 2)\"").unwrap(); assert_eq!(product, values::Boolean(true).into()); let product = @@ -304,4 +363,62 @@ mod test { .unwrap(); assert_eq!(product, values::Boolean(true).into()); } + + #[test] + fn argument_name_display_positional() { + assert_eq!(format!("{}", ArgumentName::Positional(0)), "0"); + assert_eq!(format!("{}", ArgumentName::Positional(3)), "3"); + } + + #[test] + fn argument_name_display_named() { + assert_eq!(format!("{}", ArgumentName::Named("foo".into())), "foo"); + } + + #[test] + fn argument_name_hash_and_eq() { + assert_eq!(ArgumentName::Positional(0), ArgumentName::Positional(0)); + assert_eq!( + ArgumentName::Named("a".into()), + ArgumentName::Named("a".into()) + ); + assert_ne!(ArgumentName::Positional(0), ArgumentName::Named("0".into())); + } + + #[test] + fn dictionary_insert_positional_key() { + let mut map: IndexMap = IndexMap::new(); + map.insert( + ArgumentName::Positional(0), + values::UnsignedInteger::from(1).into(), + ); + map.insert( + ArgumentName::Positional(1), + values::UnsignedInteger::from(2).into(), + ); + let keys: Vec<_> = map.keys().collect(); + assert_eq!(keys[0], &ArgumentName::Positional(0)); + assert_eq!(keys[1], &ArgumentName::Positional(1)); + } + + #[test] + fn dictionary_insert_mixed_keys() { + let mut map: IndexMap = IndexMap::new(); + map.insert( + ArgumentName::Positional(0), + values::UnsignedInteger::from(1).into(), + ); + map.insert( + ArgumentName::Positional(1), + values::UnsignedInteger::from(2).into(), + ); + map.insert( + ArgumentName::Named("b".into()), + values::UnsignedInteger::from(3).into(), + ); + let keys: Vec<_> = map.keys().collect(); + assert_eq!(keys[0], &ArgumentName::Positional(0)); + assert_eq!(keys[1], &ArgumentName::Positional(1)); + assert_eq!(keys[2], &ArgumentName::Named("b".into())); + } } diff --git a/interpreter/src/execution/values/integer.rs b/interpreter/src/execution/values/integer.rs index 8a22731..eead2f0 100644 --- a/interpreter/src/execution/values/integer.rs +++ b/interpreter/src/execution/values/integer.rs @@ -16,6 +16,7 @@ * program. If not, see . */ +use common_data_types::{Dimension, Float, RawFloat}; use enum_downcast::{AsVariant, IntoVariant}; use num_traits::{ pow::checked_pow, CheckedAdd, CheckedDiv, CheckedMul, CheckedSub, One, ToPrimitive, @@ -40,7 +41,7 @@ use crate::{ }, values::{ iterators::{IterableObject, ValueIterator}, - Boolean, + Boolean, Scalar, }, }; @@ -265,6 +266,10 @@ where <::MethodSet as methods::MethodSet>::Midpoint, >() .into()), + "to_scalar" => Ok(BuiltinFunction::new::< + <::MethodSet as methods::MethodSet>::ToScalar, + >() + .into()), _ => Err(MissingAttributeError { name: attribute.into(), } @@ -336,6 +341,7 @@ trait IntOps: fn is_positive(&self) -> bool; fn is_negative(&self) -> bool; fn midpoint(&self, rhs: Self) -> Self; + fn to_scalar(&self) -> Scalar; fn increment(&self) -> Self; fn decrement(&self) -> Self; @@ -420,6 +426,13 @@ impl IntOps for i64 { fn decrement(&self) -> Self { self - 1 } + + fn to_scalar(&self) -> Scalar { + Scalar { + dimension: Dimension::zero(), + value: Float::new(*self as RawFloat).unwrap(), + } + } } impl StaticTypeName for Integer { @@ -519,6 +532,13 @@ impl IntOps for u64 { fn decrement(&self) -> Self { self - 1 } + + fn to_scalar(&self) -> Scalar { + Scalar { + dimension: Dimension::zero(), + value: Float::new(*self as RawFloat).unwrap(), + } + } } impl StaticTypeName for Integer { @@ -562,6 +582,8 @@ mod methods { type IsPositive; type IsNegative; type Midpoint; + + type ToScalar; } macro_rules! build_method_set { @@ -583,6 +605,7 @@ mod methods { pub struct [<$name IsPositive>]; pub struct [<$name IsNegative>]; pub struct [<$name Midpoint>]; + pub struct [<$name ToScalar>]; pub struct [<$name MethodSet>]; impl MethodSet for [<$name MethodSet>] { @@ -602,6 +625,7 @@ mod methods { type IsPositive = [<$name IsPositive>]; type IsNegative = [<$name IsNegative>]; type Midpoint = [<$name Midpoint>]; + type ToScalar = [<$name ToScalar>]; } } }; @@ -764,6 +788,15 @@ mod methods { Ok(Integer::::from(this.0.midpoint(rhs.0))) } ); + build_method!( + database, + ::ToScalar, format!("{}::to_scalar", Integer::::static_type_name()), ( + context: &ExecutionContext, + this: Integer + ) -> Scalar { + Ok(this.0.to_scalar()) + } + ); } } @@ -780,14 +813,14 @@ pub fn register_methods_and_functions(database: &mut BuiltinCallableDatabase) { methods::register_methods::(database); build_function!( - database, - functions::RangeUInt, "std.range.UInt", ( - context: &ExecutionContext, - inclusive: Boolean = Boolean(false).into(), - reverse: Boolean = Boolean(false).into(), - start: UnsignedInteger, - end: UnsignedInteger - ) -> ValueIterator { + database, + functions::RangeUInt, "std.range.UInt", ( + context: &ExecutionContext, + start: UnsignedInteger, + end: UnsignedInteger, + inclusive: Boolean = Boolean(false).into(), + reverse: Boolean = Boolean(false).into() + ) -> ValueIterator { let inclusive = inclusive.0; let reverse = reverse.0; let start = start.0; @@ -809,14 +842,14 @@ pub fn register_methods_and_functions(database: &mut BuiltinCallableDatabase) { } ); build_function!( - database, - functions::RangeSInt, "std.range.SInt", ( - context: &ExecutionContext, - inclusive: Boolean = Boolean(false).into(), - reverse: Boolean = Boolean(false).into(), - start: SignedInteger, - end: SignedInteger - ) -> ValueIterator { + database, + functions::RangeSInt, "std.range.SInt", ( + context: &ExecutionContext, + start: SignedInteger, + end: SignedInteger, + inclusive: Boolean = Boolean(false).into(), + reverse: Boolean = Boolean(false).into() + ) -> ValueIterator { let inclusive = inclusive.0; let reverse = reverse.0; let start = start.0; @@ -853,7 +886,8 @@ where { fn iterate( &self, - callback: impl FnOnce(&mut dyn Iterator) -> ExecutionResult, + _context: &ExecutionContext, + callback: impl FnOnce(&mut dyn Iterator>) -> ExecutionResult, ) -> ExecutionResult { // We had to implement a lot of this manually due to std::range::Step not being stable yet. let mut index = self.start; @@ -868,7 +902,7 @@ where if index != end { let value = index; index = index.decrement(); - Some(Integer(value).into()) + Some(Ok(Integer(value).into())) } else { None } @@ -880,7 +914,7 @@ where if index != end { let value = index; index = index.increment(); - Some(Integer(value).into()) + Some(Ok(Integer(value).into())) } else { None } @@ -894,7 +928,7 @@ where #[cfg(test)] mod test { use crate::{ - execution::{test_run, values::Boolean}, + execution::{run_assert_eq, test_run, values::Boolean}, values::UnsupportedOperationError, }; @@ -1438,4 +1472,87 @@ mod test { .unwrap(); assert_eq!(product, Boolean(true).into()); } + + #[test] + fn range_uint_positional() { + let product = + test_run("std.range.UInt(0u, 5u)::collect_list() == [0u, 1u, 2u, 3u, 4u]").unwrap(); + assert_eq!(product, Boolean(true).into()); + + let product = test_run( + "std.range.UInt(0u, 5u, inclusive = true)::collect_list() == [0u, 1u, 2u, 3u, 4u, 5u]", + ) + .unwrap(); + assert_eq!(product, Boolean(true).into()); + + let product = + test_run("std.range.UInt(5u, 1u, false, true)::collect_list() == [5u, 4u, 3u, 2u]") + .unwrap(); + assert_eq!(product, Boolean(true).into()); + + let product = + test_run("std.range.UInt(5u, 1u, true, true)::collect_list() == [5u, 4u, 3u, 2u, 1u]") + .unwrap(); + assert_eq!(product, Boolean(true).into()); + } + + #[test] + fn range_sint_positional() { + let product = + test_run("std.range.SInt(0i, 5i)::collect_list() == [0i, 1i, 2i, 3i, 4i]").unwrap(); + assert_eq!(product, Boolean(true).into()); + + let product = test_run( + "std.range.SInt(0i, 5i, inclusive = true)::collect_list() == [0i, 1i, 2i, 3i, 4i, 5i]", + ) + .unwrap(); + assert_eq!(product, Boolean(true).into()); + + let product = + test_run("std.range.SInt(5i, 1i, false, true)::collect_list() == [5i, 4i, 3i, 2i]") + .unwrap(); + assert_eq!(product, Boolean(true).into()); + + let product = + test_run("std.range.SInt(5i, 1i, true, true)::collect_list() == [5i, 4i, 3i, 2i, 1i]") + .unwrap(); + assert_eq!(product, Boolean(true).into()); + } + + #[test] + fn range_uint_backward_compat() { + let product = + test_run("std.range.UInt(start = 0u, end = 4u)::collect_list() == [0u, 1u, 2u, 3u]") + .unwrap(); + assert_eq!(product, Boolean(true).into()); + + let product = + test_run("std.range.UInt(start = 0u, end = 4u, inclusive = true)::collect_list() == [0u, 1u, 2u, 3u, 4u]") + .unwrap(); + assert_eq!(product, Boolean(true).into()); + + let product = + test_run("std.range.UInt(start = 4u, end = 0u, reverse = true)::collect_list() == [4u, 3u, 2u, 1u]") + .unwrap(); + assert_eq!(product, Boolean(true).into()); + } + + #[test] + fn range_sint_backward_compat() { + let product = + test_run("std.range.SInt(start = 0i, end = 4i)::collect_list() == [0i, 1i, 2i, 3i]") + .unwrap(); + assert_eq!(product, Boolean(true).into()); + + let product = + test_run("std.range.SInt(start = 0i, end = 4i, inclusive = true)::collect_list() == [0i, 1i, 2i, 3i, 4i]") + .unwrap(); + assert_eq!(product, Boolean(true).into()); + } + + #[test] + fn to_scalar() { + run_assert_eq("1u::to_scalar()", "1"); + run_assert_eq("1i::to_scalar()", "1"); + } } diff --git a/interpreter/src/execution/values/iterators.rs b/interpreter/src/execution/values/iterators.rs index 2b86576..70a443c 100644 --- a/interpreter/src/execution/values/iterators.rs +++ b/interpreter/src/execution/values/iterators.rs @@ -26,6 +26,9 @@ use crate::{ values::{ integer::{RangeSInt, RangeUInt}, list::{ListIterator, ListReverseIterator}, + polygon::{ + InteriorIterator, LineStringIterator, PolygonSetIterator, RevLineStringIterator, + }, string::{CharIterator, LineIterator}, Boolean, BuiltinCallableDatabase, BuiltinFunction, Dictionary, IString, List, MissingAttributeError, Object, StaticType, StaticTypeName, Style, UnsignedInteger, Value, @@ -40,7 +43,8 @@ use itertools::Itertools; pub trait IterableObject { fn iterate( &self, - callback: impl FnOnce(&mut dyn Iterator) -> ExecutionResult, + context: &ExecutionContext, + callback: impl FnOnce(&mut dyn Iterator>) -> ExecutionResult, ) -> ExecutionResult; } @@ -54,6 +58,10 @@ pub enum IterableSource { LineIterator, RangeUInt, RangeSInt, + LineStringIterator, + RevLineStringIterator, + InteriorIterator, + PolygonSetIterator, } #[derive(Debug, Eq, PartialEq, Clone)] @@ -113,37 +121,43 @@ impl Object for ValueIterator { fn get_attribute(&self, context: &ExecutionContext, attribute: &str) -> ExecutionResult { match attribute { - "chunks" => Ok(BuiltinFunction::new::().into()), - "chunks_exact" => Ok(BuiltinFunction::new::().into()), - "chain" => Ok(BuiltinFunction::new::().into()), - "cycle" => Ok(BuiltinFunction::new::().into()), - "debug" => Ok(BuiltinFunction::new::().into()), - "enumerate" => Ok(BuiltinFunction::new::().into()), - "filter" => Ok(BuiltinFunction::new::().into()), - "filter_map" => Ok(BuiltinFunction::new::().into()), - "flatten" => Ok(BuiltinFunction::new::().into()), - "map" => Ok(BuiltinFunction::new::().into()), - "map_while" => Ok(BuiltinFunction::new::().into()), - "skip" => Ok(BuiltinFunction::new::().into()), - "skip_while" => Ok(BuiltinFunction::new::().into()), - "step_by" => Ok(BuiltinFunction::new::().into()), - "take" => Ok(BuiltinFunction::new::().into()), - "take_while" => Ok(BuiltinFunction::new::().into()), - "zip" => Ok(BuiltinFunction::new::().into()), - - "all" => Ok(BuiltinFunction::new::().into()), - "any" => Ok(BuiltinFunction::new::().into()), - "collect_list" => Ok(BuiltinFunction::new::().into()), - "collect_string" => Ok(BuiltinFunction::new::().into()), - "count" => Ok(BuiltinFunction::new::().into()), - "first" => Ok(BuiltinFunction::new::().into()), - "fold" => Ok(BuiltinFunction::new::().into()), - "last" => Ok(BuiltinFunction::new::().into()), - "max" => Ok(BuiltinFunction::new::().into()), - "min" => Ok(BuiltinFunction::new::().into()), - "nth" => Ok(BuiltinFunction::new::().into()), - "product" => Ok(BuiltinFunction::new::().into()), - "sum" => Ok(BuiltinFunction::new::().into()), + "chunks" => Ok(BuiltinFunction::new::().into()), + "chunks_exact" => { + Ok(BuiltinFunction::new::().into()) + } + "chain" => Ok(BuiltinFunction::new::().into()), + "cycle" => Ok(BuiltinFunction::new::().into()), + "debug" => Ok(BuiltinFunction::new::().into()), + "enumerate" => Ok(BuiltinFunction::new::().into()), + "filter" => Ok(BuiltinFunction::new::().into()), + "filter_map" => Ok(BuiltinFunction::new::().into()), + "flatten" => Ok(BuiltinFunction::new::().into()), + "map" => Ok(BuiltinFunction::new::().into()), + "map_while" => Ok(BuiltinFunction::new::().into()), + "skip" => Ok(BuiltinFunction::new::().into()), + "skip_while" => Ok(BuiltinFunction::new::().into()), + "step_by" => Ok(BuiltinFunction::new::().into()), + "take" => Ok(BuiltinFunction::new::().into()), + "take_while" => Ok(BuiltinFunction::new::().into()), + "zip" => Ok(BuiltinFunction::new::().into()), + + "all" => Ok(BuiltinFunction::new::().into()), + "any" => Ok(BuiltinFunction::new::().into()), + "collect_list" => { + Ok(BuiltinFunction::new::().into()) + } + "collect_string" => { + Ok(BuiltinFunction::new::().into()) + } + "count" => Ok(BuiltinFunction::new::().into()), + "first" => Ok(BuiltinFunction::new::().into()), + "fold" => Ok(BuiltinFunction::new::().into()), + "last" => Ok(BuiltinFunction::new::().into()), + "max" => Ok(BuiltinFunction::new::().into()), + "min" => Ok(BuiltinFunction::new::().into()), + "nth" => Ok(BuiltinFunction::new::().into()), + "product" => Ok(BuiltinFunction::new::().into()), + "sum" => Ok(BuiltinFunction::new::().into()), _ => Err(MissingAttributeError { name: attribute.into(), } @@ -187,9 +201,8 @@ impl ValueIterator { context: &ExecutionContext, callback: IterateCallback<'s, R>, ) -> ExecutionResult { - self.source.iterate(move |iterator| { + self.source.iterate(context, move |iterator| { let mut stages = self.stages.iter(); - let iterator = &mut iterator.map(Ok); if let Some(first_stage) = stages.next() { first_stage.process(context, &mut stages, iterator, callback) @@ -338,7 +351,7 @@ impl IteratorStage { context, Dictionary::new( context, - HashMap::from_iter([("c".into(), value.clone())]), + HashMap::<&str, Value>::from_iter([("c", value.clone())]), ), ) .and_then(|value| value.downcast::(context)); @@ -367,7 +380,7 @@ impl IteratorStage { context, Dictionary::new( context, - HashMap::from_iter([("c".into(), value.clone())]), + HashMap::<&str, Value>::from_iter([("c", value.clone())]), ), ); @@ -425,7 +438,10 @@ impl IteratorStage { let value = result?; map.call( context, - Dictionary::new(context, HashMap::from_iter([("c".into(), value.clone())])), + Dictionary::new( + context, + HashMap::<&str, Value>::from_iter([("c", value.clone())]), + ), ) }); @@ -438,7 +454,7 @@ impl IteratorStage { context, Dictionary::new( context, - HashMap::from_iter([("c".into(), value.clone())]), + HashMap::<&str, Value>::from_iter([("c", value.clone())]), ), ); @@ -471,7 +487,7 @@ impl IteratorStage { context, Dictionary::new( context, - HashMap::from_iter([("c".into(), value.clone())]), + HashMap::<&str, Value>::from_iter([("c", value.clone())]), ), ) .and_then(|value| value.downcast::(context))? @@ -502,7 +518,7 @@ impl IteratorStage { context, Dictionary::new( context, - HashMap::from_iter([("c".into(), value.clone())]), + HashMap::<&str, Value>::from_iter([("c", value.clone())]), ), ) .and_then(|value| value.downcast::(context)); @@ -543,7 +559,7 @@ impl IteratorStage { } } -pub mod methods { +pub mod methods_and_functions { // Methods to add stages to the iterator: pub struct Chunks; pub struct ChunksExact; @@ -582,7 +598,7 @@ pub mod methods { pub fn register_methods(database: &mut BuiltinCallableDatabase) { build_method!( database, - methods::Chunks, "Iterator::chunks", ( + methods_and_functions::Chunks, "Iterator::chunks", ( context: &ExecutionContext, this: ValueIterator, size: UnsignedInteger @@ -594,8 +610,8 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::ChunksExact, "Iterator::chunks_exact", ( - context: &ExecutionContext, + methods_and_functions::ChunksExact, "Iterator::chunks_exact", ( + methods: &ExecutionContext, this: ValueIterator, size: UnsignedInteger ) -> ValueIterator { @@ -606,7 +622,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Chain, "Iterator::chain", ( + methods_and_functions::Chain, "Iterator::chain", ( context: &ExecutionContext, this: ValueIterator, next: ValueIterator @@ -618,7 +634,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Cycle, "Iterator::cycle", ( + methods_and_functions::Cycle, "Iterator::cycle", ( context: &ExecutionContext, this: ValueIterator, count: UnsignedInteger @@ -630,7 +646,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Debug, "Iterator::debug", ( + methods_and_functions::Debug, "Iterator::debug", ( context: &ExecutionContext, this: ValueIterator ) -> ValueIterator { @@ -641,7 +657,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Enumerate, "Iterator::enumerate", ( + methods_and_functions::Enumerate, "Iterator::enumerate", ( context: &ExecutionContext, this: ValueIterator ) -> ValueIterator { @@ -652,7 +668,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Filter, "Iterator::filter", ( + methods_and_functions::Filter, "Iterator::filter", ( context: &ExecutionContext, this: ValueIterator, f: FilterClosure @@ -664,7 +680,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::FilterMap, "Iterator::filter_map", ( + methods_and_functions::FilterMap, "Iterator::filter_map", ( context: &ExecutionContext, this: ValueIterator, f: FilterMapClosure @@ -676,7 +692,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Flatten, "Iterator::flatten", ( + methods_and_functions::Flatten, "Iterator::flatten", ( context: &ExecutionContext, this: ValueIterator ) -> ValueIterator { @@ -687,7 +703,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Map, "Iterator::map", ( + methods_and_functions::Map, "Iterator::map", ( context: &ExecutionContext, this: ValueIterator, f: MapClosure @@ -699,7 +715,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::MapWhile, "Iterator::map_while", ( + methods_and_functions::MapWhile, "Iterator::map_while", ( context: &ExecutionContext, this: ValueIterator, f: MapWhileClosure @@ -711,7 +727,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Skip, "Iterator::skip", ( + methods_and_functions::Skip, "Iterator::skip", ( context: &ExecutionContext, this: ValueIterator, count: UnsignedInteger @@ -723,7 +739,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::SkipWhile, "Iterator::skip_while", ( + methods_and_functions::SkipWhile, "Iterator::skip_while", ( context: &ExecutionContext, this: ValueIterator, f: SkipWhileClosure @@ -735,7 +751,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::StepBy, "Iterator::step_by", ( + methods_and_functions::StepBy, "Iterator::step_by", ( context: &ExecutionContext, this: ValueIterator, count: UnsignedInteger @@ -747,7 +763,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Take, "Iterator::take", ( + methods_and_functions::Take, "Iterator::take", ( context: &ExecutionContext, this: ValueIterator, count: UnsignedInteger @@ -759,7 +775,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::TakeWhile, "Iterator::take_while", ( + methods_and_functions::TakeWhile, "Iterator::take_while", ( context: &ExecutionContext, this: ValueIterator, f: TakeWhileClosure @@ -771,7 +787,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Zip, "Iterator::zip", ( + methods_and_functions::Zip, "Iterator::zip", ( context: &ExecutionContext, this: ValueIterator, other: ValueIterator @@ -785,7 +801,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { build_closure_type!(AllClosure(c: Value) -> Boolean); build_method!( database, - methods::All, "Iterator::all", ( + methods_and_functions::All, "Iterator::all", ( context: &ExecutionContext, this: ValueIterator, f: AllClosure @@ -799,7 +815,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { context, Dictionary::new( context, - HashMap::from_iter([("c".into(), value.clone())]), + HashMap::<&str, Value>::from_iter([("c", value.clone())]), ), ) .and_then(|value| value.downcast::(context))?; @@ -817,7 +833,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { build_closure_type!(AnyClosure(c: Value) -> Boolean); build_method!( database, - methods::Any, "Iterator::any", ( + methods_and_functions::Any, "Iterator::any", ( context: &ExecutionContext, this: ValueIterator, f: AnyClosure @@ -831,7 +847,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { context, Dictionary::new( context, - HashMap::from_iter([("c".into(), value.clone())]), + HashMap::<&str, Value>::from_iter([("c", value.clone())]), ), ) .and_then(|value| value.downcast::(context))?; @@ -847,7 +863,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::CollectList, "Iterator::collect_list", ( + methods_and_functions::CollectList, "Iterator::collect_list", ( context: &ExecutionContext, this: ValueIterator ) -> List { @@ -859,7 +875,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::CollectString, "Iterator::collect_string", ( + methods_and_functions::CollectString, "Iterator::collect_string", ( context: &ExecutionContext, this: ValueIterator ) -> IString { @@ -879,7 +895,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Count, "Iterator::count", ( + methods_and_functions::Count, "Iterator::count", ( context: &ExecutionContext, this: ValueIterator ) -> UnsignedInteger { @@ -890,7 +906,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::First, "Iterator::first", ( + methods_and_functions::First, "Iterator::first", ( context: &ExecutionContext, this: ValueIterator ) -> Value { @@ -907,7 +923,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { build_closure_type!(FoldClosure(previous: Value, c: Value) -> Value); build_method!( database, - methods::Fold, "Iterator::fold",( + methods_and_functions::Fold, "Iterator::fold",( context: &ExecutionContext, this: ValueIterator, init: Value, @@ -919,13 +935,13 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { for component in iterator { let component = component?; - accumulator = f.call(context, Dictionary::new(context, HashMap::from_iter([ + accumulator = f.call(context, Dictionary::new(context, HashMap::<&str, Value>::from_iter([ ( - "c".into(), + "c", component.clone() ), ( - "previous".into(), + "previous", accumulator ) ])))?; @@ -938,7 +954,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Last, "Iterator::last", ( + methods_and_functions::Last, "Iterator::last", ( context: &ExecutionContext, this: ValueIterator ) -> Value { @@ -953,7 +969,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Max, "Iterator::max", ( + methods_and_functions::Max, "Iterator::max", ( context: &ExecutionContext, this: ValueIterator ) -> Value { @@ -977,7 +993,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Min, "Iterator::min", ( + methods_and_functions::Min, "Iterator::min", ( context: &ExecutionContext, this: ValueIterator ) -> Value { @@ -1001,7 +1017,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Nth, "Iterator::nth", ( + methods_and_functions::Nth, "Iterator::nth", ( context: &ExecutionContext, this: ValueIterator, n: UnsignedInteger @@ -1017,7 +1033,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Product, "Iterator::product",( + methods_and_functions::Product, "Iterator::product",( context: &ExecutionContext, this: ValueIterator ) -> Value { @@ -1040,7 +1056,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Sum, "Iterator::sum",( + methods_and_functions::Sum, "Iterator::sum",( context: &ExecutionContext, this: ValueIterator ) -> Value { diff --git a/interpreter/src/execution/values/list.rs b/interpreter/src/execution/values/list.rs index b85da32..e0aefa8 100644 --- a/interpreter/src/execution/values/list.rs +++ b/interpreter/src/execution/values/list.rs @@ -17,7 +17,7 @@ */ use crate::{ - build_closure_type, build_method, + build_closure_type, build_function, build_method, compile::{AstNode, Expression}, execute_expression, execution::{ @@ -37,7 +37,7 @@ use std::{borrow::Cow, cmp::Ordering, collections::HashMap, sync::Arc}; use rayon::iter::{IntoParallelRefIterator, ParallelIterator}; -#[derive(Debug, Clone, Eq, PartialEq)] +#[derive(Debug, Default, Clone, Eq, PartialEq)] pub struct List { // In theory, we could use a lot less memory by dynamically sizing everything to fit // our smallest type, but we aren't going to implement that today. @@ -115,6 +115,29 @@ impl List { self.map_raw(context, operation_name, operation) .map(|value| value.into()) } + + pub fn iter(&self) -> impl Iterator { + self.values.iter() + } + + pub fn is_empty(&self) -> bool { + self.values.is_empty() + } + + pub fn len(&self) -> usize { + self.values.len() + } +} + +impl IntoIterator for List { + type Item = Value; + + type IntoIter = std::vec::IntoIter; + + fn into_iter(self) -> Self::IntoIter { + let list = Arc::try_unwrap(self.values).unwrap_or_else(|arc| (*arc).clone()); + list.into_iter() + } } impl Object for List { @@ -152,27 +175,35 @@ impl Object for List { fn get_attribute(&self, context: &ExecutionContext, attribute: &str) -> ExecutionResult { match attribute { - "append" => Ok(BuiltinFunction::new::().into()), - "slice" => Ok(BuiltinFunction::new::().into()), - "get" => Ok(BuiltinFunction::new::().into()), - "chunks" => Ok(BuiltinFunction::new::().into()), + "append" => Ok(BuiltinFunction::new::().into()), + "slice" => Ok(BuiltinFunction::new::().into()), + "get" => Ok(BuiltinFunction::new::().into()), + "chunks" => Ok(BuiltinFunction::new::().into()), - "retain" => Ok(BuiltinFunction::new::().into()), + "retain" => Ok(BuiltinFunction::new::().into()), - "sort" => Ok(BuiltinFunction::new::().into()), - "reverse" => Ok(BuiltinFunction::new::().into()), - "truncate" => Ok(BuiltinFunction::new::().into()), + "sort" => Ok(BuiltinFunction::new::().into()), + "reverse" => Ok(BuiltinFunction::new::().into()), + "truncate" => Ok(BuiltinFunction::new::().into()), - "deduplicate" => Ok(BuiltinFunction::new::().into()), - "union" => Ok(BuiltinFunction::new::().into()), - "intersection" => Ok(BuiltinFunction::new::().into()), - "difference" => Ok(BuiltinFunction::new::().into()), + "deduplicate" => { + Ok(BuiltinFunction::new::().into()) + } + "union" => Ok(BuiltinFunction::new::().into()), + "intersection" => { + Ok(BuiltinFunction::new::().into()) + } + "difference" => Ok(BuiltinFunction::new::().into()), "symmetric_difference" => { - Ok(BuiltinFunction::new::().into()) + Ok(BuiltinFunction::new::().into()) + } + "cartesian_product" => { + Ok(BuiltinFunction::new::().into()) + } + "iter" => Ok(BuiltinFunction::new::().into()), + "iter_reverse" => { + Ok(BuiltinFunction::new::().into()) } - "cartesian_product" => Ok(BuiltinFunction::new::().into()), - "iter" => Ok(BuiltinFunction::new::().into()), - "iter_reverse" => Ok(BuiltinFunction::new::().into()), _ => Err(MissingAttributeError { name: attribute.into(), } @@ -282,9 +313,10 @@ pub struct ListIterator { impl IterableObject for ListIterator { fn iterate( &self, - callback: impl FnOnce(&mut dyn Iterator) -> ExecutionResult, + _context: &ExecutionContext, + callback: impl FnOnce(&mut dyn Iterator>) -> ExecutionResult, ) -> ExecutionResult { - let mut iter = self.list.values.iter().cloned(); + let mut iter = self.list.values.iter().cloned().map(Ok); callback(&mut iter) } } @@ -297,9 +329,10 @@ pub struct ListReverseIterator { impl IterableObject for ListReverseIterator { fn iterate( &self, - callback: impl FnOnce(&mut dyn Iterator) -> ExecutionResult, + _context: &ExecutionContext, + callback: impl FnOnce(&mut dyn Iterator>) -> ExecutionResult, ) -> ExecutionResult { - let mut iter = self.list.values.iter().rev().cloned(); + let mut iter = self.list.values.iter().rev().cloned().map(Ok); callback(&mut iter) } } @@ -353,7 +386,9 @@ impl std::fmt::Display for SortingError { } } -mod methods { +pub mod methods_and_functions { + pub struct BuildType; + pub struct Append; pub struct Slice; pub struct Get; @@ -381,9 +416,24 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { build_closure_type!(FoldClosure(previous: Value, c: Value) -> Value); build_closure_type!(RetainClosure(c: Value) -> Boolean); + build_function!( + database, + methods_and_functions::BuildType, "List::build_type", ( + context: &ExecutionContext, + r#type: ValueType = ValueType::Any.into() + ) -> ValueType { + if matches!(r#type, ValueType::Any) { + Ok(ValueType::List(None)) + } else { + Ok(ValueType::List(Some(Box::new(r#type)))) + } + + } + ); + build_method!( database, - methods::Append, "List::append", ( + methods_and_functions::Append, "List::append", ( context: &ExecutionContext, this: List, rhs: List @@ -396,7 +446,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Slice, "List::slice", ( + methods_and_functions::Slice, "List::slice", ( context: &ExecutionContext, this: List, start: Option = ValueNone.into(), @@ -426,7 +476,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Get, "List::get", ( + methods_and_functions::Get, "List::get", ( context: &ExecutionContext, this: List, i: UnsignedInteger @@ -442,7 +492,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Chunks, "List::chunks", ( + methods_and_functions::Chunks, "List::chunks", ( context: &ExecutionContext, this: List, size: UnsignedInteger, @@ -468,7 +518,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Retain, "List::retain",( + methods_and_functions::Retain, "List::retain",( context: &ExecutionContext, this: List, f: RetainClosure @@ -476,9 +526,9 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { let mut values: Vec = Vec::with_capacity(this.values.len()); for value in this.values.iter() { - let retain = f.call(context, Dictionary::new(context, HashMap::from_iter([ + let retain = f.call(context, Dictionary::new(context, HashMap::<&str, Value>::from_iter([ ( - "c".into(), + "c", value.clone() ) ])))?.downcast::(context)?; @@ -493,7 +543,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Sort, "List::sort",( + methods_and_functions::Sort, "List::sort",( context: &ExecutionContext, this: List ) -> List { @@ -519,7 +569,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Reverse, "List::reverse",( + methods_and_functions::Reverse, "List::reverse",( context: &ExecutionContext, this: List ) -> List { @@ -531,7 +581,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Truncate, "List::truncate",( + methods_and_functions::Truncate, "List::truncate",( context: &ExecutionContext, this: List, length: UnsignedInteger @@ -544,7 +594,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Deduplicate, "List::deduplicate",( + methods_and_functions::Deduplicate, "List::deduplicate",( context: &ExecutionContext, this: List ) -> List { @@ -556,7 +606,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Union, "List::union",( + methods_and_functions::Union, "List::union",( context: &ExecutionContext, this: List, other: List @@ -574,7 +624,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Intersection, "List::intersection",( + methods_and_functions::Intersection, "List::intersection",( context: &ExecutionContext, this: List, other: List @@ -592,7 +642,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::Difference, "List::difference",( + methods_and_functions::Difference, "List::difference",( context: &ExecutionContext, this: List, other: List @@ -611,7 +661,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::SymmetricDifference, "List::symmetric_difference",( + methods_and_functions::SymmetricDifference, "List::symmetric_difference",( context: &ExecutionContext, this: List, other: List @@ -637,7 +687,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::CartesianProduct, "List::cartesian_product",( + methods_and_functions::CartesianProduct, "List::cartesian_product",( context: &ExecutionContext, this: List, other: List @@ -657,7 +707,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { build_method!( database, - methods::Iterate, "List::iter",( + methods_and_functions::Iterate, "List::iter",( context: &ExecutionContext, this: List ) -> ValueIterator { @@ -666,7 +716,7 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { ); build_method!( database, - methods::IterateReverse, "List::iter_reverse",( + methods_and_functions::IterateReverse, "List::iter_reverse",( context: &ExecutionContext, this: List ) -> ValueIterator { diff --git a/interpreter/src/execution/values/manifold_mesh.rs b/interpreter/src/execution/values/manifold_mesh.rs index 55ee132..96e8ab8 100644 --- a/interpreter/src/execution/values/manifold_mesh.rs +++ b/interpreter/src/execution/values/manifold_mesh.rs @@ -26,37 +26,42 @@ use std::{ use crate::{ build_function, build_method, - execution::errors::{ExecutionResult, Raise, StrError}, + execution::{ + errors::{ExecutionResult, Raise, StrError}, + StoreTrait, + }, values::{ scalar::{Length, UnwrapNotNan}, vector::{Length3, Zero3}, Boolean, BuiltinCallableDatabase, BuiltinFunction, DowncastError, File, IString, - MissingAttributeError, Object, Scalar, StaticType, StaticTypeName, Style, UnsignedInteger, - Value, ValueNone, ValueType, Vector3, + MissingAttributeError, Object, PolygonSet, Scalar, StaticType, StaticTypeName, Style, + Transform3d, UnsignedInteger, Value, ValueNone, ValueType, Vector3, }, ExecutionContext, }; #[derive(Debug, Clone)] -pub struct ManifoldMesh3D(Arc); +pub struct ManifoldMesh3D(pub Arc); impl Eq for ManifoldMesh3D {} impl PartialEq for ManifoldMesh3D { fn eq(&self, other: &Self) -> bool { - // FIXME this is skipping a lot of information. - self.0.ps == other.0.ps + self.0.positions() == other.0.positions() && self.0.halfedges() == other.0.halfedges() } } impl std::hash::Hash for ManifoldMesh3D { fn hash(&self, state: &mut H) { - // FIXME this is skipping a lot of information. - self.0.ps.iter().for_each(|v| { + for v in self.0.positions() { v.x.to_le_bytes().hash(state); v.y.to_le_bytes().hash(state); v.z.to_le_bytes().hash(state); - }); + } + + for half_edge in self.0.halfedges() { + half_edge.hash(state); + } } } @@ -75,7 +80,9 @@ impl Object for ManifoldMesh3D { write!( f, "Manifold Mesh with {} verticies, {} faces, and {} half-edges", - self.0.nv, self.0.nf, self.0.nh + self.0.vertex_count(), + self.0.face_count(), + self.0.halfedge_count() ) } @@ -83,15 +90,37 @@ impl Object for ManifoldMesh3D { let input = Self::unpack_arithmetic_input(context, 0.0, rhs)?; match input { ArethmeticInput::Vector(vector) => { - let vector = vector.raw_value(); + let raw_vector = vector.raw_value(); + + let new_manifold = context.store.get_or_init_object( + context, + &(&self, &vector), + "manifold-translate", + || { + self.0 + .translate(raw_vector.x, raw_vector.y, raw_vector.z) + .map_err(|error| error.to_error(context)) + }, + )?; let manifold = Arc::make_mut(&mut self.0); - manifold.translate(vector.x, vector.y, vector.z); + *manifold = new_manifold; + Ok(self.into()) } ArethmeticInput::Manifold(rhs) => { - let manifold = compute_boolean(&self.0, &rhs.0, OpType::Add) - .map_err(|error| error.to_error(context))?; - Ok(Self(Arc::new(manifold)).into()) + let new_manifold = context.store.get_or_init_object( + context, + &(&self, &rhs), + "manifold-or", + || { + compute_boolean(&self.0, &rhs.0, OpType::Add) + .map_err(|error| error.to_error(context)) + }, + )?; + let manifold = Arc::make_mut(&mut self.0); + *manifold = new_manifold; + + Ok(self.into()) } } } @@ -100,50 +129,102 @@ impl Object for ManifoldMesh3D { let input = Self::unpack_arithmetic_input(context, 0.0, rhs)?; match input { ArethmeticInput::Vector(vector) => { - let vector = vector.raw_value(); + let raw_vector = vector.raw_value(); + + let neg_vector = Vector3::new_raw(context, Dimension::length(), -raw_vector)?; + + let new_manifold = context.store.get_or_init_object( + context, + &(&self, &(neg_vector)), + "manifold-translate", + || { + self.0 + .translate(-raw_vector.x, -raw_vector.y, -raw_vector.z) + .map_err(|error| error.to_error(context)) + }, + )?; let manifold = Arc::make_mut(&mut self.0); - manifold.translate(-vector.x, -vector.y, -vector.z); + *manifold = new_manifold; + Ok(self.into()) } ArethmeticInput::Manifold(rhs) => { - let manifold = compute_boolean(&self.0, &rhs.0, OpType::Subtract) - .map_err(|error| error.to_error(context))?; - Ok(Self(Arc::new(manifold)).into()) + let new_manifold = context.store.get_or_init_object( + context, + &(&self, &rhs), + "manifold-subtract", + || { + compute_boolean(&self.0, &rhs.0, OpType::Subtract) + .map_err(|error| error.to_error(context)) + }, + )?; + let manifold = Arc::make_mut(&mut self.0); + *manifold = new_manifold; + + Ok(self.into()) } } } fn multiply(mut self, context: &ExecutionContext, rhs: Value) -> ExecutionResult { let input = rhs.downcast::(context)?; + let input = input.0; let vector = input.raw_value(); + let new_manifold = context.store.get_or_init_object( + context, + &(&self, &input), + "manifold-scale", + || { + self.0 + .scale(vector.x, vector.y, vector.z) + .map_err(|error| error.to_error(context)) + }, + )?; let manifold = Arc::make_mut(&mut self.0); - manifold.scale(vector.x, vector.y, vector.z); + *manifold = new_manifold; + Ok(self.into()) } - fn bit_or(self, context: &ExecutionContext, rhs: Value) -> ExecutionResult { + fn bit_or(mut self, context: &ExecutionContext, rhs: Value) -> ExecutionResult { let rhs: &Self = rhs.downcast_for_binary_op_ref(context)?; - let manifold = compute_boolean(&self.0, &rhs.0, OpType::Add) - .map_err(|error| error.to_error(context))?; - Ok(Self(Arc::new(manifold)).into()) + let new_manifold = + context + .store + .get_or_init_object(context, &(&self, rhs), "manifold-or", || { + compute_boolean(&self.0, &rhs.0, OpType::Add) + .map_err(|error| error.to_error(context)) + })?; + let manifold = Arc::make_mut(&mut self.0); + *manifold = new_manifold; + + Ok(self.into()) } - fn bit_xor(self, context: &ExecutionContext, rhs: Value) -> ExecutionResult { + fn bit_xor(mut self, context: &ExecutionContext, rhs: Value) -> ExecutionResult { let rhs: &Self = rhs.downcast_for_binary_op_ref(context)?; + let new_manifold = + context + .store + .get_or_init_object(context, &(&self, rhs), "manifold-xor", || { + // To compute xor, get the intersectiona and then subtract it from the union of the two + // shapes. - // To compute xor, get the intersectiona and then subtract it from the union of the two - // shapes. + let intersection = compute_boolean(&self.0, &rhs.0, OpType::Intersect) + .map_err(|error| error.to_error(context))?; - let intersection = compute_boolean(&self.0, &rhs.0, OpType::Intersect) - .map_err(|error| error.to_error(context))?; + let union = compute_boolean(&self.0, &rhs.0, OpType::Add) + .map_err(|error| error.to_error(context))?; - let union = compute_boolean(&self.0, &rhs.0, OpType::Add) - .map_err(|error| error.to_error(context))?; + let difference = compute_boolean(&union, &intersection, OpType::Subtract) + .map_err(|error| error.to_error(context))?; - let difference = compute_boolean(&union, &intersection, OpType::Subtract) - .map_err(|error| error.to_error(context))?; + Ok(difference) + })?; + let manifold = Arc::make_mut(&mut self.0); + *manifold = new_manifold; - Ok(Self(Arc::new(difference)).into()) + Ok(self.into()) } fn bit_and(self, context: &ExecutionContext, rhs: Value) -> ExecutionResult { @@ -156,6 +237,9 @@ impl Object for ManifoldMesh3D { fn get_attribute(&self, context: &ExecutionContext, attribute: &str) -> ExecutionResult { match attribute { "to_stl" => Ok(BuiltinFunction::new::().into()), + "transform" => Ok(BuiltinFunction::new::().into()), + "project" => Ok(BuiltinFunction::new::().into()), + "slice" => Ok(BuiltinFunction::new::().into()), _ => Err(MissingAttributeError { name: attribute.into(), } @@ -234,6 +318,9 @@ pub mod methods { pub struct GenerateUvSphere; pub struct ToStl; + pub struct Transform; + pub struct Project; + pub struct Slice; } fn unpack_radius( @@ -270,8 +357,12 @@ pub fn register_methods_and_functions(database: &mut BuiltinCallableDatabase) { { let radius = unpack_radius(context, radius, diameter)?; - let manifold = generate_cone(apex.into(), center.into(), radius, divide.0 as usize) - .map_err(|error| error.to_error(context))?; + let manifold = context + .store + .get_or_init_object(context, &(apex.0, center.0, radius.to_le_bytes(), divide), "manifold-cone", || { + generate_cone(apex.into(), center.into(), radius, divide.0 as usize) + .map_err(|error| error.to_error(context)) + })?; Ok(ManifoldMesh3D(Arc::new(manifold))) } ); @@ -282,10 +373,15 @@ pub fn register_methods_and_functions(database: &mut BuiltinCallableDatabase) { size: Length3 ) -> ManifoldMesh3D { let size: Vector3 = size.into(); - let size = size.raw_value(); + let raw_size = size.raw_value(); + + let manifold = context + .store + .get_or_init_object(context, &(&size), "manifold-cube", || { + let manifold = generate_cube().map_err(|error| error.to_error(context))?; + manifold.scale(raw_size.x, raw_size.y, raw_size.z).map_err(|error| error.to_error(context)) + })?; - let mut manifold = generate_cube().map_err(|error| error.to_error(context))?; - manifold.scale(size.x, size.y, size.z); Ok(ManifoldMesh3D(Arc::new(manifold))) } @@ -302,8 +398,13 @@ pub fn register_methods_and_functions(database: &mut BuiltinCallableDatabase) { ) -> ManifoldMesh3D { let radius = unpack_radius(context, radius, diameter)?; - let manifold = generate_cylinder(radius, height.into(), sectors.0 as usize, stacks.0 as usize) - .map_err(|error| error.to_error(context))?; + let manifold = context + .store + .get_or_init_object(context, &(radius.to_le_bytes(), height.value.to_le_bytes(), sectors.0, stacks.0), "manifold-cylinder", || { + generate_cylinder(radius, height.into(), sectors.0 as usize, stacks.0 as usize) + .map_err(|error| error.to_error(context)) + })?; + Ok(ManifoldMesh3D(Arc::new(manifold))) } ); @@ -317,9 +418,13 @@ pub fn register_methods_and_functions(database: &mut BuiltinCallableDatabase) { ) -> ManifoldMesh3D { let scale = unpack_radius(context, radius, diameter)?; - let mut manifold = generate_icosphere(subdivions.0 as u32) - .map_err(|error| error.to_error(context))?; - manifold.scale(scale, scale, scale); + let manifold = context + .store + .get_or_init_object(context, &(scale.to_le_bytes(), subdivions.0), "manifold-icosphere", || { + let manifold = generate_icosphere(subdivions.0 as u32) + .map_err(|error| error.to_error(context))?; + manifold.scale(scale, scale, scale).map_err(|error| error.to_error(context)) + })?; Ok(ManifoldMesh3D(Arc::new(manifold))) } @@ -329,12 +434,17 @@ pub fn register_methods_and_functions(database: &mut BuiltinCallableDatabase) { methods::GenerateTorus, "ManifoldMesh3D::torus", ( context: &ExecutionContext, major_radius: Length, - minor_raidus: Length, + minor_radius: Length, rings: UnsignedInteger, sectors: UnsignedInteger ) -> ManifoldMesh3D { - let manifold = generate_torus(major_radius.into(), minor_raidus.into(), rings.0 as usize, sectors.0 as usize) - .map_err(|error| error.to_error(context))?; + let manifold = context + .store + .get_or_init_object(context, &(major_radius.value.to_le_bytes(), minor_radius.value.to_le_bytes(), rings.0, sectors.0), "manifold-torus", || { + generate_torus(major_radius.into(), minor_radius.into(), rings.0 as usize, sectors.0 as usize) + .map_err(|error| error.to_error(context)) + })?; + Ok(ManifoldMesh3D(Arc::new(manifold))) } ); @@ -349,9 +459,13 @@ pub fn register_methods_and_functions(database: &mut BuiltinCallableDatabase) { ) -> ManifoldMesh3D { let scale = unpack_radius(context, radius, diameter)?; - let mut manifold = generate_uv_sphere(sectors.0 as usize, stacks.0 as usize) - .map_err(|error| error.to_error(context))?; - manifold.scale(scale, scale, scale); + let manifold = context + .store + .get_or_init_object(context, &(sectors.0, stacks.0, scale.to_le_bytes()), "manifold-torus", || { + let manifold = generate_uv_sphere(sectors.0 as usize, stacks.0 as usize) + .map_err(|error| error.to_error(context))?; + manifold.scale(scale, scale, scale).map_err(|error| error.to_error(context)) + })?; Ok(ManifoldMesh3D(Arc::new(manifold))) } @@ -363,7 +477,7 @@ pub fn register_methods_and_functions(database: &mut BuiltinCallableDatabase) { context: &ExecutionContext, this: ManifoldMesh3D, name: IString, - scale: Length = Scalar { + units: Length = Scalar { dimension: Dimension::length(), value: Float::new(1.0/1000.0).expect("Default stl scale was NaN") }.into(), @@ -376,18 +490,16 @@ pub fn register_methods_and_functions(database: &mut BuiltinCallableDatabase) { use stl_io::{Triangle, Vertex, write_stl}; - for (normal, halfedge) in this.0.face_normals.iter().zip(this.0.hs.chunks(3)) { - let p0 = this.0.ps[halfedge[0].tail]; - let p1 = this.0.ps[halfedge[1].tail]; - let p2 = this.0.ps[halfedge[2].tail]; + for tri in this.0.triangles() { + let [p0, p1, p2] = tri.positions; - let scale = 1.0 / *scale.value; + let multiplier = 1.0 / *units.value; let triangle = Triangle { - normal: Vertex::new([(normal.x * scale) as f32, (normal.y * scale) as f32, (normal.z * scale) as f32]), - vertices: [Vertex::new([(p0.x * scale) as f32, (p0.y * scale) as f32, (p0.z * scale) as f32]), - Vertex::new([(p1.x * scale) as f32, (p1.y * scale) as f32, (p1.z * scale) as f32]), - Vertex::new([(p2.x * scale) as f32, (p2.y * scale) as f32, (p2.z * scale) as f32])] + normal: Vertex::new([(tri.normal.x * multiplier) as f32, (tri.normal.y * multiplier) as f32, (tri.normal.z * multiplier) as f32]), + vertices: [Vertex::new([(p0.x * multiplier) as f32, (p0.y * multiplier) as f32, (p0.z * multiplier) as f32]), + Vertex::new([(p1.x * multiplier) as f32, (p1.y * multiplier) as f32, (p1.z * multiplier) as f32]), + Vertex::new([(p2.x * multiplier) as f32, (p2.y * multiplier) as f32, (p2.z * multiplier) as f32])] }; mesh.push(triangle); @@ -398,7 +510,7 @@ pub fn register_methods_and_functions(database: &mut BuiltinCallableDatabase) { let mut serialized = Vec::new(); write_stl(&mut serialized, mesh.iter()).map_err(|_| StrError("Failed to serialize STL file").to_error(context))?; - let path = context.store.get_or_init_file(context, &(&this, &scale, "ascii"), format!("{}.stl", name.0), |file| { + let path = context.store.get_or_init_file(context, &(&this, &units, "ascii"), format!("{}.stl", name.0), |file| { file.write_all(&serialized).map_err(|error| error.to_error(context))?; Ok(()) @@ -406,27 +518,25 @@ pub fn register_methods_and_functions(database: &mut BuiltinCallableDatabase) { Ok(File { path: Arc::new(path) }) } else { - let path = context.store.get_or_init_file(context, &(&this, &scale, "binary"), format!("{}.stl", name.0), |file| { + let path = context.store.get_or_init_file(context, &(&this, &units, "binary"), format!("{}.stl", name.0), |file| { let mut file = BufWriter::new(file); - let scale = *Float::new(1.0 / *scale.value).unwrap_not_nan(context)?; + let multiplier = *Float::new(1.0 / *units.value).unwrap_not_nan(context)?; let mut trampoline = || -> std::io::Result<()> { writeln!(file, "solid {}", name.0)?; - for (normal, halfedge) in this.0.face_normals.iter().zip(this.0.hs.chunks(3)) { - let p0 = this.0.ps[halfedge[0].tail]; - let p1 = this.0.ps[halfedge[1].tail]; - let p2 = this.0.ps[halfedge[2].tail]; + for tri in this.0.triangles() { + let [p0, p1, p2] = tri.positions; - writeln!(file, "\tfacet normal {} {} {}", normal.x, normal.y, normal.z)?; + writeln!(file, "\tfacet normal {} {} {}", tri.normal.x, tri.normal.y, tri.normal.z)?; { writeln!(file, "\t\touter loop")?; { - writeln!(file, "\t\t\tvertex {} {} {}", p0.x * scale, p0.y * scale, p0.z * scale)?; - writeln!(file, "\t\t\tvertex {} {} {}", p1.x * scale, p1.y * scale, p1.z * scale)?; - writeln!(file, "\t\t\tvertex {} {} {}", p2.x * scale, p2.y * scale, p2.z * scale)?; + writeln!(file, "\t\t\tvertex {} {} {}", p0.x * multiplier, p0.y * multiplier, p0.z * multiplier)?; + writeln!(file, "\t\t\tvertex {} {} {}", p1.x * multiplier, p1.y * multiplier, p1.z * multiplier)?; + writeln!(file, "\t\t\tvertex {} {} {}", p2.x * multiplier, p2.y * multiplier, p2.z * multiplier)?; } writeln!(file, "\t\tendloop")?; @@ -450,4 +560,75 @@ pub fn register_methods_and_functions(database: &mut BuiltinCallableDatabase) { }) } ); + build_method!( + database, + methods::Transform, "ManifoldMesh3D::transform", ( + context: &ExecutionContext, + this: ManifoldMesh3D, + t: Transform3d) -> ManifoldMesh3D + { + let mut this = this; + let manifold = Arc::make_mut(&mut this.0).transform(t.0).map_err(|error| error.to_error(context))?; + + Ok(ManifoldMesh3D(Arc::new(manifold))) + } + ); + build_method!( + database, + methods::Project, "ManifoldMesh3D::project", ( + context: &ExecutionContext, + this: ManifoldMesh3D) -> PolygonSet + { + let polygon_set = this.0.project_xy().map_err(|error| error.to_error(context))?; + + Ok(PolygonSet(Arc::new(polygon_set))) + } + ); + build_method!( + database, + methods::Slice, "ManifoldMesh3D::slice", ( + context: &ExecutionContext, + this: ManifoldMesh3D, + height: Length) -> PolygonSet + { + let polygon_set = this.0.slice(*height.value).map_err(|error| error.to_error(context))?; + + Ok(PolygonSet(Arc::new(polygon_set))) + } + ); +} + +#[cfg(test)] +mod test { + use crate::execution::test_run; + + #[test] + fn project_extruded() { + // Used to panic. + test_run("std.polygon.box(size = {1m, 1m})::extrude(height = 1m)::project()").unwrap(); + // test_run("std.mesh.cube(size = {1m, 1m, 1m})::project()").unwrap(); + } + + #[test] + fn project_revolved() { + // Used to panic. + test_run( + "(std.polygon.box(size = {1m, 1m}) + {0.5m, 0m})::revolve(divisions = 3u)::project()", + ) + .unwrap(); + } + + #[test] + fn extrude_determinism() { + // Run 10 extrusions and verify they all produce identical results. + let manifolds: Vec<_> = (0..10) + .map(|_| test_run("std.polygon.box(size = {1m, 1m})::extrude(height = 1m)").unwrap()) + .collect(); + + let first = manifolds[0].as_manifoldmesh3d().unwrap(); + for m in &manifolds[1..] { + let mm = m.as_manifoldmesh3d().unwrap(); + assert_eq!(first, mm); + } + } } diff --git a/interpreter/src/execution/values/mod.rs b/interpreter/src/execution/values/mod.rs index 7aacd16..70c6624 100644 --- a/interpreter/src/execution/values/mod.rs +++ b/interpreter/src/execution/values/mod.rs @@ -38,19 +38,19 @@ pub use boolean::Boolean; pub mod integer; pub use integer::{SignedInteger, UnsignedInteger}; -mod scalar; -pub use scalar::Scalar; +pub mod scalar; +pub use scalar::{Length, Scalar, UnwrapNotNan}; mod vector; pub use vector::{Vector2, Vector3, Vector4}; pub mod closure; -pub use closure::{BuiltinCallableDatabase, BuiltinFunction, UserClosure}; +pub use closure::{BuiltinCallableDatabase, BuiltinFunction, MessageClosure, UserClosure}; pub mod dictionary; pub use dictionary::Dictionary; -mod list; +pub mod list; pub use list::List; mod string; @@ -65,6 +65,12 @@ pub use constraint_set::ConstraintSet; mod iterators; pub mod manifold_mesh; +mod transform; +pub use transform::{Transform2d, Transform3d}; + +pub mod polygon; +pub use polygon::{LineString, Polygon, PolygonSet}; + mod value_type; pub use value_type::{StructDefinition, StructMember, ValueType}; @@ -157,7 +163,7 @@ impl UnsupportedOperationError { } #[derive(Debug, Eq, PartialEq)] -struct MissingAttributeError { +pub struct MissingAttributeError { pub name: String, } @@ -292,7 +298,11 @@ pub enum Value { ConstraintSet, ManifoldMesh3D, ValueIterator, - // Quaternion, + Transform2d, + Transform3d, + LineString, + Polygon, + PolygonSet, } impl StaticTypeName for Value { @@ -307,6 +317,19 @@ impl StaticType for Value { } } +impl From> for Value +where + T: Into, +{ + fn from(value: Option) -> Self { + if let Some(value) = value { + value.into() + } else { + ValueNone.into() + } + } +} + #[derive(Debug, Eq, PartialEq)] pub struct DowncastError { pub expected: Cow<'static, str>, diff --git a/interpreter/src/execution/values/polygon.rs b/interpreter/src/execution/values/polygon.rs new file mode 100644 index 0000000..739d302 --- /dev/null +++ b/interpreter/src/execution/values/polygon.rs @@ -0,0 +1,1743 @@ +/* + * Copyright 2026 James Carl + * AGPL-3.0-only or AGPL-3.0-or-later + * + * This file is part of Command Cad. + * + * Command CAD is free software: you can redistribute it and/or modify it under the terms of + * the GNU Affero General Public License as published by the Free Software Foundation, either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License along with this + * program. If not, see . + */ + +use std::sync::Arc; + +use common_data_types::{Dimension, RawFloat}; +use geo::{BooleanOps, OpType}; +use nalgebra::{Matrix3, Translation2}; + +use crate::{ + execution::errors::Raise, + values::{ + iterators::IterableObject, BuiltinCallableDatabase, BuiltinFunction, DowncastError, + MissingAttributeError, Object, StaticType, StaticTypeName, Style, Value, ValueType, + Vector2, + }, + ExecutionContext, ExecutionResult, +}; + +// Ray-cast with linestrings and polygons +// to_svg +// from_svg? +// text? +// polygons from fonts +// projection - should probably live in manifold +// slice - should probably live in manifold +// bounding rec - manifold should also have one + +fn boolean_op_with( + context: &ExecutionContext, + left: &impl BooleanOps, + right: Value, + expected: Option<&'static str>, + op: OpType, +) -> ExecutionResult { + match right { + Value::Polygon(right) => Ok(PolygonSet(Arc::new(left.boolean_op(&*right.0, op))).into()), + Value::PolygonSet(right) => Ok(PolygonSet(Arc::new(left.boolean_op(&*right.0, op))).into()), + value => Err(DowncastError { + expected: expected.unwrap_or("Polygon or PolygonSet").into(), + got: value.get_type(context).name(), + } + .to_error(context)), + } +} + +/// Applies a transformation to an object. +trait ApplyTransform { + fn apply_transform(&mut self, transform: &Matrix3); + + fn translate(&mut self, offset: nalgebra::Vector2) { + let translation = Translation2::from(offset); + let matrix = translation.to_homogeneous(); + self.apply_transform(&matrix); + } +} + +#[derive(Debug, Clone)] +pub struct LineString(pub Arc); + +impl Object for LineString { + fn get_type(&self, _context: &ExecutionContext) -> ValueType { + ValueType::LineString + } + + fn format( + &self, + _context: &ExecutionContext, + f: &mut dyn std::fmt::Write, + _style: Style, + _precision: Option, + ) -> std::fmt::Result { + // TODO Lazy way to do this, should come back and make this more proper. + write!(f, "{:?}", self.0) + } + + fn addition(mut self, context: &ExecutionContext, rhs: Value) -> ExecutionResult { + let offset: Vector2 = rhs.downcast(context)?; + + let polygon = Arc::make_mut(&mut self.0); + polygon.translate(offset.raw_value()); + Ok(self.into()) + } + + fn subtraction(mut self, context: &ExecutionContext, rhs: Value) -> ExecutionResult { + let offset: Vector2 = rhs.downcast(context)?; + + let polygon = Arc::make_mut(&mut self.0); + polygon.translate(-offset.raw_value()); + Ok(self.into()) + } + + fn get_attribute( + &self, + context: &ExecutionContext, + attribute: &str, + ) -> crate::ExecutionResult { + match attribute { + "append" => { + Ok(BuiltinFunction::new::().into()) + } + "add_point" => { + Ok(BuiltinFunction::new::().into()) + } + "is_closed" => { + Ok(BuiltinFunction::new::().into()) + } + "close" => { + Ok(BuiltinFunction::new::().into()) + } + "open" => Ok(BuiltinFunction::new::().into()), + "iter_points" => { + Ok(BuiltinFunction::new::().into()) + } + "rev_iter_points" => Ok(BuiltinFunction::new::< + methods_and_functions::line_string::RevIterPoints, + >() + .into()), + "num_points" => { + Ok(BuiltinFunction::new::().into()) + } + "length" => Ok( + BuiltinFunction::new::().into(), + ), + "bounding_box" => Ok(BuiltinFunction::new::< + methods_and_functions::line_string::BoundingBox, + >() + .into()), + "centroid" => { + Ok(BuiltinFunction::new::().into()) + } + "transform" => { + Ok(BuiltinFunction::new::().into()) + } + _ => Err(MissingAttributeError { + name: attribute.into(), + } + .to_error(context)), + } + } +} + +impl std::cmp::Eq for LineString {} + +impl std::cmp::PartialEq for LineString { + fn eq(&self, other: &Self) -> bool { + self.0 == other.0 + } +} + +impl StaticTypeName for LineString { + fn static_type_name() -> std::borrow::Cow<'static, str> { + "LineString".into() + } +} + +impl StaticType for LineString { + fn static_type() -> ValueType { + ValueType::LineString + } +} + +impl ApplyTransform for geo::LineString { + fn apply_transform(&mut self, transform: &Matrix3) { + for point in self.coords_mut() { + let new_point = transform.transform_point(&nalgebra::Point { + coords: nalgebra::Vector2::new(point.x, point.y), + }); + + *point = geo::Coord { + x: new_point.x, + y: new_point.y, + }; + } + } +} + +#[derive(Debug, Eq, PartialEq, Clone)] +pub struct LineStringIterator { + line_string: LineString, +} + +impl IterableObject for LineStringIterator { + fn iterate( + &self, + context: &ExecutionContext, + callback: impl FnOnce(&mut dyn Iterator>) -> ExecutionResult, + ) -> ExecutionResult { + let mut iter = self.line_string.0.coords().map(|point| { + Vector2::new(context, Dimension::length(), [point.x, point.y]) + .map(|vector| vector.into()) + }); + callback(&mut iter) + } +} + +#[derive(Debug, Eq, PartialEq, Clone)] +pub struct RevLineStringIterator { + line_string: LineString, +} + +impl IterableObject for RevLineStringIterator { + fn iterate( + &self, + context: &ExecutionContext, + callback: impl FnOnce(&mut dyn Iterator>) -> ExecutionResult, + ) -> ExecutionResult { + let mut iter = self.line_string.0.coords().rev().map(|point| { + Vector2::new(context, Dimension::length(), [point.x, point.y]) + .map(|vector| vector.into()) + }); + callback(&mut iter) + } +} + +#[derive(Debug, Clone)] +pub struct Polygon(pub Arc); + +impl Object for Polygon { + fn get_type(&self, _context: &ExecutionContext) -> ValueType { + ValueType::Polygon + } + + fn format( + &self, + _context: &ExecutionContext, + f: &mut dyn std::fmt::Write, + _style: Style, + _precision: Option, + ) -> std::fmt::Result { + // TODO Lazy way to do this, should come back and make this more proper. + write!(f, "{:?}", self.0) + } + + fn addition(mut self, context: &ExecutionContext, rhs: Value) -> ExecutionResult { + match rhs { + Value::Vector2(offset) => { + let polygon = Arc::make_mut(&mut self.0); + polygon.translate(offset.raw_value()); + Ok(self.into()) + } + rhs => boolean_op_with( + context, + &*self.0, + rhs, + Some("Polygon, PolygonSet, or Vector2"), + OpType::Union, + ), + } + } + + fn subtraction(mut self, context: &ExecutionContext, rhs: Value) -> ExecutionResult { + match rhs { + Value::Vector2(offset) => { + let polygon = Arc::make_mut(&mut self.0); + polygon.translate(-offset.raw_value()); + Ok(self.into()) + } + rhs => boolean_op_with( + context, + &*self.0, + rhs, + Some("Polygon, PolygonSet, or Vector2"), + OpType::Difference, + ), + } + } + + fn bit_and(self, context: &ExecutionContext, rhs: Value) -> ExecutionResult { + boolean_op_with(context, &*self.0, rhs, None, OpType::Intersection) + } + + fn bit_or(self, context: &ExecutionContext, rhs: Value) -> ExecutionResult { + boolean_op_with(context, &*self.0, rhs, None, OpType::Union) + } + + fn bit_xor(self, context: &ExecutionContext, rhs: Value) -> ExecutionResult { + boolean_op_with(context, &*self.0, rhs, None, OpType::Xor) + } + + fn get_attribute( + &self, + context: &ExecutionContext, + attribute: &str, + ) -> crate::ExecutionResult { + match attribute { + "exterior" => { + Ok(BuiltinFunction::new::().into()) + } + "interiors" => { + Ok(BuiltinFunction::new::().into()) + } + "num_interiors" => { + Ok(BuiltinFunction::new::().into()) + } + "is_convex" => { + Ok(BuiltinFunction::new::().into()) + } + "area" => Ok(BuiltinFunction::new::().into()), + "bounding_box" => { + Ok(BuiltinFunction::new::().into()) + } + "centroid" => { + Ok(BuiltinFunction::new::().into()) + } + "transform" => { + Ok(BuiltinFunction::new::().into()) + } + "into_set" => { + Ok(BuiltinFunction::new::().into()) + } + "extrude" => { + Ok(BuiltinFunction::new::().into()) + } + "revolve" => { + Ok(BuiltinFunction::new::().into()) + } + _ => Err(MissingAttributeError { + name: attribute.into(), + } + .to_error(context)), + } + } +} + +impl std::cmp::Eq for Polygon {} + +impl std::cmp::PartialEq for Polygon { + fn eq(&self, other: &Self) -> bool { + self.0 == other.0 + } +} + +impl StaticTypeName for Polygon { + fn static_type_name() -> std::borrow::Cow<'static, str> { + "Polygon".into() + } +} + +impl StaticType for Polygon { + fn static_type() -> ValueType { + ValueType::Polygon + } +} + +impl ApplyTransform for geo::Polygon { + fn apply_transform(&mut self, transform: &Matrix3) { + self.exterior_mut(|exterior| exterior.apply_transform(transform)); + + self.interiors_mut(|interiors| { + for interior in interiors { + interior.apply_transform(transform); + } + }); + } +} + +#[derive(Debug, Clone)] +pub struct PolygonSet(pub Arc); + +impl Object for PolygonSet { + fn get_type(&self, _context: &ExecutionContext) -> ValueType { + ValueType::PolygonSet + } + + fn format( + &self, + _context: &ExecutionContext, + f: &mut dyn std::fmt::Write, + _style: Style, + _precision: Option, + ) -> std::fmt::Result { + // TODO Lazy way to do this, should come back and make this more proper. + write!(f, "{:?}", self.0) + } + + fn addition(mut self, context: &ExecutionContext, rhs: Value) -> ExecutionResult { + match rhs { + Value::Vector2(offset) => { + let polygon = Arc::make_mut(&mut self.0); + polygon.translate(offset.raw_value()); + Ok(self.into()) + } + rhs => boolean_op_with( + context, + &*self.0, + rhs, + Some("Polygon, PolygonSet, or Vector2"), + OpType::Union, + ), + } + } + + fn subtraction(mut self, context: &ExecutionContext, rhs: Value) -> ExecutionResult { + match rhs { + Value::Vector2(offset) => { + let polygon = Arc::make_mut(&mut self.0); + polygon.translate(-offset.raw_value()); + Ok(self.into()) + } + rhs => boolean_op_with( + context, + &*self.0, + rhs, + Some("Polygon, PolygonSet, or Vector2"), + OpType::Difference, + ), + } + } + + fn bit_and(self, context: &ExecutionContext, rhs: Value) -> ExecutionResult { + boolean_op_with(context, &*self.0, rhs, None, OpType::Intersection) + } + + fn bit_or(self, context: &ExecutionContext, rhs: Value) -> ExecutionResult { + boolean_op_with(context, &*self.0, rhs, None, OpType::Union) + } + + fn bit_xor(self, context: &ExecutionContext, rhs: Value) -> ExecutionResult { + boolean_op_with(context, &*self.0, rhs, None, OpType::Xor) + } + + fn get_attribute( + &self, + context: &ExecutionContext, + attribute: &str, + ) -> crate::ExecutionResult { + match attribute { + "iter_polys" => { + Ok(BuiltinFunction::new::().into()) + } + "num_poly" => { + Ok(BuiltinFunction::new::().into()) + } + "area" => Ok(BuiltinFunction::new::().into()), + "bounding_box" => Ok(BuiltinFunction::new::< + methods_and_functions::polygon_set::BoundingBox, + >() + .into()), + "centroid" => { + Ok(BuiltinFunction::new::().into()) + } + "transform" => { + Ok(BuiltinFunction::new::().into()) + } + "extrude" => { + Ok(BuiltinFunction::new::().into()) + } + "revolve" => { + Ok(BuiltinFunction::new::().into()) + } + _ => Err(MissingAttributeError { + name: attribute.into(), + } + .to_error(context)), + } + } +} + +impl ApplyTransform for geo::MultiPolygon { + fn apply_transform(&mut self, transform: &Matrix3) { + for polygon in self.0.iter_mut() { + polygon.apply_transform(transform); + } + } +} + +#[derive(Debug, Eq, PartialEq, Clone)] +pub struct InteriorIterator { + polygon: Polygon, +} + +impl IterableObject for InteriorIterator { + fn iterate( + &self, + _context: &ExecutionContext, + callback: impl FnOnce(&mut dyn Iterator>) -> ExecutionResult, + ) -> ExecutionResult { + let mut iter = self + .polygon + .0 + .interiors() + .iter() + .map(|string| LineString(Arc::new(string.clone())).into()) + .map(Ok); + callback(&mut iter) + } +} + +impl std::cmp::Eq for PolygonSet {} + +impl std::cmp::PartialEq for PolygonSet { + fn eq(&self, other: &Self) -> bool { + self.0 == other.0 + } +} + +impl StaticTypeName for PolygonSet { + fn static_type_name() -> std::borrow::Cow<'static, str> { + "PolygonSet".into() + } +} + +impl StaticType for PolygonSet { + fn static_type() -> ValueType { + ValueType::PolygonSet + } +} + +#[derive(Debug, Eq, PartialEq, Clone)] +pub struct PolygonSetIterator { + polygon_set: PolygonSet, +} + +impl IterableObject for PolygonSetIterator { + fn iterate( + &self, + _context: &ExecutionContext, + callback: impl FnOnce(&mut dyn Iterator>) -> ExecutionResult, + ) -> ExecutionResult { + let mut iter = self + .polygon_set + .0 + .iter() + .map(|polygon| Polygon(Arc::new(polygon.clone())).into()) + .map(Ok); + callback(&mut iter) + } +} + +pub mod methods_and_functions { + use boolmesh::prelude::ExtrudePoly; + use common_data_types::{Dimension, Float, RawFloat}; + use geo::{Area, BoundingRect, Centroid, Point, Rect}; + + use super::{InteriorIterator, LineString, Polygon, PolygonSet}; + use crate::execution::errors::Raise as _; + use crate::values::manifold_mesh::ManifoldMesh3D; + use crate::values::scalar::{Angle, Length, UnwrapNotNan}; + use crate::values::Value; + use crate::ExecutionResult; + use crate::{build_function, build_method, values::BuiltinCallableDatabase}; + use crate::{ + values::{ + iterators::ValueIterator, + scalar::Scalar, + vector::{Length2, Vector2}, + Boolean, Dictionary, List, Transform2d, UnsignedInteger, + }, + ExecutionContext, + }; + use std::{collections::HashMap, sync::Arc}; + + fn bounding_box(context: &ExecutionContext, bound: &B) -> ExecutionResult> + where + B: BoundingRect>>, + { + if let Some(rect) = bound.bounding_rect() { + let min = rect.min(); + let max = rect.max(); + + let rectangle: HashMap = + HashMap::from_iter([ + ( + crate::execution::values::dictionary::ArgumentName::Named("min".into()), + Vector2::new(context, Dimension::length(), [min.x, min.y])?.into(), + ), + ( + crate::execution::values::dictionary::ArgumentName::Named("max".into()), + Vector2::new(context, Dimension::length(), [max.x, max.y])?.into(), + ), + ]); + + Ok(Some(Dictionary::new(context, rectangle))) + } else { + Ok(None) + } + } + + fn centroid(context: &ExecutionContext, centroid: &C) -> ExecutionResult> + where + C: Centroid>>, + { + if let Some(centroid) = centroid.centroid() { + Ok(Some(Vector2::new( + context, + Dimension::length(), + [centroid.x(), centroid.y()], + )?)) + } else { + Ok(None) + } + } + + fn area(context: &ExecutionContext, area: &A) -> ExecutionResult + where + A: Area, + { + let area = area.unsigned_area(); + Ok(Scalar { + dimension: Dimension::area(), + value: Float::new(area).unwrap_not_nan(context)?, + }) + } + + fn extrude( + context: &ExecutionContext, + to_extrude: &E, + height: Length, + divisions: UnsignedInteger, + twist_radians: Angle, + scale_top: Length2, + ) -> ExecutionResult + where + E: ExtrudePoly, + { + let manifold = to_extrude + .extrude( + *height.value, + divisions.0 as usize, + *twist_radians.value, + scale_top.raw_value(), + ) + .map_err(|error| error.to_error(context))?; + + Ok(ManifoldMesh3D(Arc::new(manifold))) + } + + fn revolve( + context: &ExecutionContext, + to_revolve: &E, + divisions: UnsignedInteger, + angle: Angle, + ) -> ExecutionResult + where + E: ExtrudePoly, + { + let manifold = to_revolve + .revolve(divisions.0 as usize, *angle.value) + .map_err(|error| error.to_error(context))?; + + Ok(ManifoldMesh3D(Arc::new(manifold))) + } + + pub mod line_string { + + use common_data_types::{Dimension, Float}; + use geo::{Distance as _, Euclidean}; + + use crate::values::polygon::ApplyTransform; + + use super::super::{LineStringIterator, RevLineStringIterator}; + use super::*; + + pub struct FromPoints; + pub struct Append; + pub struct AddPoint; + pub struct IsClosed; + pub struct Close; + pub struct Open; + pub struct IterPoints; + pub struct RevIterPoints; + pub struct NumPoints; + pub struct StringLength; + pub struct BoundingBox; + pub struct Centroid; + pub struct Transform; + + pub fn register_methods_and_functions(database: &mut BuiltinCallableDatabase) { + build_function!( + database, + FromPoints, "LineString::from_points", ( + context: &ExecutionContext, + points: List) -> LineString + { + let mut collected = Vec::with_capacity(points.len()); + for value in points { + let point: Length2 = value.downcast(context)?; + let point: Vector2 = point.into(); + collected.push(geo::Coord { x: point.raw_value().x, y: point.raw_value().y }); + } + + Ok(LineString(Arc::new(geo::LineString(collected)))) + } + ); + build_method!( + database, + Append, "LineString::append", ( + context: &ExecutionContext, + this: LineString, + other: LineString) -> LineString + { + let mut this = this; + let line_string = Arc::make_mut(&mut this.0); + for point in other.0.coords() { + line_string.0.push(*point); + } + + Ok(this) + } + ); + build_method!( + database, + AddPoint, "LineString::add_point", ( + context: &ExecutionContext, + this: LineString, + p: Length2) -> LineString + { + let mut this = this; + let line_string = Arc::make_mut(&mut this.0); + + let point: Vector2 = p.into(); + line_string.0.push(geo::Coord { x: point.raw_value().x, y: point.raw_value().y }); + + Ok(this) + } + ); + build_method!( + database, + IsClosed, "LineString::is_closed", ( + context: &ExecutionContext, + this: LineString) -> Boolean + { + Ok(Boolean(this.0.is_closed())) + } + ); + build_method!( + database, + Close, "LineString::close", ( + context: &ExecutionContext, + this: LineString) -> LineString + { + if this.0.is_closed() { + Ok(this) + } else { + let mut this = this; + let line_string = Arc::make_mut(&mut this.0); + line_string.close(); + + Ok(this) + } + } + ); + build_method!( + database, + Open, "LineString::open", ( + context: &ExecutionContext, + this: LineString) -> LineString + { + if this.0.is_closed() { + let mut this = this; + let line_string = Arc::make_mut(&mut this.0); + line_string.0.pop(); + + Ok(this) + } else { + Ok(this) + } + } + ); + build_method!( + database, + IterPoints, "LineString::iter_points", ( + context: &ExecutionContext, + this: LineString) -> ValueIterator + { + Ok(ValueIterator::new(LineStringIterator { line_string: this })) + } + ); + build_method!( + database, + RevIterPoints, "LineString::rev_iter_points", ( + context: &ExecutionContext, + this: LineString) -> ValueIterator + { + Ok(ValueIterator::new(RevLineStringIterator { line_string: this })) + } + ); + build_method!( + database, + NumPoints, "LineString::num_points", ( + context: &ExecutionContext, + this: LineString) -> UnsignedInteger + { + Ok(UnsignedInteger::from(this.0.0.len() as u64)) + } + ); + build_method!( + database, + StringLength, "LineString::length", ( + context: &ExecutionContext, + this: LineString) -> Scalar + { + let mut points = this.0.0.iter().peekable(); + + let mut length = 0.0; + while let Some(point) = points.next() { + if let Some(next_point) = points.peek() { + let distance_between_points = Euclidean.distance(*point, **next_point); + length += distance_between_points; + } + } + + Ok(Scalar { + dimension: Dimension::length(), + value: Float::new(length).unwrap_not_nan(context)? + }) + } + ); + build_method!( + database, + BoundingBox, "LineString::bounding_box", ( + context: &ExecutionContext, + this: LineString) -> Option + { + bounding_box(context, &*this.0) + } + ); + build_method!( + database, + Centroid, "LineString::centroid", ( + context: &ExecutionContext, + this: LineString) -> Option + { + centroid(context, &*this.0) + } + ); + build_method!( + database, + Transform, "LineString::transform", ( + context: &ExecutionContext, + this: LineString, + t: Transform2d) -> LineString + { + let mut this = this; + Arc::make_mut(&mut this.0).apply_transform(&t.0); + + Ok(this) + } + ); + } + } + + pub mod polygon { + + use std::f64::consts::PI; + + use geo::IsConvex as _; + use thiserror::Error; + + use crate::{ + execution::errors::{Raise, StrError}, + values::{ + polygon::ApplyTransform as _, + scalar::{Angle, Length}, + ValueNone, + }, + }; + + use super::*; + + pub struct FromPoints; + pub struct FromLineStrings; + pub struct Circle; + pub struct BuildBox; + pub struct BuildBoxFromPoints; + pub struct Exterior; + pub struct Interiors; + pub struct NumInteriors; + pub struct IsConvex; + pub struct Area; + pub struct BoundingBox; + pub struct Centroid; + pub struct Transform; + pub struct IntoSet; + pub struct Extrude; + pub struct Revolve; + + #[derive(Debug, Error)] + enum CircleError { + #[error("Could not derive radius, please provide radius or diameter")] + NoRadius, + + #[error("Both a radius and a diameter were provided, please provide only one")] + AmbigiousRadius, + + #[error("Cannot determine angle between segment points, provide exactly one of the following: angle_between_points, distance_between_points, or number_of_points.")] + AmbigiousSegmentAngle, + } + + #[derive(Debug)] + struct CircleInfo { + radius: RawFloat, + segment_angle: RawFloat, + number_of_points: usize, + } + + impl CircleInfo { + fn new( + context: &ExecutionContext, + radius: Option, + diameter: Option, + angle_between_points: Option, + distance_between_points: Option, + number_of_points: Option, + ) -> ExecutionResult { + const SEGMENT_ANGLE_RADIANS: RawFloat = 2.0; + + let radius = match (radius, diameter) { + (Some(radius), None) => *radius.value, + (None, Some(diameter)) => *diameter.value / 2.0, + (Some(_), Some(_)) => { + return Err(CircleError::AmbigiousRadius.to_error(context)) + } + (None, None) => return Err(CircleError::NoRadius.to_error(context)), + }; + + let segment_angle = match ( + angle_between_points, + distance_between_points, + number_of_points, + ) { + (Some(angle_between_points), None, None) => *angle_between_points.value / PI, + (None, Some(distance_between_points), None) => { + *distance_between_points.value / radius / PI + } + (None, None, Some(number_of_points)) => { + SEGMENT_ANGLE_RADIANS / number_of_points.0 as RawFloat + } + (_, _, _) => return Err(CircleError::AmbigiousSegmentAngle.to_error(context)), + }; + + let number_of_points = if let Some(number_of_points) = number_of_points { + number_of_points.0 as usize + } else { + (SEGMENT_ANGLE_RADIANS / segment_angle) as usize + 1 + }; + + if number_of_points < 2 { + return Err(StrError("Circle must have at least two points").to_error(context)); + } + + Ok(Self { + radius, + segment_angle, + number_of_points, + }) + } + } + + pub fn register_methods_and_functions(database: &mut BuiltinCallableDatabase) { + build_function!( + database, + FromPoints, "Polygon::from_points", ( + context: &ExecutionContext, + points: List) -> Polygon + { + let mut collected = Vec::with_capacity(points.len()); + for value in points { + let point: Length2 = value.downcast(context)?; + let point: Vector2 = point.into(); + collected.push(geo::Coord { x: point.raw_value().x, y: point.raw_value().y }); + } + + let external = geo::LineString(collected); + Ok(Polygon(Arc::new(geo::Polygon::new(external, vec![])))) + } + ); + build_function!( + database, + FromLineStrings, "Polygon::from_line_strings", ( + context: &ExecutionContext, + exterior: LineString, + interiors: List = List::default().into()) -> Polygon + { + let mut collected = Vec::with_capacity(interiors.len()); + for value in interiors { + let string: LineString = value.downcast(context)?; + collected.push((*string.0).clone()); + } + + let exterior = Arc::unwrap_or_clone(exterior.0); + Ok(Polygon(Arc::new(geo::Polygon::new(exterior, collected)))) + } + ); + build_function!( + database, + Circle, "Polygon::circle", ( + context: &ExecutionContext, + radius: Option = ValueNone.into(), + diameter: Option = ValueNone.into(), + angle_between_points: Option = ValueNone.into(), + distance_between_points: Option = ValueNone.into(), + number_of_points: Option = ValueNone.into()) -> Polygon + { + let circle_info = CircleInfo::new( + context, + radius, + diameter, + angle_between_points, + distance_between_points, + number_of_points, + )?; + + let mut points = Vec::with_capacity(circle_info.number_of_points); + for point_index in 0..circle_info.number_of_points { + let angle_to_point = circle_info.segment_angle * point_index as RawFloat * PI; + let (y, x) = angle_to_point.sin_cos(); + let coord = geo::Coord { x: x * circle_info.radius, y: y * circle_info.radius }; + points.push(coord); + } + + Ok(Polygon(Arc::new(geo::Polygon::new(geo::LineString(points), vec![])))) + } + ); + build_function!( + database, + BuildBox, "Polygon::box", ( + context: &ExecutionContext, + size: Length2, + center: Boolean = Boolean(false).into()) -> Polygon + { + let size = size.raw_value(); + + let (a, b) = if center.0 { + let half = size / 2.0; + (-half, half) + } else { + (nalgebra::Vector2::zeros(), size) + }; + + + let rect = geo::Rect::new( + geo::Coord { x: a.x, y: a.y }, + geo::Coord { x: b.x, y: b.y } + ); + + Ok(Polygon(Arc::new(rect.to_polygon()))) + } + ); + build_function!( + database, + BuildBoxFromPoints, "Polygon::box_from_points", ( + context: &ExecutionContext, + a: Length2, + b: Length2) -> Polygon + { + let a = a.raw_value(); + let b = b.raw_value(); + + let rect = geo::Rect::new( + geo::Coord { x: a.x, y: a.y }, + geo::Coord { x: b.x, y: b.y } + ); + + Ok(Polygon(Arc::new(rect.to_polygon()))) + } + ); + + build_method!( + database, + Exterior, "Polygon::exterior", ( + context: &ExecutionContext, + this: Polygon) -> LineString + { + Ok(LineString(Arc::new(this.0.exterior().clone()))) + } + ); + build_method!( + database, + Interiors, "Polygon::interiors", ( + context: &ExecutionContext, + this: Polygon) -> ValueIterator + { + Ok(ValueIterator::new(InteriorIterator { polygon: this })) + } + ); + build_method!( + database, + NumInteriors, "Polygon::num_interiors", ( + context: &ExecutionContext, + this: Polygon) -> UnsignedInteger + { + Ok(UnsignedInteger::from(this.0.interiors().len() as u64)) + } + ); + build_method!( + database, + IsConvex, "Polygon::is_convex", ( + context: &ExecutionContext, + this: Polygon) -> Boolean + { + Ok(Boolean(this.0.exterior().is_convex())) + } + ); + build_method!( + database, + Area, "Polygon::area", ( + context: &ExecutionContext, + this: Polygon) -> Scalar + { + area(context, &*this.0) + } + ); + build_method!( + database, + BoundingBox, "Polygon::bounding_box", ( + context: &ExecutionContext, + this: Polygon) -> Option + { + bounding_box(context, &*this.0) + } + ); + build_method!( + database, + Centroid, "Polygon::centroid", ( + context: &ExecutionContext, + this: Polygon) -> Option + { + centroid(context, &*this.0) + } + ); + build_method!( + database, + Transform, "Polygon::transform", ( + context: &ExecutionContext, + this: Polygon, + t: Transform2d) -> Polygon + { + let mut this = this; + Arc::make_mut(&mut this.0).apply_transform(&t.0); + + Ok(this) + } + ); + build_method!( + database, + IntoSet, "Polygon::into_set", ( + context: &ExecutionContext, + this: Polygon) -> PolygonSet + { + let polygon = Arc::unwrap_or_clone(this.0); + Ok(PolygonSet(Arc::new(geo::MultiPolygon(vec![polygon])))) + } + ); + build_method!( + database, + Extrude, "Polygon::extrude", ( + context: &ExecutionContext, + this: Polygon, + height: Length, + divisions: UnsignedInteger = UnsignedInteger::from(1).into(), + twist_radians: Angle = Scalar { dimension: Dimension::angle(), value: Float::new(0.0).unwrap() }.into(), + scale_top: Length2 = Vector2 { dimension: Dimension::length(), value: nalgebra::Vector2::new(1.0, 1.0) }.into()) -> ManifoldMesh3D + { + extrude(context, &*this.0, height, divisions, twist_radians, scale_top) + } + ); + build_method!( + database, + Revolve, "Polygon::revolve", ( + context: &ExecutionContext, + this: Polygon, + divisions: UnsignedInteger, + angle: Angle = Scalar { dimension: Dimension::angle(), value: Float::new(std::f64::consts::PI * 2.0).unwrap() }.into()) -> ManifoldMesh3D + { + revolve(context, &*this.0, divisions, angle) + } + ); + } + } + + pub mod polygon_set { + use crate::values::polygon::{ApplyTransform as _, PolygonSetIterator}; + + use super::*; + + pub struct FromPolys; + pub struct IterPolys; + pub struct NumPoly; + pub struct Area; + pub struct BoundingBox; + pub struct Centroid; + pub struct Transform; + pub struct Extrude; + pub struct Revolve; + + pub fn register_methods_and_functions(database: &mut BuiltinCallableDatabase) { + build_function!( + database, + FromPolys, "PolygonSet::from_polys", ( + context: &ExecutionContext, + polys: List) -> PolygonSet + { + let mut collected = Vec::with_capacity(polys.len()); + for value in polys { + let polygon: Polygon = value.downcast(context)?; + let polygon = Arc::unwrap_or_clone(polygon.0); + collected.push(polygon); + } + + Ok(PolygonSet(Arc::new(geo::MultiPolygon(collected)))) + } + ); + + build_method!( + database, + IterPolys, "PolygonSet::iter_polys", ( + context: &ExecutionContext, + this: PolygonSet) -> ValueIterator + { + Ok(ValueIterator::new(PolygonSetIterator { polygon_set: this })) + } + ); + build_method!( + database, + NumPoly, "PolygonSet::num_polys", ( + context: &ExecutionContext, + this: PolygonSet) -> UnsignedInteger + { + Ok(UnsignedInteger::from(this.0.0.len() as u64)) + } + ); + build_method!( + database, + Area, "PolygonSet::area", ( + context: &ExecutionContext, + this: PolygonSet) -> Scalar + { + area(context, &*this.0) + } + ); + build_method!( + database, + BoundingBox, "PolygonSet::bounding_box", ( + context: &ExecutionContext, + this: PolygonSet) -> Option + { + bounding_box(context, &*this.0) + } + ); + build_method!( + database, + Centroid, "PolygonSet::centroid", ( + context: &ExecutionContext, + this: PolygonSet) -> Option + { + centroid(context, &*this.0) + } + ); + build_method!( + database, + Transform, "PolygonSet::transform", ( + context: &ExecutionContext, + this: PolygonSet, + t: Transform2d) -> PolygonSet + { + let mut this = this; + Arc::make_mut(&mut this.0).apply_transform(&t.0); + + Ok(this) + } + ); + build_method!( + database, + Extrude, "PolygonSet::extrude", ( + context: &ExecutionContext, + this: Polygon, + height: Length, + divisions: UnsignedInteger = UnsignedInteger::from(1).into(), + twist_radians: Angle = Scalar { dimension: Dimension::angle(), value: Float::new(0.0).unwrap() }.into(), + scale_top: Length2 = Vector2 { dimension: Dimension::length(), value: nalgebra::Vector2::new(1.0, 1.0) }.into()) -> ManifoldMesh3D + { + extrude(context, &*this.0, height, divisions, twist_radians, scale_top) + } + ); + build_method!( + database, + Revolve, "PolygonSet::revolve", ( + context: &ExecutionContext, + this: Polygon, + divisions: UnsignedInteger, + angle: Angle = Scalar { dimension: Dimension::angle(), value: Float::new(std::f64::consts::PI * 2.0).unwrap() }.into()) -> ManifoldMesh3D + { + revolve(context, &*this.0, divisions, angle) + } + ); + } + } +} + +pub fn register_methods_and_functions(database: &mut BuiltinCallableDatabase) { + methods_and_functions::line_string::register_methods_and_functions(database); + methods_and_functions::polygon::register_methods_and_functions(database); + methods_and_functions::polygon_set::register_methods_and_functions(database); +} + +#[cfg(test)] +mod test { + use super::*; + use crate::execution::{run_assert_eq, test_run}; + use geo::{Coord, Distance as _, Euclidean, Point}; + + #[test] + fn line_string_from_points() { + let result = + test_run("std.line_string.from_points(points = [{0m, 1m}, {2m, 3m}])").unwrap(); + assert_eq!( + result, + LineString(Arc::new(geo::LineString(vec![ + Coord { x: 0.0, y: 1.0 }, + Coord { x: 2.0, y: 3.0 } + ]))) + .into() + ); + } + + #[test] + fn line_string_append() { + run_assert_eq( + "std.line_string.from_points(points = [{0m, 1m}, {2m, 3m}])::append(other = std.line_string.from_points(points = [{4m, 5m}, {6m, 7m}]))::iter_points()::collect_list()", + "[{0m, 1m}, {2m, 3m}, {4m, 5m}, {6m, 7m}]", + ); + } + + #[test] + fn line_string_add_point() { + run_assert_eq( + "std.line_string.from_points(points = [{0m, 1m}, {2m, 3m}])::add_point(p = {4m, 5m})::iter_points()::collect_list()", + "[{0m, 1m}, {2m, 3m}, {4m, 5m}]", + ); + } + + #[test] + fn line_string_is_closed() { + run_assert_eq( + "std.line_string.from_points(points = [{0m, 1m}, {2m, 3m}])::is_closed()", + "false", + ); + run_assert_eq( + "std.line_string.from_points(points = [{0m, 1m}, {2m, 3m}, {0m, 1m}])::is_closed()", + "true", + ); + } + + #[test] + fn line_string_close() { + run_assert_eq( + "std.line_string.from_points(points = [{0m, 1m}, {2m, 3m}])::close()", + "std.line_string.from_points(points = [{0m, 1m}, {2m, 3m}, {0m, 1m}])", + ); + run_assert_eq( + "std.line_string.from_points(points = [{0m, 1m}, {2m, 3m}, {0m, 1m}])::close()", + "std.line_string.from_points(points = [{0m, 1m}, {2m, 3m}, {0m, 1m}])", + ); + } + + #[test] + fn line_string_open() { + run_assert_eq( + "std.line_string.from_points(points = [{0m, 1m}, {2m, 3m}])::open()", + "std.line_string.from_points(points = [{0m, 1m}, {2m, 3m}])", + ); + run_assert_eq( + "std.line_string.from_points(points = [{0m, 1m}, {2m, 3m}, {0m, 1m}])::open()", + "std.line_string.from_points(points = [{0m, 1m}, {2m, 3m}])", + ); + } + + #[test] + fn line_string_iter_points() { + run_assert_eq( + "std.line_string.from_points(points = [{0m, 1m}, {2m, 3m}])::iter_points()::collect_list()", + "[{0m, 1m}, {2m, 3m}]", + ); + } + + #[test] + fn line_string_rev_iter_points() { + run_assert_eq( + "std.line_string.from_points(points = [{0m, 1m}, {2m, 3m}])::rev_iter_points()::collect_list()", + "[{2m, 3m}, {0m, 1m}]", + ); + } + + #[test] + fn line_string_num_points() { + run_assert_eq( + "std.line_string.from_points(points = [{0m, 1m}, {2m, 3m}])::num_points()", + "2u", + ); + } + + #[test] + fn line_string_length() { + run_assert_eq( + "std.line_string.from_points(points = [{0m, 1m}, {0m, 2m}, {0m, 4m}])::length()", + "3m", + ); + } + + #[test] + fn line_string_bounding_box() { + run_assert_eq( + "std.line_string.from_points(points = [{-1m, 2m}, {1m, -2m}])::bounding_box()", + "(min = {-1m, -2m}, max = {1m, 2m})", + ); + } + + #[test] + fn line_string_centroid() { + run_assert_eq( + "std.line_string.from_points(points = [{-1m, 1m}, {1m, -1m}])::centroid()", + "{0m, 0m}", + ); + } + + #[test] + fn line_string_transform() { + run_assert_eq( + "std.line_string.from_points(points = [{0m, 1m}, {2m, 3m}])::transform(t = std.consts.Transform2d::translate(offset = {1m, 2m}))", + "std.line_string.from_points(points = [{1m, 3m}, {3m, 5m}])", + ); + } + + #[test] + fn polygon_from_points() { + let result = + test_run("std.polygon.from_points(points = [{0m, 0m}, {1m, 0m}, {1m, 1m}, {0m, 1m}])") + .unwrap(); + assert_eq!( + result, + Polygon(Arc::new(geo::Polygon::new( + geo::LineString(vec![ + Coord { x: 0.0, y: 0.0 }, + Coord { x: 1.0, y: 0.0 }, + Coord { x: 1.0, y: 1.0 }, + Coord { x: 0.0, y: 1.0 } + ]), + vec![] + ))) + .into() + ); + } + + #[test] + fn polygon_from_line_strings() { + let result = + test_run("std.polygon.from_line_strings(exterior = std.line_string.from_points(points = [{0m, 0m}, {1m, 0m}, {1m, 1m}, {0m, 1m}]))") + .unwrap(); + assert_eq!( + result, + Polygon(Arc::new(geo::Polygon::new( + geo::LineString(vec![ + Coord { x: 0.0, y: 0.0 }, + Coord { x: 1.0, y: 0.0 }, + Coord { x: 1.0, y: 1.0 }, + Coord { x: 0.0, y: 1.0 } + ]), + vec![] + ))) + .into() + ); + } + + #[test] + fn polygon_from_circle() { + // Test angle_between_points + let result = + test_run("std.polygon.circle(radius = 1m, angle_between_points = 1rad)").unwrap(); + let polygon = result.as_polygon().unwrap(); + assert_eq!(polygon.0.exterior().0.len(), 4); + assert!(polygon.0.interiors().is_empty()); + + let result = + test_run("std.polygon.circle(radius = 1m, angle_between_points = 0.5rad)").unwrap(); + let polygon = result.as_polygon().unwrap(); + assert_eq!(polygon.0.exterior().0.len(), 6); + assert!(polygon.0.interiors().is_empty()); + + // Test distance_between_points + let result = + test_run("std.polygon.circle(radius = 1m, distance_between_points = 3.14159m)") + .unwrap(); + let polygon = result.as_polygon().unwrap(); + assert_eq!(polygon.0.exterior().0.len(), 4); + assert!(polygon.0.interiors().is_empty()); + + // Test number_of_points + let result = test_run("std.polygon.circle(radius = 1m, number_of_points = 2u)").unwrap(); + let polygon = result.as_polygon().unwrap(); + assert_eq!(polygon.0.exterior().0.len(), 3); + assert!(polygon.0.interiors().is_empty()); + + let result = test_run("std.polygon.circle(radius = 1m, number_of_points = 3u)").unwrap(); + let polygon = result.as_polygon().unwrap(); + assert_eq!(polygon.0.exterior().0.len(), 4); + assert!(polygon.0.interiors().is_empty()); + + let result = + test_run("std.polygon.circle(radius = 1m, angle_between_points = 0.5rad)").unwrap(); + let polygon = result.as_polygon().unwrap(); + + let expected_coords = [ + Coord { x: 1.0, y: 0.0 }, + Coord { x: 0.0, y: 1.0 }, + Coord { x: -1.0, y: 0.0 }, + Coord { x: 0.0, y: -1.0 }, + Coord { x: 1.0, y: 0.0 }, + ]; + + for (index, (actual, expected)) in expected_coords + .iter() + .zip(polygon.0.exterior().0.iter()) + .enumerate() + { + assert!( + Euclidean.distance(Point(*actual), Point(*expected)) < 0.00001, + "Coordinate {index} was not within tolerance" + ); + } + + let result = + test_run("std.polygon.circle(diameter = 1m, angle_between_points = 0.5rad)").unwrap(); + let polygon = result.as_polygon().unwrap(); + let expected_coords = [ + Coord { x: 0.5, y: 0.0 }, + Coord { x: 0.0, y: 0.5 }, + Coord { x: -0.5, y: 0.0 }, + Coord { x: 0.0, y: -0.5 }, + Coord { x: 0.5, y: 0.0 }, + ]; + + for (index, (actual, expected)) in expected_coords + .iter() + .zip(polygon.0.exterior().0.iter()) + .enumerate() + { + assert!( + Euclidean.distance(Point(*actual), Point(*expected)) < 0.00001, + "Coordinate {index} was not within tolerance" + ); + } + } + + #[test] + fn polygon_from_box() { + run_assert_eq( + "std.polygon.box(size = {1m, 2m})::exterior()::iter_points()::collect_list()", + "[{1m, 0m}, {1m, 2m}, {0m, 2m}, {0m, 0m}, {1m, 0m}]", + ); + + run_assert_eq( + "std.polygon.box(size = {1m, 2m}, center = true)::exterior()::iter_points()::collect_list()", + "[{0.5m, -1m}, {0.5m, 1m}, {-0.5m, 1m}, {-0.5m, -1m}, {0.5m, -1m}]", + ); + } + + #[test] + fn polygon_exterior() { + run_assert_eq( + "std.polygon.from_line_strings(exterior = std.line_string.from_points(points = [{0m, 0m}, {1m, 0m}, {1m, 1m}, {0m, 1m}]))::exterior()", + "std.line_string.from_points(points = [{0m, 0m}, {1m, 0m}, {1m, 1m}, {0m, 1m}, {0m, 0m}])", + ); + } + + #[test] + fn polygon_interiors() { + run_assert_eq( + "std.polygon.from_line_strings(exterior = std.line_string.from_points(points = [{-2m, -2m}, {2m, -2m}, {2m, 2m}, {-2m, 2m}]), interiors = [std.line_string.from_points(points = [{0m, 1m}, {1m, 1m}, {1m, 0m}, {0m, 0m}])])::interiors()::collect_list()", + "[std.line_string.from_points(points = [{0m, 1m}, {1m, 1m}, {1m, 0m}, {0m, 0m}, {0m, 1m}])]", + ); + } + + #[test] + fn polygon_num_interiors() { + run_assert_eq( + "std.polygon.from_line_strings(exterior = std.line_string.from_points(points = []), interiors = [std.line_string.from_points(points = []), std.line_string.from_points(points = []), std.line_string.from_points(points = [])])::num_interiors()", + "3u", + ); + } + + #[test] + fn polygon_is_convex() { + run_assert_eq( + "std.polygon.from_line_strings(exterior = std.line_string.from_points(points = [{0m, 0m}, {1m, 0m}, {1m, 1m}, {0m, 1m}]))::is_convex()", + "true", + ); + + run_assert_eq( + "std.polygon.from_line_strings(exterior = std.line_string.from_points(points = [{0m, 0m}, {1m, 0m}, {1m, 1m}, {0.5m, 0.5m}, {0m, 1m}]))::is_convex()", + "false", + ); + } + + #[test] + fn polygon_area() { + run_assert_eq( + "std.polygon.from_line_strings(exterior = std.line_string.from_points(points = [{0m, 0m}, {1m, 0m}, {1m, 1m}, {0m, 1m}]))::area()", + "1 'm^2'", + ); + } + + #[test] + fn polygon_bounding_box() { + run_assert_eq( + "std.polygon.from_line_strings(exterior = std.line_string.from_points(points = [{0m, 0m}, {1m, 0m}, {1m, 1m}, {0m, 1m}]))::bounding_box()", + "(min = {0m, 0m}, max = {1m, 1m})", + ); + } + + #[test] + fn polygon_centroid() { + run_assert_eq( + "std.polygon.from_line_strings(exterior = std.line_string.from_points(points = [{0m, 0m}, {1m, 0m}, {1m, 1m}, {0m, 1m}]))::centroid()", + "{0.5m, 0.5m}", + ); + } + + #[test] + fn polygon_transform() { + run_assert_eq( + "std.polygon.from_line_strings(exterior = std.line_string.from_points(points = [{0m, 0m}, {1m, 0m}, {1m, 1m}, {0m, 1m}]))::transform(t = std.consts.Transform2d::translate(offset = {1m, 2m}))", + "std.polygon.from_line_strings(exterior = std.line_string.from_points(points = [{1m, 2m}, {2m, 2m}, {2m, 3m}, {1m, 3m}]))", + ); + } + + #[test] + fn polygon_into_set() { + let result = test_run( + "std.polygon.from_points(points = [{0m, 0m}, {1m, 0m}, {1m, 1m}, {0m, 1m}])::into_set()", + ) + .unwrap(); + assert_eq!( + result, + PolygonSet(Arc::new(geo::MultiPolygon(vec![geo::Polygon::new( + geo::LineString(vec![ + Coord { x: 0.0, y: 0.0 }, + Coord { x: 1.0, y: 0.0 }, + Coord { x: 1.0, y: 1.0 }, + Coord { x: 0.0, y: 1.0 } + ]), + vec![] + )]))) + .into() + ); + } + + #[test] + fn polygon_set_from_polys() { + let result = test_run( + "std.polygon_set.from_polys(polys = [std.polygon.from_points(points = [{0m, 0m}, {1m, 0m}, {1m, 1m}, {0m, 1m}]), std.polygon.from_points(points = [{1m, 1m}, {2m, 1m}, {2m, 2m}, {1m, 2m}])])", + ) + .unwrap(); + assert_eq!( + result, + PolygonSet(Arc::new(geo::MultiPolygon(vec![ + geo::Polygon::new( + geo::LineString(vec![ + Coord { x: 0.0, y: 0.0 }, + Coord { x: 1.0, y: 0.0 }, + Coord { x: 1.0, y: 1.0 }, + Coord { x: 0.0, y: 1.0 } + ]), + vec![] + ), + geo::Polygon::new( + geo::LineString(vec![ + Coord { x: 1.0, y: 1.0 }, + Coord { x: 2.0, y: 1.0 }, + Coord { x: 2.0, y: 2.0 }, + Coord { x: 1.0, y: 2.0 } + ]), + vec![] + ) + ]))) + .into() + ); + } + + #[test] + fn polygon_set_iter_polys() { + run_assert_eq( + "std.polygon_set.from_polys(polys = [std.polygon.from_points(points = [{0m, 0m}, {1m, 0m}, {1m, 1m}, {0m, 1m}]), std.polygon.from_points(points = [{1m, 1m}, {2m, 1m}, {2m, 2m}, {1m, 2m}])])::iter_polys()::collect_list()", + "[std.polygon.from_points(points = [{0m, 0m}, {1m, 0m}, {1m, 1m}, {0m, 1m}]), std.polygon.from_points(points = [{1m, 1m}, {2m, 1m}, {2m, 2m}, {1m, 2m}])]", + ); + } + + #[test] + fn polygon_set_num_poly() { + run_assert_eq( + "std.polygon_set.from_polys(polys = [std.polygon.from_points(points = [{0m, 0m}, {1m, 0m}, {1m, 1m}, {0m, 1m}]), std.polygon.from_points(points = [{1m, 1m}, {2m, 1m}, {2m, 2m}, {1m, 2m}])])::num_poly()", + "2u", + ); + } + + #[test] + fn polygon_set_area() { + run_assert_eq( + "std.polygon.from_points(points = [{0m, 0m}, {1m, 0m}, {1m, 1m}, {0m, 1m}])::into_set()::area()", + "1 'm^2'", + ); + } + + #[test] + fn polygon_set_bounding_box() { + run_assert_eq( + "std.polygon.from_points(points = [{0m, 0m}, {1m, 0m}, {1m, 1m}, {0m, 1m}])::into_set()::bounding_box()", + "(min = {0m, 0m}, max = {1m, 1m})", + ); + } + + #[test] + fn polygon_set_centroid() { + run_assert_eq( + "std.polygon.from_points(points = [{0m, 0m}, {1m, 0m}, {1m, 1m}, {0m, 1m}])::into_set()::centroid()", + "{0.5m, 0.5m}", + ); + } + + #[test] + fn polygon_set_transform() { + run_assert_eq( + "std.polygon.from_points(points = [{0m, 0m}, {1m, 0m}, {1m, 1m}, {0m, 1m}])::into_set()::transform(t = std.consts.Transform2d::translate(offset = {1m, 2m}))", + "std.polygon.from_points(points = [{1m, 2m}, {2m, 2m}, {2m, 3m}, {1m, 3m}, {1m, 2m}])::into_set()", + ); + } +} diff --git a/interpreter/src/execution/values/scalar.rs b/interpreter/src/execution/values/scalar.rs index 7765359..be9e63c 100644 --- a/interpreter/src/execution/values/scalar.rs +++ b/interpreter/src/execution/values/scalar.rs @@ -1292,7 +1292,7 @@ mod test { #[test] fn cossin() { - let product = test_run("let angle = 45deg; in (angle::cossin() - <(angle::cos(), angle::sin())>)::norm() < 0.0000000001").unwrap(); + let product = test_run("let angle = 45deg; in (angle::cossin() - {angle::cos(), angle::sin()})::norm() < 0.0000000001").unwrap(); assert_eq!(product, Boolean(true).into()); } diff --git a/interpreter/src/execution/values/string/formatting.rs b/interpreter/src/execution/values/string/formatting.rs index d3f199d..52a52bb 100644 --- a/interpreter/src/execution/values/string/formatting.rs +++ b/interpreter/src/execution/values/string/formatting.rs @@ -277,7 +277,10 @@ mod test { use common_data_types::{Dimension, Float}; - use crate::execution::{test_context, values::Scalar}; + use crate::execution::{ + test_context, + values::{Scalar, Value}, + }; use super::*; @@ -415,7 +418,7 @@ mod test { &mut formatted, Dictionary::new( context, - HashMap::from_iter([( + HashMap::<&str, Value>::from_iter([( "value".into(), Scalar { dimension: Dimension::zero(), @@ -437,7 +440,7 @@ mod test { &mut formatted, Dictionary::new( context, - HashMap::from_iter([ + HashMap::<&str, Value>::from_iter([ ( "one".into(), Scalar { diff --git a/interpreter/src/execution/values/string/mod.rs b/interpreter/src/execution/values/string/mod.rs index 98b0d53..7ac4f9f 100644 --- a/interpreter/src/execution/values/string/mod.rs +++ b/interpreter/src/execution/values/string/mod.rs @@ -17,9 +17,11 @@ */ use common_data_types::{Dimension, Float}; -use hashable_map::HashableMap; + use imstr::ImString; +use indexmap::IndexMap; + use crate::{ build_closure_type, build_method, execution::{ @@ -147,13 +149,15 @@ pub struct CharIterator { impl IterableObject for CharIterator { fn iterate( &self, - callback: impl FnOnce(&mut dyn Iterator) -> ExecutionResult, + _context: &ExecutionContext, + callback: impl FnOnce(&mut dyn Iterator>) -> ExecutionResult, ) -> ExecutionResult { let mut iter = self .string .0 .chars() - .map(|c| IString(format!("{c}").into()).into()); + .map(|c| IString(format!("{c}").into()).into()) + .map(Ok); callback(&mut iter) } } @@ -167,14 +171,16 @@ pub struct LineIterator { impl IterableObject for LineIterator { fn iterate( &self, - callback: impl FnOnce(&mut dyn Iterator) -> ExecutionResult, + _context: &ExecutionContext, + callback: impl FnOnce(&mut dyn Iterator>) -> ExecutionResult, ) -> ExecutionResult { let mut iterator = self .string .0 .lines() .filter(|line| self.include_empty || !line.is_empty()) - .map(|line| IString(line).into()); + .map(|line| IString(line).into()) + .map(Ok); callback(&mut iterator) } @@ -255,7 +261,7 @@ fn register_format_method(database: &mut BuiltinCallableDatabase) { let callable = BuiltFunction { signature: Arc::new(Signature { argument_type: StructDefinition { - members: Arc::new(HashableMap::from(HashMap::new())), + members: Arc::new(IndexMap::new()), variadic: true, }, return_type: ValueType::String, @@ -356,9 +362,9 @@ pub fn register_methods(database: &mut BuiltinCallableDatabase) { let mut product: String = String::with_capacity(this.0.len()); for c in this.0.chars() { - let retain = f.call(context, Dictionary::new(context, HashMap::from_iter([ + let retain = f.call(context, Dictionary::new(context, HashMap::<&str, Value>::from_iter([ ( - "c".into(), + "c", IString(ImString::from(format!("{c}"))).into() ) ])))?.downcast::(context)?; diff --git a/interpreter/src/execution/values/transform.rs b/interpreter/src/execution/values/transform.rs new file mode 100644 index 0000000..15d130d --- /dev/null +++ b/interpreter/src/execution/values/transform.rs @@ -0,0 +1,360 @@ +/* + * Copyright 2026 James Carl + * AGPL-3.0-only or AGPL-3.0-or-later + * + * This file is part of Command Cad. + * + * Command CAD is free software: you can redistribute it and/or modify it under the terms of + * the GNU Affero General Public License as published by the Free Software Foundation, either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License along with this + * program. If not, see . + */ + +use std::borrow::Cow; + +use common_data_types::RawFloat; +use enum_downcast::{AsVariant, IntoVariant}; +use nalgebra::{Matrix3, Matrix4, Rotation2, Rotation3, Translation2, Translation3, Unit}; + +use crate::{ + build_method, + execution::errors::Raise as _, + values::{ + scalar::Angle, + vector::{Length2, Length3, Zero2, Zero3}, + BuiltinCallableDatabase, BuiltinFunction, MissingAttributeError, Object, StaticType, + StaticTypeName, Style, Value, ValueType, Vector2, Vector3, + }, + ExecutionContext, ExecutionResult, +}; + +type Float = RawFloat; + +pub type Transform2d = Transform>; +pub type Transform3d = Transform>; + +#[derive(Debug, Hash, Clone, Copy, PartialEq)] +pub struct Transform(pub T); + +impl Transform { + pub fn new(inner: T) -> Self { + Self(inner) + } +} + +impl Eq for Transform where I: PartialEq {} + +impl Object for Transform +where + I: TransformInternalType, + Self: StaticTypeName + Into, + Value: IntoVariant + AsVariant, +{ + fn get_type(&self, _context: &ExecutionContext) -> ValueType { + I::get_type() + } + + fn format( + &self, + _context: &ExecutionContext, + f: &mut dyn std::fmt::Write, + _style: Style, + _precision: Option, + ) -> std::fmt::Result { + write!(f, "{}", self.type_name()) + } + + fn unary_minus(self, _context: &ExecutionContext) -> ExecutionResult { + Ok(Self(self.0.invert()).into()) + } + + fn eq(self, context: &ExecutionContext, rhs: Value) -> ExecutionResult { + let rhs: Self = rhs.downcast_for_binary_op(context)?; + Ok(self == rhs) + } + + fn get_attribute(&self, context: &ExecutionContext, attribute: &str) -> ExecutionResult { + match attribute { + "rotate" => Ok(BuiltinFunction::new::< + <::MethodSet as methods::MethodSet>::Rotate, + >() + .into()), + "translate" => Ok(BuiltinFunction::new::< + <::MethodSet as methods::MethodSet>::Translate, + >() + .into()), + "scale" => Ok(BuiltinFunction::new::< + <::MethodSet as methods::MethodSet>::Scale, + >() + .into()), + _ => Err(MissingAttributeError { + name: attribute.into(), + } + .to_error(context)), + } + } +} + +impl StaticTypeName for Transform +where + I: StaticTypeName, +{ + fn static_type_name() -> Cow<'static, str> { + I::static_type_name() + } +} + +impl StaticType for Transform +where + I: StaticType, +{ + fn static_type() -> ValueType { + I::static_type() + } +} + +mod methods { + pub trait MethodSet { + type Rotate; + type Translate; + type Scale; + } + + macro_rules! build_method_set { + ($name:ident) => { + paste::paste! { + pub struct [<$name Rotate>]; + pub struct [<$name Translate>]; + pub struct [<$name Scale>]; + + pub struct [<$name MethodSet>]; + impl MethodSet for [<$name MethodSet>] { + type Rotate = [<$name Rotate>]; + type Translate = [<$name Translate>]; + type Scale = [<$name Scale>]; + } + } + }; + } + + build_method_set!(Transform2d); + build_method_set!(Transform3d); +} + +pub fn register_methods(database: &mut BuiltinCallableDatabase) { + // Transform2d + build_method!( + database, + ::Rotate, "Transform2d::rotate", ( + context: &ExecutionContext, + this: Transform2d, + angle: Angle) -> Transform2d + { + let rotation = Rotation2::new(*angle.value); + Ok(Transform(this.0 * rotation.to_homogeneous())) + } + ); + build_method!( + database, + ::Translate, "Transform2d::translate", ( + context: &ExecutionContext, + this: Transform2d, + offset: Length2) -> Transform2d + { + let offset: Vector2 = offset.into(); + let offset = offset.raw_value(); + + let translation = Translation2::from(offset); + Ok(Transform(this.0 * translation.to_homogeneous())) + } + ); + build_method!( + database, + ::Scale, "Transform2d::scale", ( + context: &ExecutionContext, + this: Transform2d, + scale: Zero2) -> Transform2d + { + let scale: Vector2 = scale.into(); + let scale = scale.raw_value(); + + Ok(Transform(this.0 * Matrix3::new_nonuniform_scaling(&scale))) + } + ); + + // Transform3d + build_method!( + database, + ::Rotate, "Transform3d::rotate", ( + context: &ExecutionContext, + this: Transform3d, + axis: Zero3, + angle: Angle) -> Transform3d + { + let axis: Vector3 = axis.into(); + let axis = axis.raw_value(); + let axis = Unit::new_normalize(axis); + + let rotation = Rotation3::from_axis_angle(&axis, *angle.value); + Ok(Transform(this.0 * rotation.to_homogeneous())) + } + ); + build_method!( + database, + ::Translate, "Transform3d::translate", ( + context: &ExecutionContext, + this: Transform3d, + offset: Length3) -> Transform3d + { + let offset: Vector3 = offset.into(); + let offset = offset.raw_value(); + + let translation = Translation3::from(offset); + Ok(Transform(this.0 * translation.to_homogeneous())) + } + ); + build_method!( + database, + ::Scale, "Transform3d::scale", ( + context: &ExecutionContext, + this: Transform3d, + scale: Zero3) -> Transform3d + { + let scale: Vector3 = scale.into(); + let scale = scale.raw_value(); + + Ok(Transform(this.0 * Matrix4::new_nonuniform_scaling(&scale))) + } + ); +} + +pub(crate) trait TransformInternalType: + Copy + PartialEq + StaticTypeName + StaticType + 'static +{ + type MethodSet: methods::MethodSet; + + fn get_type() -> ValueType; + fn invert(&self) -> Self; +} + +impl TransformInternalType for Matrix3 { + type MethodSet = methods::Transform2dMethodSet; + + fn get_type() -> ValueType { + ValueType::Transform2d + } + + fn invert(&self) -> Self { + self.try_inverse().expect("Matrix wasn't square") + } +} + +impl StaticTypeName for Matrix3 { + fn static_type_name() -> Cow<'static, str> { + "Transform2d".into() + } +} + +impl StaticType for Matrix3 { + fn static_type() -> ValueType { + ValueType::Transform2d + } +} + +impl TransformInternalType for Matrix4 { + type MethodSet = methods::Transform3dMethodSet; + + fn get_type() -> ValueType { + ValueType::Transform3d + } + + fn invert(&self) -> Self { + self.try_inverse().expect("Matrix wasn't square") + } +} + +impl StaticTypeName for Matrix4 { + fn static_type_name() -> Cow<'static, str> { + "Transform3d".into() + } +} + +impl StaticType for Matrix4 { + fn static_type() -> ValueType { + ValueType::Transform3d + } +} + +#[cfg(test)] +mod test { + use crate::execution::{test_run, values::Boolean}; + use pretty_assertions::assert_eq; + + #[test] + fn identity_transform2d() { + let product = + test_run("{1m, 2m}::transform(t = std.consts.Transform2d) == {1m, 2m}").unwrap(); + assert_eq!(product, Boolean(true).into()); + } + + #[test] + fn identity_transform3d() { + let product = + test_run("{1m, 2m, 3m}::transform(t = std.consts.Transform3d) == {1m, 2m, 3m}") + .unwrap(); + assert_eq!(product, Boolean(true).into()); + } + + #[test] + fn translate2d() { + let product = + test_run("{1m, 2m}::transform(t = std.consts.Transform2d::translate(offset = {2m, 4m})) == {3m, 6m}").unwrap(); + assert_eq!(product, Boolean(true).into()); + } + + #[test] + fn translate3d() { + let product = + test_run("{1m, 2m, 3m}::transform(t = std.consts.Transform3d::translate(offset = {2m, 4m, 6m})) == {3m, 6m, 9m}") + .unwrap(); + assert_eq!(product, Boolean(true).into()); + } + + #[test] + fn rotate2d() { + let product = + test_run("let rotated = {0m, 1m}::transform(t = std.consts.Transform2d::rotate(angle = 90deg)); x = (rotated.x + 1m)::abs() < 0.0001m; y = rotated.y::abs() < 0.0001m; in x && y").unwrap(); + assert_eq!(product, Boolean(true).into()); + } + + #[test] + fn rotate3d() { + let product = + test_run("let rotated = {0m, 1m, 0m}::transform(t = std.consts.Transform3d::rotate(axis = {0, 0, 1}, angle = 90deg)); x = (rotated.x + 1m)::abs() < 0.0001m; y = rotated.y::abs() < 0.0001m; z = rotated.z::abs() < 0.0001m; in x && y && z") + .unwrap(); + assert_eq!(product, Boolean(true).into()); + } + + #[test] + fn scale2d() { + let product = test_run( + "{1m, 2m}::transform(t = std.consts.Transform2d::scale(scale = {3, 4})) == {3m, 8m}", + ) + .unwrap(); + assert_eq!(product, Boolean(true).into()); + } + + #[test] + fn scale3d() { + let product = + test_run("{1m, 2m, 3m}::transform(t = std.consts.Transform3d::scale(scale = {3, 4, 5})) == {3m, 8m, 15m}") + .unwrap(); + assert_eq!(product, Boolean(true).into()); + } +} diff --git a/interpreter/src/execution/values/value_type.rs b/interpreter/src/execution/values/value_type.rs index 5a80d91..d3e636b 100644 --- a/interpreter/src/execution/values/value_type.rs +++ b/interpreter/src/execution/values/value_type.rs @@ -18,9 +18,11 @@ use std::{borrow::Cow, collections::HashMap, fmt::Display, sync::Arc}; use common_data_types::Dimension; -use hashable_map::{HashableMap, HashableSet}; +use hashable_map::HashableSet; use imstr::ImString; +use indexmap::IndexMap; + use super::{ closure::Signature as ClosureSignature, Boolean, Object, SignedInteger, StaticTypeName, UnsignedInteger, Value, ValueNone, @@ -34,12 +36,15 @@ use crate::{ errors::{ExecutionResult, Raise}, logging::{LogLevel, LogMessage}, values::{ - self, closure::BuiltinCallableDatabase, dictionary::DictionaryData, - string::formatting::Style, BuiltinFunction, Dictionary, File, IString, - MissingAttributeError, + self, + closure::BuiltinCallableDatabase, + dictionary::{ArgumentName, DictionaryData}, + string::formatting::Style, + BuiltinFunction, Dictionary, File, IString, MissingAttributeError, }, ExecutionContext, }, + values::StaticType, }; #[derive(Debug, Eq, Clone, PartialEq)] @@ -63,6 +68,11 @@ pub enum ValueType { ConstraintSet(Arc>), ManifoldMesh3D, Iterator, + Transform2d, + Transform3d, + LineString, + Polygon, + PolygonSet, } impl From for ValueType { @@ -97,6 +107,12 @@ impl ValueType { Self::Any => "Any".into(), Self::ManifoldMesh3D => "ManifoldMesh3D".into(), Self::Iterator => "Iterator".into(), + Self::Transform2d => "Transform2d".into(), + Self::Transform3d => "Transform3d".into(), + Self::LineString => "LineString".into(), + Self::Polygon => "Polygon".into(), + Self::PolygonSet => "PolygonSet".into(), + Self::ValueType => "ValueType".into(), _ => format!("{}", self).into(), } } @@ -263,6 +279,12 @@ impl StaticTypeName for ValueType { } } +impl StaticType for ValueType { + fn static_type() -> ValueType { + ValueType::ValueType + } +} + mod methods { pub struct Qualify; pub struct TryQualify; @@ -327,7 +349,7 @@ impl Display for StructMember { #[derive(Debug, Clone, Eq, PartialEq)] pub struct StructDefinition { - pub members: Arc>, + pub members: Arc>, pub variadic: bool, } @@ -336,13 +358,16 @@ impl StructDefinition { context: &ExecutionContext, source: &AstNode, ) -> ExecutionResult { - let mut members = HashMap::new(); + let mut members = IndexMap::new(); for member in source.node.members.iter() { let name = member.node.name.node.clone(); - members.insert(name, StructMember::new(context, member)?); + members.insert( + ArgumentName::Named(name), + StructMember::new(context, member)?, + ); } - let members = Arc::new(HashableMap::from(members)); + let members = Arc::new(members); let variadic = source.node.variadic; Ok(Self { members, variadic }) } @@ -350,15 +375,36 @@ impl StructDefinition { pub fn fill_defaults(&self, dictionary: Dictionary) -> Dictionary { let data = Arc::unwrap_or_clone(dictionary.data); - let mut members: HashableMap = data.members; + let mut members: IndexMap = data.members; let struct_def_variadic = data.struct_def.variadic; let mut struct_def_members = Arc::unwrap_or_clone(data.struct_def.members); - for (name, member) in self.members.iter() { - if let Some(default_value) = &member.default { - if members.get(name).is_none() { - members.insert(name.clone(), default_value.clone()); - struct_def_members.insert(name.clone(), member.clone()); + // Rename positional keys to named keys based on parameter order. + // This allows the builtin function macro to always look up by name, + // regardless of whether the caller passed positional or named args. + for (idx, (arg_name, _member)) in self.members.iter().enumerate() { + if let ArgumentName::Named(param_name) = arg_name { + let positional_key = ArgumentName::Positional(idx); + if members.contains_key(&positional_key) + && !members.contains_key(&ArgumentName::Named(param_name.clone())) + { + if let Some(value) = members.shift_remove(&positional_key) { + members.insert(ArgumentName::Named(param_name.clone()), value); + } + } + } + } + + for (idx, (name, member)) in self.members.iter().enumerate() { + let is_present = self.find_arg_key(&members, idx, name).is_some(); + if !is_present { + if let Some(default_value) = &member.default { + let key = match name { + ArgumentName::Named(n) => ArgumentName::Named(n.clone()), + ArgumentName::Positional(_) => ArgumentName::Positional(idx), + }; + members.insert(key.clone(), default_value.clone()); + struct_def_members.insert(key.clone(), member.clone()); } } } @@ -374,20 +420,56 @@ impl StructDefinition { } } + fn find_arg_key( + &self, + members: &IndexMap, + idx: usize, + name: &ArgumentName, + ) -> Option { + match name { + ArgumentName::Named(n) => { + if members.contains_key(&ArgumentName::Named(n.clone())) { + Some(ArgumentName::Named(n.clone())) + } else if members.contains_key(&ArgumentName::Positional(idx)) { + Some(ArgumentName::Positional(idx)) + } else { + None + } + } + ArgumentName::Positional(_) => { + if members.contains_key(&ArgumentName::Positional(idx)) { + Some(ArgumentName::Positional(idx)) + } else if let ArgumentName::Named(n) = name { + if members.contains_key(&ArgumentName::Named(n.clone())) { + Some(ArgumentName::Named(n.clone())) + } else { + None + } + } else { + None + } + } + } + } + pub fn check_other_qualifies( &self, other: &StructDefinition, ) -> Result<(), TypeQualificationError> { let mut errors = Vec::new(); - - // Check that all fields are present and correct. - for (name, member) in self.members.iter() { - if let Some(other_member) = other.members.get(name) { - if let Err(error) = member.ty.check_other_qualifies(&other_member.ty) { - errors.push(MissmatchedField { - name: name.clone(), - error, - }); + let mut matched_keys = std::collections::HashSet::new(); + + // Check that all expected fields are present and correct. + for (idx, (name, member)) in self.members.iter().enumerate() { + if let Some(key) = self.find_arg_key(&other.members, idx, name) { + matched_keys.insert(key.clone()); + if let Some(other_member) = other.members.get(&key) { + if let Err(error) = member.ty.check_other_qualifies(&other_member.ty) { + errors.push(MissmatchedField { + name: name.clone(), + error, + }); + } } } else if member.default.is_none() { errors.push(MissmatchedField { @@ -400,16 +482,16 @@ impl StructDefinition { } } - // Checkt that there are no extra fields (unless of course, we're supposed to have extra + // Check that there are no extra fields (unless of course, we're supposed to have extra // fields) if !self.variadic { - for (name, member) in other.members.iter() { - if self.members.get(name).is_none() { + for key in other.members.keys() { + if !matched_keys.contains(key) { errors.push(MissmatchedField { - name: name.clone(), + name: key.clone(), error: TypeQualificationError::This { expected: ValueType::TypeNone, - got: member.ty.clone(), + got: ValueType::TypeNone, }, }); } @@ -465,10 +547,10 @@ impl StaticTypeName for StructDefinition { } } -impl From> for StructDefinition { - fn from(map: HashMap) -> Self { +impl From> for StructDefinition { + fn from(map: HashMap) -> Self { Self { - members: Arc::new(HashableMap::from(map)), + members: Arc::new(map.into_iter().collect()), variadic: false, } } @@ -476,7 +558,7 @@ impl From> for StructDefinition { #[derive(Debug, Eq, PartialEq)] pub struct MissmatchedField { - pub name: ImString, + pub name: ArgumentName, pub error: TypeQualificationError, } @@ -804,7 +886,6 @@ mod test { let error = structure .check_other_qualifies(&dictionary.get_type(context)) .unwrap_err(); - dbg!(&error); assert_eq!( error, TypeQualificationError::Fields { @@ -868,6 +949,96 @@ mod test { ); } + #[test] + fn type_transform2d() { + ValueType::Transform2d + .check_other_qualifies(&ValueType::Transform2d) + .unwrap(); + + let error = ValueType::Transform2d + .check_other_qualifies(&ValueType::TypeNone) + .unwrap_err(); + assert_eq!( + error, + TypeQualificationError::This { + expected: ValueType::Transform2d, + got: ValueType::TypeNone + } + ); + } + + #[test] + fn type_transform3d() { + ValueType::Transform3d + .check_other_qualifies(&ValueType::Transform3d) + .unwrap(); + + let error = ValueType::Transform3d + .check_other_qualifies(&ValueType::TypeNone) + .unwrap_err(); + assert_eq!( + error, + TypeQualificationError::This { + expected: ValueType::Transform3d, + got: ValueType::TypeNone + } + ); + } + + #[test] + fn type_linestring() { + ValueType::LineString + .check_other_qualifies(&ValueType::LineString) + .unwrap(); + + let error = ValueType::LineString + .check_other_qualifies(&ValueType::TypeNone) + .unwrap_err(); + assert_eq!( + error, + TypeQualificationError::This { + expected: ValueType::LineString, + got: ValueType::TypeNone + } + ); + } + + #[test] + fn type_polygon() { + ValueType::Polygon + .check_other_qualifies(&ValueType::Polygon) + .unwrap(); + + let error = ValueType::Polygon + .check_other_qualifies(&ValueType::TypeNone) + .unwrap_err(); + assert_eq!( + error, + TypeQualificationError::This { + expected: ValueType::Polygon, + got: ValueType::TypeNone + } + ); + } + + #[test] + fn type_polygon_set() { + ValueType::PolygonSet + .check_other_qualifies(&ValueType::PolygonSet) + .unwrap(); + + let error = ValueType::PolygonSet + .check_other_qualifies(&ValueType::TypeNone) + .unwrap_err(); + assert_eq!( + error, + TypeQualificationError::This { + expected: ValueType::PolygonSet, + got: ValueType::TypeNone + } + ); + } + #[test] fn combined_type() { let value_type = test_run("std.types.None | std.types.UInt").unwrap(); @@ -990,4 +1161,58 @@ mod test { } ); } + + #[test] + fn positional_args_match_by_index() { + let result = test_run( + "let f = (a: std.types.UInt, b: std.types.UInt) -> std.types.UInt: a + b; in f(1u, 2u)", + ) + .unwrap(); + assert_eq!(result, values::UnsignedInteger::from(3).into()); + } + + #[test] + fn positional_args_with_defaults() { + let result = test_run( + "let f = (a: std.types.UInt, b: std.types.UInt = 10u) -> std.types.UInt: a + b; in f(5u)", + ) + .unwrap(); + assert_eq!(result, values::UnsignedInteger::from(15).into()); + } + + #[test] + fn mixed_positional_named_args() { + let result = test_run( + "let f = (a: std.types.UInt, b: std.types.UInt, c: std.types.UInt) -> std.types.UInt: a + b + c; in f(1u, 2u, c = 3u)", + ) + .unwrap(); + assert_eq!(result, values::UnsignedInteger::from(6).into()); + } + + #[test] + fn mixed_positional_named_args_reversed() { + let result = test_run( + "let f = (a: std.types.UInt, b: std.types.UInt, c: std.types.UInt) -> std.types.UInt: a + b + c; in f(1u, c = 3u, b = 2u)", + ) + .unwrap(); + assert_eq!(result, values::UnsignedInteger::from(6).into()); + } + + #[test] + fn closure_call_all_positional() { + let result = test_run( + "let f = (x: std.types.UInt, y: std.types.UInt) -> std.types.UInt: x * y; in f(3u, 4u)", + ) + .unwrap(); + assert_eq!(result, values::UnsignedInteger::from(12).into()); + } + + #[test] + fn closure_call_mixed_args() { + let result = test_run( + "let f = (x: std.types.UInt, y: std.types.UInt, z: std.types.UInt) -> std.types.UInt: x + y + z; in f(1u, z = 3u, y = 2u)", + ) + .unwrap(); + assert_eq!(result, values::UnsignedInteger::from(6).into()); + } } diff --git a/interpreter/src/execution/values/vector.rs b/interpreter/src/execution/values/vector.rs index 9cfa12f..3d0cecb 100644 --- a/interpreter/src/execution/values/vector.rs +++ b/interpreter/src/execution/values/vector.rs @@ -1,6 +1,6 @@ -use common_data_types::Dimension; +use common_data_types::{Dimension, RawFloat}; use enum_downcast::{AsVariant, IntoVariant}; -use nalgebra::{Dim, RawStorage}; +use nalgebra::{Dim, Matrix3, Matrix4, Point2, Point3, RawStorage}; use crate::{ build_closure_type, build_method, @@ -15,29 +15,38 @@ use crate::{ }, ExecutionContext, }, - values::scalar::ResultIsNan, + values::{scalar::ResultIsNan, transform::TransformInternalType}, }; use std::{ borrow::Cow, - hash::Hash, ops::{Add, Div, Mul, Neg, Sub}, }; -type Float = f64; +type Float = RawFloat; pub type Vector2 = Vector>; pub type Vector3 = Vector>; pub type Vector4 = Vector>; -#[derive(Debug, Hash, Clone, Copy, PartialEq)] +#[derive(Debug, Clone, Copy, PartialEq)] pub struct Vector { - dimension: Dimension, - value: I, + pub dimension: Dimension, + pub value: I, } impl Eq for Vector where I: PartialEq {} +impl std::hash::Hash for Vector +where + I: VectorInternalType, +{ + fn hash(&self, state: &mut H) { + self.dimension.hash(state); + self.value.hash(state); + } +} + impl Object for Vector where I: VectorInternalType, @@ -57,7 +66,7 @@ where ) -> std::fmt::Result { let mut components = self.value.iter().peekable(); - write!(f, "<(")?; + write!(f, "{{")?; while let Some(value) = components.next() { let c = Scalar { @@ -72,7 +81,7 @@ where } } - write!(f, ")>")?; + write!(f, "}}")?; Ok(()) } @@ -199,7 +208,7 @@ where I::from_ast(context, ast_node) } - fn new_raw( + pub fn new_raw( context: &ExecutionContext, dimension: Dimension, value: I, @@ -264,6 +273,7 @@ mod methods { use crate::{ build_method, execution::values::{BuiltinCallableDatabase, Dictionary}, + values::{transform::Transform, DowncastError}, }; pub trait MethodSet { @@ -277,6 +287,7 @@ mod methods { type Angle; type Map; type Fold; + type Transform; } macro_rules! build_method_set { @@ -292,6 +303,7 @@ mod methods { pub struct [<$name Angle>]; pub struct [<$name Map>]; pub struct [<$name Fold>]; + pub struct [<$name Transform>]; pub struct [<$name MethodSet>]; impl MethodSet for [<$name MethodSet>] { @@ -305,6 +317,7 @@ mod methods { type Angle = [<$name Angle>]; type Map = [<$name Map>]; type Fold = [<$name Fold>]; + type Transform = [<$name Transform>]; } } }; @@ -452,9 +465,9 @@ mod methods { this: Vector, f: MapClosure) -> Vector { - let operations: ArrayVec<[Value; 4]> = this.value.iter().map(|c| f.call(context, Dictionary::new(context, HashMap::from_iter([ + let operations: ArrayVec<[Value; 4]> = this.value.iter().map(|c| f.call(context, Dictionary::new(context, HashMap::<&str, Value>::from_iter([ ( - "c".into(), + "c", Scalar { dimension: this.dimension, value: common_data_types::Float::new(c).unwrap_not_nan(context)? @@ -488,16 +501,16 @@ mod methods { let mut accumulator = init; for component in this.value.iter() { - accumulator = f.call(context, Dictionary::new(context, HashMap::from_iter([ + accumulator = f.call(context, Dictionary::new(context, HashMap::<&str, Value>::from_iter([ ( - "c".into(), + "c", Scalar { dimension: this.dimension, value: common_data_types::Float::new(component).unwrap_not_nan(context)? }.into() ), ( - "previous".into(), + "previous", accumulator ) ])))?; @@ -507,11 +520,49 @@ mod methods { } ); } + pub fn register_transform_methods( + database: &mut BuiltinCallableDatabase, + dimension: usize, + ) where + I: VectorInternalType + TransformableVector, + Vector: StaticTypeName + Into, + Value: IntoVariant> + + AsVariant> + + IntoVariant> + + AsVariant>, + M: MethodSet + 'static, + { + build_method!( + database, + M::Transform, format!("Vector{dimension}::transform"), ( + context: &ExecutionContext, + this: Vector, + t: Transform) -> Vector + { + if this.dimension != Dimension::length() { + return Err(DowncastError{ expected: "Length vector".into(), got: this.type_name() }.to_error(context)); + } + + + let value = this.raw_value().transform(&t.0); + Ok(Vector { + dimension: Dimension::length(), + value, + }) + } + ); + } } pub fn register_methods(database: &mut BuiltinCallableDatabase) { methods::register_methods::, methods::Vector2MethodSet>(database, 2); + methods::register_transform_methods::, methods::Vector2MethodSet>( + database, 2, + ); methods::register_methods::, methods::Vector3MethodSet>(database, 3); + methods::register_transform_methods::, methods::Vector3MethodSet>( + database, 3, + ); methods::register_methods::, methods::Vector4MethodSet>(database, 4); build_method!( @@ -581,6 +632,8 @@ pub trait VectorInternalType: fn normalize(&self) -> Self; fn angle(&self, other: &Self) -> Float; fn iter(&self) -> impl Iterator; + + fn hash(&self, hasher: &mut impl std::hash::Hasher); } pub trait IsNan { @@ -598,6 +651,12 @@ where } } +trait TransformableVector: VectorInternalType { + type TransformInternalType: TransformInternalType; + + fn transform(&self, transform: &Self::TransformInternalType) -> Self; +} + #[derive(Debug, Eq, PartialEq)] pub struct MissmatchedComponentDimensionsError; @@ -673,6 +732,9 @@ impl VectorInternalType for nalgebra::Vector2 { } .into(), )), + "transform" => Ok(Some( + BuiltinFunction::new::().into(), + )), _ => Ok(None), } } @@ -712,7 +774,20 @@ impl VectorInternalType for nalgebra::Vector2 { fn iter(&self) -> impl Iterator { self.iter().copied() } + + fn hash(&self, hasher: &mut impl std::hash::Hasher) { + std::hash::Hash::hash(&(&self.x.to_le_bytes(), &self.y.to_le_bytes()), hasher) + } +} + +impl TransformableVector for nalgebra::Vector2 { + type TransformInternalType = Matrix3; + + fn transform(&self, transform: &Self::TransformInternalType) -> Self { + transform.transform_point(&Point2 { coords: *self }).coords + } } + impl StaticTypeName for nalgebra::Vector2 { fn static_type_name() -> Cow<'static, str> { "Vector2".into() @@ -725,15 +800,6 @@ impl StaticType for nalgebra::Vector2 { } } -impl From for boolmesh::Vec2 { - fn from(value: Vector2) -> Self { - Self { - x: value.value.x, - y: value.value.y, - } - } -} - impl VectorInternalType for nalgebra::Vector3 { type BuildFrom = [Float; 3]; type NodeType = compile::Vector3; @@ -801,6 +867,9 @@ impl VectorInternalType for nalgebra::Vector3 { .into(), )), "cross" => Ok(Some(BuiltinFunction::new::().into())), + "transform" => Ok(Some( + BuiltinFunction::new::().into(), + )), _ => Ok(None), } } @@ -840,7 +909,27 @@ impl VectorInternalType for nalgebra::Vector3 { fn iter(&self) -> impl Iterator { self.iter().copied() } + + fn hash(&self, hasher: &mut impl std::hash::Hasher) { + std::hash::Hash::hash( + &( + &self.x.to_le_bytes(), + &self.y.to_le_bytes(), + &self.z.to_le_bytes(), + ), + hasher, + ) + } +} + +impl TransformableVector for nalgebra::Vector3 { + type TransformInternalType = Matrix4; + + fn transform(&self, transform: &Self::TransformInternalType) -> Self { + transform.transform_point(&Point3 { coords: *self }).coords + } } + impl StaticTypeName for nalgebra::Vector3 { fn static_type_name() -> Cow<'static, str> { "Vector3".into() @@ -853,16 +942,6 @@ impl StaticType for nalgebra::Vector3 { } } -impl From for boolmesh::Vec3 { - fn from(value: Vector3) -> Self { - Self { - x: value.value.x, - y: value.value.y, - z: value.value.z, - } - } -} - impl VectorInternalType for nalgebra::Vector4 { type BuildFrom = [Float; 4]; type NodeType = compile::Vector4; @@ -975,6 +1054,18 @@ impl VectorInternalType for nalgebra::Vector4 { fn iter(&self) -> impl Iterator { self.iter().copied() } + + fn hash(&self, hasher: &mut impl std::hash::Hasher) { + std::hash::Hash::hash( + &( + &self.x.to_le_bytes(), + &self.y.to_le_bytes(), + &self.z.to_le_bytes(), + &self.w.to_le_bytes(), + ), + hasher, + ) + } } impl StaticTypeName for nalgebra::Vector4 { fn static_type_name() -> Cow<'static, str> { @@ -988,32 +1079,21 @@ impl StaticType for nalgebra::Vector4 { } } -impl From for boolmesh::Vec4 { - fn from(value: Vector4) -> Self { - Self { - x: value.value.x, - y: value.value.y, - z: value.value.z, - w: value.value.w, - } - } -} - macro_rules! equivalent_boolmesh_vector { (Vector2) => { - boolmesh::Vec2 + nalgebra::Vector2 }; (Vector3) => { - boolmesh::Vec3 + nalgebra::Vector3 }; (Vector4) => { - boolmesh::Vec4 + nalgebra::Vector4 }; } macro_rules! build_vector_type { ($name:ident: $type:tt = $dimension:expr) => { - pub struct $name($type); + pub struct $name(pub $type); impl StaticTypeName for $name { fn static_type_name() -> Cow<'static, str> { @@ -1041,7 +1121,7 @@ macro_rules! build_vector_type { impl From<$name> for equivalent_boolmesh_vector!($type) { fn from(value: $name) -> Self { - value.0.into() + value.raw_value() } } @@ -1055,7 +1135,8 @@ macro_rules! build_vector_type { }; } -build_vector_type!(Zero3: Vector3 = Dimension::length()); +build_vector_type!(Zero2: Vector2 = Dimension::zero()); +build_vector_type!(Zero3: Vector3 = Dimension::zero()); build_vector_type!(Length2: Vector2 = Dimension::length()); build_vector_type!(Length3: Vector3 = Dimension::length()); @@ -1069,7 +1150,7 @@ mod test { #[test] fn construct_vector2() { test_context([], |context| { - let product = test_run("<(1m, 2m)>").unwrap(); + let product = test_run("{1m, 2m}").unwrap(); assert_eq!( product, Vector2::new(context, Dimension::length(), [1.0, 2.0]) @@ -1077,7 +1158,7 @@ mod test { .into() ); - let product = test_run("<(-1m, -2m)>").unwrap(); + let product = test_run("{-1m, -2m}").unwrap(); assert_eq!( product, Vector2::new(context, Dimension::length(), [-1.0, -2.0]) @@ -1090,7 +1171,7 @@ mod test { #[test] fn construct_vector3() { test_context([], |context| { - let product = test_run("<(1m, 2m, 3m)>").unwrap(); + let product = test_run("{1m, 2m, 3m}").unwrap(); assert_eq!( product, Vector3::new(context, Dimension::length(), [1.0, 2.0, 3.0]) @@ -1098,7 +1179,7 @@ mod test { .into() ); - let product = test_run("<(-1m, -2m, -3m)>").unwrap(); + let product = test_run("{-1m, -2m, -3m}").unwrap(); assert_eq!( product, Vector3::new(context, Dimension::length(), [-1.0, -2.0, -3.0]) @@ -1111,7 +1192,7 @@ mod test { #[test] fn construct_vector4() { test_context([], |context| { - let product = test_run("<(1m, 2m, 3m, 4m)>").unwrap(); + let product = test_run("{1m, 2m, 3m, 4m}").unwrap(); assert_eq!( product, Vector4::new(context, Dimension::length(), [1.0, 2.0, 3.0, 4.0]) @@ -1119,7 +1200,7 @@ mod test { .into() ); - let product = test_run("<(-1m, -2m, -3m, -4m)>").unwrap(); + let product = test_run("{-1m, -2m, -3m, -4m}").unwrap(); assert_eq!( product, Vector4::new(context, Dimension::length(), [-1.0, -2.0, -3.0, -4.0]) @@ -1131,13 +1212,13 @@ mod test { #[test] fn missmatched_dimensions_vector2() { - let error = test_run("<(1deg, 2m)>").unwrap_err(); + let error = test_run("{1deg, 2m}").unwrap_err(); let error = error.ty.as_any(); error .downcast_ref::() .unwrap(); - let error = test_run("<(1m, 2deg)>").unwrap_err(); + let error = test_run("{1m, 2deg}").unwrap_err(); let error = error.ty.as_any(); error .downcast_ref::() @@ -1146,19 +1227,19 @@ mod test { #[test] fn missmatched_dimensions_vector3() { - let error = test_run("<(1deg, 2m, 3m)>").unwrap_err(); + let error = test_run("{1deg, 2m, 3m}").unwrap_err(); let error = error.ty.as_any(); error .downcast_ref::() .unwrap(); - let error = test_run("<(1m, 2deg, 3m)>").unwrap_err(); + let error = test_run("{1m, 2deg, 3m}").unwrap_err(); let error = error.ty.as_any(); error .downcast_ref::() .unwrap(); - let error = test_run("<(1m, 2m, 3deg)>").unwrap_err(); + let error = test_run("{1m, 2m, 3deg}").unwrap_err(); let error = error.ty.as_any(); error .downcast_ref::() @@ -1167,25 +1248,25 @@ mod test { #[test] fn missmatched_dimensions_vector4() { - let error = test_run("<(1deg, 2m, 3m, 4m)>").unwrap_err(); + let error = test_run("{1deg, 2m, 3m, 4m}").unwrap_err(); let error = error.ty.as_any(); error .downcast_ref::() .unwrap(); - let error = test_run("<(1m, 2deg, 3m, 4m)>").unwrap_err(); + let error = test_run("{1m, 2deg, 3m, 4m}").unwrap_err(); let error = error.ty.as_any(); error .downcast_ref::() .unwrap(); - let error = test_run("<(1m, 2m, 3deg, 4m)>").unwrap_err(); + let error = test_run("{1m, 2m, 3deg, 4m}").unwrap_err(); let error = error.ty.as_any(); error .downcast_ref::() .unwrap(); - let error = test_run("<(1m, 2m, 3m, 4deg)>").unwrap_err(); + let error = test_run("{1m, 2m, 3m, 4deg}").unwrap_err(); let error = error.ty.as_any(); error .downcast_ref::() @@ -1194,7 +1275,7 @@ mod test { #[test] fn construccomponent_access_vector2() { - let product = test_run("let vec = <(1m, 2m)>; in vec.x").unwrap(); + let product = test_run("let vec = {1m, 2m}; in vec.x").unwrap(); assert_eq!( product, Scalar { @@ -1204,7 +1285,7 @@ mod test { .into() ); - let product = test_run("let vec = <(1m, 2m)>; in vec.y").unwrap(); + let product = test_run("let vec = {1m, 2m}; in vec.y").unwrap(); assert_eq!( product, Scalar { @@ -1217,7 +1298,7 @@ mod test { #[test] fn construccomponent_access_vector3() { - let product = test_run("let vec = <(1m, 2m, 3m)>; in vec.x").unwrap(); + let product = test_run("let vec = {1m, 2m, 3m}; in vec.x").unwrap(); assert_eq!( product, Scalar { @@ -1227,7 +1308,7 @@ mod test { .into() ); - let product = test_run("let vec = <(1m, 2m, 3m)>; in vec.y").unwrap(); + let product = test_run("let vec = {1m, 2m, 3m}; in vec.y").unwrap(); assert_eq!( product, Scalar { @@ -1237,7 +1318,7 @@ mod test { .into() ); - let product = test_run("let vec = <(1m, 2m, 3m)>; in vec.z").unwrap(); + let product = test_run("let vec = {1m, 2m, 3m}; in vec.z").unwrap(); assert_eq!( product, Scalar { @@ -1250,7 +1331,7 @@ mod test { #[test] fn construccomponent_access_vector4() { - let product = test_run("let vec = <(1m, 2m, 3m, 4m)>; in vec.x").unwrap(); + let product = test_run("let vec = {1m, 2m, 3m, 4m}; in vec.x").unwrap(); assert_eq!( product, Scalar { @@ -1260,7 +1341,7 @@ mod test { .into() ); - let product = test_run("let vec = <(1m, 2m, 3m, 4m)>; in vec.y").unwrap(); + let product = test_run("let vec = {1m, 2m, 3m, 4m}; in vec.y").unwrap(); assert_eq!( product, Scalar { @@ -1270,7 +1351,7 @@ mod test { .into() ); - let product = test_run("let vec = <(1m, 2m, 3m, 4m)>; in vec.z").unwrap(); + let product = test_run("let vec = {1m, 2m, 3m, 4m}; in vec.z").unwrap(); assert_eq!( product, Scalar { @@ -1280,7 +1361,7 @@ mod test { .into() ); - let product = test_run("let vec = <(1m, 2m, 3m, 4m)>; in vec.w").unwrap(); + let product = test_run("let vec = {1m, 2m, 3m, 4m}; in vec.w").unwrap(); assert_eq!( product, Scalar { @@ -1293,309 +1374,310 @@ mod test { #[test] fn compare_vector2() { - let product = test_run("<(1m, 2m)> == <(1m, 2m)>").unwrap(); + let product = test_run("{1m, 2m} == {1m, 2m}").unwrap(); assert_eq!(product, Boolean(true).into()); - let product = test_run("<(1m, 2m)> != <(1m, 2m)>").unwrap(); + let product = test_run("{1m, 2m} != {1m, 2m}").unwrap(); assert_eq!(product, Boolean(false).into()); - let product = test_run("<(2m, 2m)> == <(1m, 2m)>").unwrap(); + let product = test_run("{2m, 2m} == {1m, 2m}").unwrap(); assert_eq!(product, Boolean(false).into()); - let product = test_run("<(2m, 2m)> != <(1m, 2m)>").unwrap(); + let product = test_run("{2m, 2m} != {1m, 2m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn compare_vector3() { - let product = test_run("<(1m, 2m, 3m)> == <(1m, 2m, 3m)>").unwrap(); + let product = test_run("{1m, 2m, 3m} == {1m, 2m, 3m}").unwrap(); assert_eq!(product, Boolean(true).into()); - let product = test_run("<(1m, 2m, 3m)> != <(1m, 2m, 3m)>").unwrap(); + let product = test_run("{1m, 2m, 3m} != {1m, 2m, 3m}").unwrap(); assert_eq!(product, Boolean(false).into()); - let product = test_run("<(2m, 2m, 3m)> == <(1m, 2m, 3m)>").unwrap(); + let product = test_run("{2m, 2m, 3m} == {1m, 2m, 3m}").unwrap(); assert_eq!(product, Boolean(false).into()); - let product = test_run("<(2m, 2m, 3m)> != <(1m, 2m, 3m)>").unwrap(); + let product = test_run("{2m, 2m, 3m} != {1m, 2m, 3m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn compare_vector4() { - let product = test_run("<(1m, 2m, 3m, 4m)> == <(1m, 2m, 3m, 4m)>").unwrap(); + let product = test_run("{1m, 2m, 3m, 4m} == {1m, 2m, 3m, 4m}").unwrap(); assert_eq!(product, Boolean(true).into()); - let product = test_run("<(1m, 2m, 3m, 4m)> != <(1m, 2m, 3m, 4m)>").unwrap(); + let product = test_run("{1m, 2m, 3m, 4m} != {1m, 2m, 3m, 4m}").unwrap(); assert_eq!(product, Boolean(false).into()); - let product = test_run("<(2m, 2m, 3m, 4m)> == <(1m, 2m, 3m, 4m)>").unwrap(); + let product = test_run("{2m, 2m, 3m, 4m} == {1m, 2m, 3m, 4m}").unwrap(); assert_eq!(product, Boolean(false).into()); - let product = test_run("<(2m, 2m, 3m, 4m)> != <(1m, 2m, 3m, 4m)>").unwrap(); + let product = test_run("{2m, 2m, 3m, 4m} != {1m, 2m, 3m, 4m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn add_vector2() { - let product = test_run("<(1m, 2m)> + <(2m, 3m)> == <(3m, 5m)>").unwrap(); + let product = test_run("{1m, 2m} + {2m, 3m} == {3m, 5m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn add_vector3() { - let product = test_run("<(1m, 2m, 3m)> + <(2m, 3m, 4m)> == <(3m, 5m, 7m)>").unwrap(); + let product = test_run("{1m, 2m, 3m} + {2m, 3m, 4m} == {3m, 5m, 7m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn add_vector4() { - let product = - test_run("<(1m, 2m, 3m, 4m)> + <(2m, 3m, 4m, 5m)> == <(3m, 5m, 7m, 9m)>").unwrap(); + let product = test_run("{1m, 2m, 3m, 4m} + {2m, 3m, 4m, 5m} == {3m, 5m, 7m, 9m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn sub_vector2() { - let product = test_run("<(1m, 2m)> - <(2m, 3m)> == <(-1m, -1m)>").unwrap(); + let product = test_run("{1m, 2m} - {2m, 3m} == {-1m, -1m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn sub_vector3() { - let product = test_run("<(1m, 2m, 3m)> - <(2m, 3m, 4m)> == <(-1m, -1m, -1m)>").unwrap(); + let product = test_run("{1m, 2m, 3m} - {2m, 3m, 4m} == {-1m, -1m, -1m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn sub_vector4() { let product = - test_run("<(1m, 2m, 3m, 4m)> - <(2m, 3m, 4m, 5m)> == <(-1m, -1m, -1m, -1m)>").unwrap(); + test_run("{1m, 2m, 3m, 4m} - {2m, 3m, 4m, 5m} == {-1m, -1m, -1m, -1m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn multiply_vector2() { - let product = test_run("<(1m, 2m)> * 2.0 == <(2m, 4m)>").unwrap(); + let product = test_run("{1m, 2m} * 2.0 == {2m, 4m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn multiply_vector3() { - let product = test_run("<(1m, 2m, 3m)> * 2.0 == <(2m, 4m, 6m)>").unwrap(); + let product = test_run("{1m, 2m, 3m} * 2.0 == {2m, 4m, 6m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn multiply_vector4() { - let product = test_run("<(1m, 2m, 3m, 4m)> * 2.0 == <(2m, 4m, 6m, 8m)>").unwrap(); + let product = test_run("{1m, 2m, 3m, 4m} * 2.0 == {2m, 4m, 6m, 8m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn divide_vector2() { - let product = test_run("<(2m, 4m)> / 2.0 == <(1m, 2m)>").unwrap(); + let product = test_run("{2m, 4m} / 2.0 == {1m, 2m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn divide_vector3() { - let product = test_run("<(2m, 4m, 6m)> / 2.0 == <(1m, 2m, 3m)>").unwrap(); + let product = test_run("{2m, 4m, 6m} / 2.0 == {1m, 2m, 3m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn divide_vector4() { - let product = test_run("<(2m, 4m, 6m, 8m)> / 2.0 == <(1m, 2m, 3m, 4m)>").unwrap(); + let product = test_run("{2m, 4m, 6m, 8m} / 2.0 == {1m, 2m, 3m, 4m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn abs_vector2() { - let product = test_run("<(-1m, -2m)>::abs() == <(1m, 2m)>").unwrap(); + let product = test_run("{-1m, -2m}::abs() == {1m, 2m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn abs_vector3() { - let product = test_run("<(-1m, -2m, -3m)>::abs() == <(1m, 2m, 3m)>").unwrap(); + let product = test_run("{-1m, -2m, -3m}::abs() == {1m, 2m, 3m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn abs_vector4() { - let product = test_run("<(-1m, -2m, -3m, -4m)>::abs() == <(1m, 2m, 3m, 4m)>").unwrap(); + let product = test_run("{-1m, -2m, -3m, -4m}::abs() == {1m, 2m, 3m, 4m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn add_scalar_vector2() { - let product = test_run("<(1m, 2m)>::add_scalar(value = 1m) == <(2m, 3m)>").unwrap(); + let product = test_run("{1m, 2m}::add_scalar(value = 1m) == {2m, 3m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn add_scalar_vector3() { - let product = test_run("<(1m, 2m, 3m)>::add_scalar(value = 1m) == <(2m, 3m, 4m)>").unwrap(); + let product = test_run("{1m, 2m, 3m}::add_scalar(value = 1m) == {2m, 3m, 4m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn add_scalar_vector4() { let product = - test_run("<(1m, 2m, 3m, 4m)>::add_scalar(value = 1m) == <(2m, 3m, 4m, 5m)>").unwrap(); + test_run("{1m, 2m, 3m, 4m}::add_scalar(value = 1m) == {2m, 3m, 4m, 5m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn amax_vector2() { - let product = test_run("<(1m, 2m)>::amax() == 2m").unwrap(); + let product = test_run("{1m, 2m}::amax() == 2m").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn amax_vector3() { - let product = test_run("<(1m, 2m, 3m)>::amax() == 3m").unwrap(); + let product = test_run("{1m, 2m, 3m}::amax() == 3m").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn amax_vector4() { - let product = test_run("<(1m, 2m, 3m, 4m)>::amax() == 4m").unwrap(); + let product = test_run("{1m, 2m, 3m, 4m}::amax() == 4m").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn dot_vector2() { - let product = test_run("<(1m, 0m)>::dot(rhs = <(0.5m, 10m)>) == 0.5m").unwrap(); + let product = test_run("{1m, 0m}::dot(rhs = {0.5m, 10m}) == 0.5m").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn dot_vector3() { - let product = test_run("<(1m, 0m, 0m)>::dot(rhs = <(0.5m, 10m, 10m)>) == 0.5m").unwrap(); + let product = test_run("{1m, 0m, 0m}::dot(rhs = {0.5m, 10m, 10m}) == 0.5m").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn dot_vector4() { let product = - test_run("<(1m, 0m, 0m, 0m)>::dot(rhs = <(0.5m, 10m, 10m, 10m)>) == 0.5m").unwrap(); + test_run("{1m, 0m, 0m, 0m}::dot(rhs = {0.5m, 10m, 10m, 10m}) == 0.5m").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn norm_vector2() { - let product = test_run("<(1m, 0m)>::norm() == 1m").unwrap(); + let product = test_run("{1m, 0m}::norm() == 1m").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn norm_vector3() { - let product = test_run("<(1m, 0m, 0m)>::norm() == 1m").unwrap(); + let product = test_run("{1m, 0m, 0m}::norm() == 1m").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn norm_vector4() { - let product = test_run("<(1m, 0m, 0m, 0m)>::norm() == 1m").unwrap(); + let product = test_run("{1m, 0m, 0m, 0m}::norm() == 1m").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn length_vector2() { - let product = test_run("<(1m, 0m)>::length() == 1m").unwrap(); + let product = test_run("{1m, 0m}::length() == 1m").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn length_vector3() { - let product = test_run("<(1m, 0m, 0m)>::length() == 1m").unwrap(); + let product = test_run("{1m, 0m, 0m}::length() == 1m").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn length_vector4() { - let product = test_run("<(1m, 0m, 0m, 0m)>::length() == 1m").unwrap(); + let product = test_run("{1m, 0m, 0m, 0m}::length() == 1m").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn normalize_vector2() { - let product = test_run("<(5m, 0m)>::normalize() == <(1, 0)>").unwrap(); + let product = test_run("{5m, 0m}::normalize() == {1, 0}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn normalize_vector3() { - let product = test_run("<(5m, 0m, 0m)>::normalize() == <(1, 0, 0)>").unwrap(); + let product = test_run("{5m, 0m, 0m}::normalize() == {1, 0, 0}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn normalize_vector4() { - let product = test_run("<(5m, 0m, 0m, 0m)>::normalize() == <(1, 0, 0, 0)>").unwrap(); + let product = test_run("{5m, 0m, 0m, 0m}::normalize() == {1, 0, 0, 0}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn normalize_zero_vector2() { - let error = test_run("<(0m, 0m)>::normalize()").unwrap_err(); + let error = test_run("{0m, 0m}::normalize()").unwrap_err(); let error = error.ty.as_any(); error.downcast_ref::().unwrap(); } #[test] fn normalize_zero_vector3() { - let error = test_run("<(0m, 0m, 0m)>::normalize()").unwrap_err(); + let error = test_run("{0m, 0m, 0m}::normalize()").unwrap_err(); let error = error.ty.as_any(); error.downcast_ref::().unwrap(); } #[test] fn normalize_zero_vector4() { - let error = test_run("<(0m, 0m, 0m, 0m)>::normalize()").unwrap_err(); + let error = test_run("{0m, 0m, 0m, 0m}::normalize()").unwrap_err(); let error = error.ty.as_any(); error.downcast_ref::().unwrap(); } #[test] fn cross_vector3() { - let product = - test_run("<(1m, 0m, 0m)>::cross(rhs = <(0m, 1m, 0m)>) == <(0m, 0m, 1m)>").unwrap(); + let product = test_run("{1m, 0m, 0m}::cross(rhs = {0m, 1m, 0m}) == {0m, 0m, 1m}").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn angle_vector2() { - let product = test_run("<(1m, 0m)>::angle(other = <(0m, 1m)>) - 90deg < 0.001deg").unwrap(); + let product = test_run("{1m, 0m}::angle(other = {0m, 1m}) - 90deg < 0.001deg").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn angle_vector3() { let product = - test_run("<(1m, 0m, 0m)>::angle(other = <(0m, 1m, 0m)>) - 90deg < 0.001deg").unwrap(); + test_run("{1m, 0m, 0m}::angle(other = {0m, 1m, 0m}) - 90deg < 0.001deg").unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn angle_vector4() { let product = - test_run("<(1m, 0m, 0m, 0m)>::angle(other = <(0m, 1m, 0m, 0m)>) - 90deg < 0.001deg") + test_run("{1m, 0m, 0m, 0m}::angle(other = {0m, 1m, 0m, 0m}) - 90deg < 0.001deg") .unwrap(); assert_eq!(product, Boolean(true).into()); } #[test] fn apply_vector2() { - let product = test_run("<(0m, 1m)>::apply(f = (c: std.scalar.Length) -> std.scalar.Length: c + 1m) == <(1m, 2m)>").unwrap(); + let product = test_run( + "{0m, 1m}::apply(f = (c: std.scalar.Length) -> std.scalar.Length: c + 1m) == {1m, 2m}", + ) + .unwrap(); assert_eq!(product, Boolean(true).into()); - let product = test_run("<(0m, 1m)>::apply(f = (c: std.scalar.Length) -> std.scalar.Area: c * 1m) == <(0 'm^2', 1 'm^2')>").unwrap(); + let product = test_run("{0m, 1m}::apply(f = (c: std.scalar.Length) -> std.scalar.Area: c * 1m) == {0 'm^2', 1 'm^2'}").unwrap(); assert_eq!(product, Boolean(true).into()); - let error = test_run("<(0m, 1m)>::apply(f = (c: std.scalar.Length) -> std.scalar.Any: if c == 0m then 1m else 1 'm^2')").unwrap_err(); + let error = test_run("{0m, 1m}::apply(f = (c: std.scalar.Length) -> std.scalar.Any: if c == 0m then 1m else 1 'm^2')").unwrap_err(); let error = error.ty.as_any(); error .downcast_ref::() @@ -1604,13 +1686,13 @@ mod test { #[test] fn apply_vector3() { - let product = test_run("<(0m, 1m, 2m)>::apply(f = (c: std.scalar.Length) -> std.scalar.Length: c + 1m) == <(1m, 2m, 3m)>").unwrap(); + let product = test_run("{0m, 1m, 2m}::apply(f = (c: std.scalar.Length) -> std.scalar.Length: c + 1m) == {1m, 2m, 3m}").unwrap(); assert_eq!(product, Boolean(true).into()); - let product = test_run("<(0m, 1m, 2m)>::apply(f = (c: std.scalar.Length) -> std.scalar.Area: c * 1m) == <(0 'm^2', 1 'm^2', 2 'm^2')>").unwrap(); + let product = test_run("{0m, 1m, 2m}::apply(f = (c: std.scalar.Length) -> std.scalar.Area: c * 1m) == {0 'm^2', 1 'm^2', 2 'm^2'}").unwrap(); assert_eq!(product, Boolean(true).into()); - let error =test_run("<(0m, 1m, 1m)>::apply(f = (c: std.scalar.Length) -> std.scalar.Any: if c == 0m then 1m else 1 'm^2')").unwrap_err(); + let error =test_run("{0m, 1m, 1m}::apply(f = (c: std.scalar.Length) -> std.scalar.Any: if c == 0m then 1m else 1 'm^2')").unwrap_err(); let error = error.ty.as_any(); error .downcast_ref::() @@ -1619,13 +1701,13 @@ mod test { #[test] fn apply_vector4() { - let product = test_run("<(0m, 1m, 2m, 3m)>::apply(f = (c: std.scalar.Length) -> std.scalar.Length: c + 1m) == <(1m, 2m, 3m, 4m)>").unwrap(); + let product = test_run("{0m, 1m, 2m, 3m}::apply(f = (c: std.scalar.Length) -> std.scalar.Length: c + 1m) == {1m, 2m, 3m, 4m}").unwrap(); assert_eq!(product, Boolean(true).into()); - let product = test_run("<(0m, 1m, 2m, 3m)>::apply(f = (c: std.scalar.Length) -> std.scalar.Area: c * 1m) == <(0 'm^2', 1 'm^2', 2 'm^2', 3 'm^2')>").unwrap(); + let product = test_run("{0m, 1m, 2m, 3m}::apply(f = (c: std.scalar.Length) -> std.scalar.Area: c * 1m) == {0 'm^2', 1 'm^2', 2 'm^2', 3 'm^2'}").unwrap(); assert_eq!(product, Boolean(true).into()); - let error = test_run("<(0m, 1m, 1m, 1m)>::apply(f = (c: std.scalar.Length) -> std.scalar.Any: if c == 0m then 1m else 1 'm^2')").unwrap_err(); + let error = test_run("{0m, 1m, 1m, 1m}::apply(f = (c: std.scalar.Length) -> std.scalar.Any: if c == 0m then 1m else 1 'm^2')").unwrap_err(); let error = error.ty.as_any(); error .downcast_ref::() @@ -1634,7 +1716,7 @@ mod test { #[test] fn fold_vector2() { - let product = test_run("<(1m, 2m)>::fold(init = 0m, f = (previous: std.scalar.Length, c: std.scalar.Length) -> std.scalar.Length: previous + c)").unwrap(); + let product = test_run("{1m, 2m}::fold(init = 0m, f = (previous: std.scalar.Length, c: std.scalar.Length) -> std.scalar.Length: previous + c)").unwrap(); assert_eq!( product, Scalar { @@ -1647,7 +1729,7 @@ mod test { #[test] fn fold_vector3() { - let product = test_run("<(1m, 2m, 3m)>::fold(init = 0m, f = (previous: std.scalar.Length, c: std.scalar.Length) -> std.scalar.Length: previous + c)").unwrap(); + let product = test_run("{1m, 2m, 3m}::fold(init = 0m, f = (previous: std.scalar.Length, c: std.scalar.Length) -> std.scalar.Length: previous + c)").unwrap(); assert_eq!( product, Scalar { @@ -1660,7 +1742,7 @@ mod test { #[test] fn fold_vector4() { - let product = test_run("<(1m, 2m, 3m, 4m)>::fold(init = 0m, f = (previous: std.scalar.Length, c: std.scalar.Length) -> std.scalar.Length: previous + c)").unwrap(); + let product = test_run("{1m, 2m, 3m, 4m}::fold(init = 0m, f = (previous: std.scalar.Length, c: std.scalar.Length) -> std.scalar.Length: previous + c)").unwrap(); assert_eq!( product, Scalar { @@ -1674,19 +1756,19 @@ mod test { #[test] fn format() { let product = test_run( - "\"{a} {b} {c:.2}\"::format(a = <(1, 2)>, b = <(1m, 2m)>, c = <(1.234, 2.345)>) == \"<(1, 2)> <(1m, 2m)> <(1.23, 2.34)>\"", + "\"{a} {b} {c:.2}\"::format(a = {1, 2}, b = {1m, 2m}, c = {1.234, 2.345}) == \"{1, 2} {1m, 2m} {1.23, 2.34}\"", ) .unwrap(); assert_eq!(product, Boolean(true).into()); let product = test_run( - "\"{a} {b} {c:.2}\"::format(a = <(1, 2, 3)>, b = <(1m, 2m, 3m)>, c = <(1.234, 2.345, 3.456)>) == \"<(1, 2, 3)> <(1m, 2m, 3m)> <(1.23, 2.34, 3.46)>\"", + "\"{a} {b} {c:.2}\"::format(a = {1, 2, 3}, b = {1m, 2m, 3m}, c = {1.234, 2.345, 3.456}) == \"{1, 2, 3} {1m, 2m, 3m} {1.23, 2.34, 3.46}\"", ) .unwrap(); assert_eq!(product, Boolean(true).into()); let product = test_run( - "\"{a} {b} {c:.2}\"::format(a = <(1, 2, 3, 4)>, b = <(1m, 2m, 3m, 4m)>, c = <(1.234, 2.345, 3.456, 4.567)>) == \"<(1, 2, 3, 4)> <(1m, 2m, 3m, 4m)> <(1.23, 2.34, 3.46, 4.57)>\"", + "\"{a} {b} {c:.2}\"::format(a = {1, 2, 3, 4}, b = {1m, 2m, 3m, 4m}, c = {1.234, 2.345, 3.456, 4.567}) == \"{1, 2, 3, 4} {1m, 2m, 3m, 4m} {1.23, 2.34, 3.46, 4.57}\"", ) .unwrap(); assert_eq!(product, Boolean(true).into()); diff --git a/interpreter/src/lib.rs b/interpreter/src/lib.rs index 9356ebc..0a9ed3b 100644 --- a/interpreter/src/lib.rs +++ b/interpreter/src/lib.rs @@ -22,8 +22,9 @@ pub mod execution; pub use compile::{compile, new_parser, Parser, SourceReference}; pub use execution::{ build_prelude, execute_expression, run_file, values, Error, ExecutionContext, - ExecutionFileCache, ExecutionResult, LogLevel, LogMessage, RuntimeLog, StackScope, StackTrace, - Store, + ExecutionFileCache, ExecutionResult, FsStore, LogLevel, LogMessage, RuntimeLog, StackScope, + StackTrace, Store, }; +pub use geo; pub use imstr::ImString; pub use tree_sitter::{Point as TextPoint, Range as TextRange}; diff --git a/tree-sitter-command-cad-model/grammar.js b/tree-sitter-command-cad-model/grammar.js index a8f9bf8..a5b54cc 100644 --- a/tree-sitter-command-cad-model/grammar.js +++ b/tree-sitter-command-cad-model/grammar.js @@ -116,9 +116,9 @@ module.exports = grammar({ _unit: $ => choice($.identifier, $.unit_quote), scalar: $ => prec.left(PREC.unit, seq($._float, field('unit', optional($._unit)))), - vector2: $ => seq('<(', field('x', $.expression), ',', field('y', $.expression), ')>'), - vector3: $ => seq('<(', field('x', $.expression), ',', field('y', $.expression), ',', field('z', $.expression), ')>'), - vector4: $ => seq('<(', field('x', $.expression), ',', field('y', $.expression), ',', field('z', $.expression), ',', field('w', $.expression), ')>'), + vector2: $ => seq('{', field('x', $.expression), ',', field('y', $.expression), '}'), + vector3: $ => seq('{', field('x', $.expression), ',', field('y', $.expression), ',', field('z', $.expression), '}'), + vector4: $ => seq('{', field('x', $.expression), ',', field('y', $.expression), ',', field('z', $.expression), ',', field('w', $.expression), '}'), true: $ => 'true', false: $ => 'false', @@ -175,7 +175,7 @@ module.exports = grammar({ declaration_type: $ => seq(':', $.expression), - parenthesis: $ => seq('(', $.expression, ')'), + parenthesis: $ => prec(1, seq('(', $.expression, ')')), list: $ => seq( '[', repeat(seq($.expression, ',')), @@ -197,15 +197,21 @@ module.exports = grammar({ ), ')')), - dictionary_member_assignment: $ => seq(field('name', $.identifier), '=', field('assignment', $.expression)), + dictionary_argument: $ => seq( + field('key', $.expression), + optional(seq('=', field('value', $.expression))), + ), dictionary_construction: $ => seq('(', - field('assignments', - optional(seq( - $.dictionary_member_assignment, - repeat(seq(',', $.dictionary_member_assignment)), - optional(',') - )), - ), + field('arguments', choice( + // Empty: () + seq(), + // With args - at least one comma required to distinguish from parenthesis + seq( + $.dictionary_argument, + repeat(seq(',', $.dictionary_argument)), + optional(','), + ), + )), ')' ), diff --git a/tree-sitter-command-cad-model/src/grammar.json b/tree-sitter-command-cad-model/src/grammar.json index f9cd538..9caa5f2 100644 --- a/tree-sitter-command-cad-model/src/grammar.json +++ b/tree-sitter-command-cad-model/src/grammar.json @@ -254,7 +254,7 @@ "members": [ { "type": "STRING", - "value": "<(" + "value": "{" }, { "type": "FIELD", @@ -278,7 +278,7 @@ }, { "type": "STRING", - "value": ")>" + "value": "}" } ] }, @@ -287,7 +287,7 @@ "members": [ { "type": "STRING", - "value": "<(" + "value": "{" }, { "type": "FIELD", @@ -323,7 +323,7 @@ }, { "type": "STRING", - "value": ")>" + "value": "}" } ] }, @@ -332,7 +332,7 @@ "members": [ { "type": "STRING", - "value": "<(" + "value": "{" }, { "type": "FIELD", @@ -380,7 +380,7 @@ }, { "type": "STRING", - "value": ")>" + "value": "}" } ] }, @@ -1427,21 +1427,25 @@ ] }, "parenthesis": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "SYMBOL", - "name": "expression" - }, - { - "type": "STRING", - "value": ")" - } - ] + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "STRING", + "value": ")" + } + ] + } }, "list": { "type": "SEQ", @@ -1635,28 +1639,41 @@ ] } }, - "dictionary_member_assignment": { + "dictionary_argument": { "type": "SEQ", "members": [ { "type": "FIELD", - "name": "name", + "name": "key", "content": { "type": "SYMBOL", - "name": "identifier" + "name": "expression" } }, { - "type": "STRING", - "value": "=" - }, - { - "type": "FIELD", - "name": "assignment", - "content": { - "type": "SYMBOL", - "name": "expression" - } + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] } ] }, @@ -1669,16 +1686,20 @@ }, { "type": "FIELD", - "name": "assignments", + "name": "arguments", "content": { "type": "CHOICE", "members": [ + { + "type": "SEQ", + "members": [] + }, { "type": "SEQ", "members": [ { "type": "SYMBOL", - "name": "dictionary_member_assignment" + "name": "dictionary_argument" }, { "type": "REPEAT", @@ -1691,7 +1712,7 @@ }, { "type": "SYMBOL", - "name": "dictionary_member_assignment" + "name": "dictionary_argument" } ] } @@ -1709,9 +1730,6 @@ ] } ] - }, - { - "type": "BLANK" } ] } diff --git a/tree-sitter-command-cad-model/src/node-types.json b/tree-sitter-command-cad-model/src/node-types.json index ce4d974..329b7f7 100644 --- a/tree-sitter-command-cad-model/src/node-types.json +++ b/tree-sitter-command-cad-model/src/node-types.json @@ -433,19 +433,25 @@ } }, { - "type": "dictionary_construction", + "type": "dictionary_argument", "named": true, "fields": { - "assignments": { - "multiple": true, - "required": false, + "key": { + "multiple": false, + "required": true, "types": [ { - "type": ",", - "named": false - }, + "type": "expression", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": false, + "types": [ { - "type": "dictionary_member_assignment", + "type": "expression", "named": true } ] @@ -453,25 +459,19 @@ } }, { - "type": "dictionary_member_assignment", + "type": "dictionary_construction", "named": true, "fields": { - "assignment": { - "multiple": false, - "required": true, + "arguments": { + "multiple": true, + "required": false, "types": [ { - "type": "expression", - "named": true - } - ] - }, - "name": { - "multiple": false, - "required": true, - "types": [ + "type": ",", + "named": false + }, { - "type": "identifier", + "type": "dictionary_argument", "named": true } ] @@ -1157,10 +1157,6 @@ "type": ")", "named": false }, - { - "type": ")>", - "named": false - }, { "type": "*", "named": false @@ -1209,10 +1205,6 @@ "type": "<", "named": false }, - { - "type": "<(", - "named": false - }, { "type": "<<", "named": false @@ -1318,6 +1310,10 @@ "type": "varadic_dots", "named": true }, + { + "type": "{", + "named": false + }, { "type": "|", "named": false @@ -1325,5 +1321,9 @@ { "type": "||", "named": false + }, + { + "type": "}", + "named": false } ] \ No newline at end of file diff --git a/tree-sitter-command-cad-model/src/parser.c b/tree-sitter-command-cad-model/src/parser.c index 919ee9f..1008ac9 100644 --- a/tree-sitter-command-cad-model/src/parser.c +++ b/tree-sitter-command-cad-model/src/parser.c @@ -7,16 +7,16 @@ #endif #define LANGUAGE_VERSION 15 -#define STATE_COUNT 322 -#define LARGE_STATE_COUNT 4 +#define STATE_COUNT 219 +#define LARGE_STATE_COUNT 3 #define SYMBOL_COUNT 105 #define ALIAS_COUNT 0 #define TOKEN_COUNT 58 #define EXTERNAL_TOKEN_COUNT 0 -#define FIELD_COUNT 32 +#define FIELD_COUNT 33 #define MAX_ALIAS_SEQUENCE_LENGTH 9 #define MAX_RESERVED_WORD_SET_SIZE 0 -#define PRODUCTION_ID_COUNT 30 +#define PRODUCTION_ID_COUNT 31 #define SUPERTYPE_COUNT 0 enum ts_symbol_identifiers { @@ -35,9 +35,9 @@ enum ts_symbol_identifiers { aux_sym_unsigned_integer_token1 = 13, sym_unit_quote = 14, anon_sym_DOT = 15, - anon_sym_LT_LPAREN = 16, + anon_sym_LBRACE = 16, anon_sym_COMMA = 17, - anon_sym_RPAREN_GT = 18, + anon_sym_RBRACE = 18, sym_true = 19, sym_false = 20, anon_sym_COLON_COLON = 21, @@ -108,7 +108,7 @@ enum ts_symbol_identifiers { sym_struct_member = 86, sym__struct_final_element = 87, sym_struct_definition = 88, - sym_dictionary_member_assignment = 89, + sym_dictionary_argument = 89, sym_dictionary_construction = 90, sym_closure_definition = 91, sym__constraint_set_relation = 92, @@ -143,9 +143,9 @@ static const char * const ts_symbol_names[] = { [aux_sym_unsigned_integer_token1] = "unsigned_integer_token1", [sym_unit_quote] = "unit_quote", [anon_sym_DOT] = ".", - [anon_sym_LT_LPAREN] = "<(", + [anon_sym_LBRACE] = "{", [anon_sym_COMMA] = ",", - [anon_sym_RPAREN_GT] = ")>", + [anon_sym_RBRACE] = "}", [sym_true] = "true", [sym_false] = "false", [anon_sym_COLON_COLON] = "::", @@ -216,7 +216,7 @@ static const char * const ts_symbol_names[] = { [sym_struct_member] = "struct_member", [sym__struct_final_element] = "_struct_final_element", [sym_struct_definition] = "struct_definition", - [sym_dictionary_member_assignment] = "dictionary_member_assignment", + [sym_dictionary_argument] = "dictionary_argument", [sym_dictionary_construction] = "dictionary_construction", [sym_closure_definition] = "closure_definition", [sym__constraint_set_relation] = "_constraint_set_relation", @@ -251,9 +251,9 @@ static const TSSymbol ts_symbol_map[] = { [aux_sym_unsigned_integer_token1] = aux_sym_unsigned_integer_token1, [sym_unit_quote] = sym_unit_quote, [anon_sym_DOT] = anon_sym_DOT, - [anon_sym_LT_LPAREN] = anon_sym_LT_LPAREN, + [anon_sym_LBRACE] = anon_sym_LBRACE, [anon_sym_COMMA] = anon_sym_COMMA, - [anon_sym_RPAREN_GT] = anon_sym_RPAREN_GT, + [anon_sym_RBRACE] = anon_sym_RBRACE, [sym_true] = sym_true, [sym_false] = sym_false, [anon_sym_COLON_COLON] = anon_sym_COLON_COLON, @@ -324,7 +324,7 @@ static const TSSymbol ts_symbol_map[] = { [sym_struct_member] = sym_struct_member, [sym__struct_final_element] = sym__struct_final_element, [sym_struct_definition] = sym_struct_definition, - [sym_dictionary_member_assignment] = sym_dictionary_member_assignment, + [sym_dictionary_argument] = sym_dictionary_argument, [sym_dictionary_construction] = sym_dictionary_construction, [sym_closure_definition] = sym_closure_definition, [sym__constraint_set_relation] = sym__constraint_set_relation, @@ -407,7 +407,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, - [anon_sym_LT_LPAREN] = { + [anon_sym_LBRACE] = { .visible = true, .named = false, }, @@ -415,7 +415,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, - [anon_sym_RPAREN_GT] = { + [anon_sym_RBRACE] = { .visible = true, .named = false, }, @@ -699,7 +699,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, - [sym_dictionary_member_assignment] = { + [sym_dictionary_argument] = { .visible = true, .named = true, }, @@ -768,8 +768,8 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { enum ts_field_identifiers { field_a = 1, field_argument = 2, - field_assignment = 3, - field_assignments = 4, + field_arguments = 3, + field_assignment = 4, field_b = 5, field_base = 6, field_condition = 7, @@ -778,34 +778,35 @@ enum ts_field_identifiers { field_final_element = 10, field_fractional = 11, field_ident = 12, - field_lhs = 13, - field_member = 14, - field_members = 15, - field_name = 16, - field_on_false = 17, - field_on_true = 18, - field_op = 19, - field_relation = 20, - field_result = 21, - field_rhs = 22, - field_self_dictionary = 23, - field_to_call = 24, - field_unit = 25, - field_value = 26, - field_variables = 27, - field_w = 28, - field_whole = 29, - field_x = 30, - field_y = 31, - field_z = 32, + field_key = 13, + field_lhs = 14, + field_member = 15, + field_members = 16, + field_name = 17, + field_on_false = 18, + field_on_true = 19, + field_op = 20, + field_relation = 21, + field_result = 22, + field_rhs = 23, + field_self_dictionary = 24, + field_to_call = 25, + field_unit = 26, + field_value = 27, + field_variables = 28, + field_w = 29, + field_whole = 30, + field_x = 31, + field_y = 32, + field_z = 33, }; static const char * const ts_field_names[] = { [0] = NULL, [field_a] = "a", [field_argument] = "argument", + [field_arguments] = "arguments", [field_assignment] = "assignment", - [field_assignments] = "assignments", [field_b] = "b", [field_base] = "base", [field_condition] = "condition", @@ -814,6 +815,7 @@ static const char * const ts_field_names[] = { [field_final_element] = "final_element", [field_fractional] = "fractional", [field_ident] = "ident", + [field_key] = "key", [field_lhs] = "lhs", [field_member] = "member", [field_members] = "members", @@ -841,31 +843,32 @@ static const TSMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { [2] = {.index = 1, .length = 2}, [3] = {.index = 3, .length = 1}, [4] = {.index = 4, .length = 1}, - [5] = {.index = 5, .length = 3}, - [6] = {.index = 8, .length = 2}, - [7] = {.index = 10, .length = 1}, + [5] = {.index = 5, .length = 1}, + [6] = {.index = 6, .length = 3}, + [7] = {.index = 9, .length = 2}, [8] = {.index = 11, .length = 1}, [9] = {.index = 12, .length = 1}, [10] = {.index = 13, .length = 1}, [11] = {.index = 14, .length = 1}, - [12] = {.index = 15, .length = 2}, - [13] = {.index = 17, .length = 2}, - [14] = {.index = 19, .length = 3}, - [15] = {.index = 22, .length = 2}, - [16] = {.index = 24, .length = 2}, - [17] = {.index = 26, .length = 2}, - [18] = {.index = 28, .length = 2}, - [19] = {.index = 30, .length = 3}, - [20] = {.index = 33, .length = 2}, - [21] = {.index = 35, .length = 2}, - [22] = {.index = 37, .length = 2}, - [23] = {.index = 39, .length = 3}, - [24] = {.index = 42, .length = 3}, - [25] = {.index = 45, .length = 3}, - [26] = {.index = 48, .length = 3}, - [27] = {.index = 51, .length = 4}, - [28] = {.index = 55, .length = 4}, - [29] = {.index = 59, .length = 3}, + [12] = {.index = 15, .length = 1}, + [13] = {.index = 16, .length = 2}, + [14] = {.index = 18, .length = 2}, + [15] = {.index = 20, .length = 3}, + [16] = {.index = 23, .length = 2}, + [17] = {.index = 25, .length = 2}, + [18] = {.index = 27, .length = 2}, + [19] = {.index = 29, .length = 2}, + [20] = {.index = 31, .length = 3}, + [21] = {.index = 34, .length = 2}, + [22] = {.index = 36, .length = 2}, + [23] = {.index = 38, .length = 2}, + [24] = {.index = 40, .length = 3}, + [25] = {.index = 43, .length = 3}, + [26] = {.index = 46, .length = 3}, + [27] = {.index = 49, .length = 3}, + [28] = {.index = 52, .length = 4}, + [29] = {.index = 56, .length = 4}, + [30] = {.index = 60, .length = 3}, }; static const TSFieldMapEntry ts_field_map_entries[] = { @@ -877,86 +880,88 @@ static const TSFieldMapEntry ts_field_map_entries[] = { [3] = {field_op, 0}, [4] = - {field_value, 0}, + {field_key, 0}, [5] = + {field_value, 0}, + [6] = {field_fractional, 0, .inherited = true}, {field_unit, 1}, {field_whole, 0, .inherited = true}, - [8] = + [9] = {field_argument, 1}, {field_to_call, 0}, - [10] = - {field_expression, 2}, [11] = - {field_name, 0}, + {field_expression, 2}, [12] = - {field_final_element, 1}, + {field_name, 0}, [13] = - {field_assignments, 1}, + {field_final_element, 1}, [14] = - {field_members, 1}, + {field_arguments, 1}, [15] = + {field_members, 1}, + [16] = {field_fractional, 2}, {field_whole, 0}, - [17] = + [18] = {field_base, 0}, {field_member, 2}, - [19] = + [20] = {field_a, 0}, {field_b, 2}, {field_op, 1}, - [22] = + [23] = {field_assignment, 1}, {field_expression, 3}, - [24] = - {field_assignment, 2}, - {field_name, 0}, - [26] = - {field_assignments, 1}, - {field_assignments, 2}, - [28] = + [25] = + {field_key, 0}, + {field_value, 2}, + [27] = + {field_arguments, 1}, + {field_arguments, 2}, + [29] = {field_final_element, 2}, {field_members, 1}, - [30] = + [31] = {field_argument, 3}, {field_self_dictionary, 0}, {field_to_call, 2}, - [33] = + [34] = {field_x, 1}, {field_y, 3}, - [35] = + [36] = {field_ident, 0}, {field_value, 2}, - [37] = + [38] = {field_default, 3}, {field_name, 0}, - [39] = - {field_assignments, 1}, - {field_assignments, 2}, - {field_assignments, 3}, - [42] = + [40] = + {field_arguments, 1}, + {field_arguments, 2}, + {field_arguments, 3}, + [43] = {field_argument, 0}, {field_expression, 4}, {field_result, 2}, - [45] = + [46] = {field_condition, 1}, {field_on_false, 5}, {field_on_true, 3}, - [48] = + [49] = {field_x, 1}, {field_y, 3}, {field_z, 5}, - [51] = + [52] = {field_lhs, 3}, {field_relation, 4}, {field_rhs, 5}, {field_variables, 1}, - [55] = + [56] = {field_w, 7}, {field_x, 1}, {field_y, 3}, {field_z, 5}, - [59] = + [60] = {field_argument, 4}, {field_self_dictionary, 0}, {field_to_call, 2}, @@ -974,19 +979,19 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [0] = 0, [1] = 1, [2] = 2, - [3] = 2, + [3] = 3, [4] = 4, [5] = 5, - [6] = 5, - [7] = 4, + [6] = 6, + [7] = 7, [8] = 8, [9] = 9, [10] = 10, - [11] = 11, + [11] = 10, [12] = 12, [13] = 13, [14] = 14, - [15] = 9, + [15] = 15, [16] = 16, [17] = 17, [18] = 18, @@ -1007,48 +1012,48 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [33] = 33, [34] = 34, [35] = 35, - [36] = 10, - [37] = 11, - [38] = 12, - [39] = 13, - [40] = 14, - [41] = 16, - [42] = 17, - [43] = 18, - [44] = 19, - [45] = 24, - [46] = 46, - [47] = 31, - [48] = 33, - [49] = 34, - [50] = 35, - [51] = 10, - [52] = 11, - [53] = 12, - [54] = 13, - [55] = 14, - [56] = 9, - [57] = 16, - [58] = 17, - [59] = 18, - [60] = 19, - [61] = 24, - [62] = 29, - [63] = 31, - [64] = 34, - [65] = 33, - [66] = 35, - [67] = 20, - [68] = 21, - [69] = 22, - [70] = 30, - [71] = 32, - [72] = 20, - [73] = 22, - [74] = 46, - [75] = 27, - [76] = 27, - [77] = 29, + [36] = 36, + [37] = 35, + [38] = 38, + [39] = 12, + [40] = 13, + [41] = 14, + [42] = 15, + [43] = 16, + [44] = 17, + [45] = 18, + [46] = 19, + [47] = 20, + [48] = 21, + [49] = 22, + [50] = 28, + [51] = 32, + [52] = 34, + [53] = 24, + [54] = 26, + [55] = 38, + [56] = 56, + [57] = 57, + [58] = 58, + [59] = 59, + [60] = 60, + [61] = 61, + [62] = 62, + [63] = 63, + [64] = 64, + [65] = 65, + [66] = 66, + [67] = 67, + [68] = 68, + [69] = 69, + [70] = 70, + [71] = 71, + [72] = 72, + [73] = 73, + [74] = 74, + [75] = 75, + [76] = 76, + [77] = 77, [78] = 78, [79] = 79, [80] = 80, @@ -1074,225 +1079,122 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [100] = 100, [101] = 101, [102] = 102, - [103] = 103, - [104] = 104, + [103] = 56, + [104] = 57, [105] = 105, [106] = 106, [107] = 107, [108] = 108, [109] = 109, [110] = 110, - [111] = 111, + [111] = 59, [112] = 112, [113] = 113, - [114] = 114, - [115] = 115, + [114] = 60, + [115] = 58, [116] = 116, [117] = 117, [118] = 118, [119] = 119, - [120] = 120, + [120] = 98, [121] = 121, [122] = 122, [123] = 123, - [124] = 79, - [125] = 78, - [126] = 79, - [127] = 127, - [128] = 81, - [129] = 80, - [130] = 78, - [131] = 131, - [132] = 82, - [133] = 133, - [134] = 98, - [135] = 99, - [136] = 100, - [137] = 101, - [138] = 102, - [139] = 104, - [140] = 140, - [141] = 80, - [142] = 114, - [143] = 115, - [144] = 133, - [145] = 112, - [146] = 122, - [147] = 147, - [148] = 83, - [149] = 97, - [150] = 150, + [124] = 72, + [125] = 74, + [126] = 75, + [127] = 76, + [128] = 77, + [129] = 78, + [130] = 79, + [131] = 80, + [132] = 81, + [133] = 82, + [134] = 83, + [135] = 135, + [136] = 136, + [137] = 117, + [138] = 90, + [139] = 91, + [140] = 100, + [141] = 135, + [142] = 123, + [143] = 97, + [144] = 144, + [145] = 60, + [146] = 59, + [147] = 57, + [148] = 148, + [149] = 149, + [150] = 148, [151] = 151, - [152] = 140, - [153] = 84, + [152] = 152, + [153] = 153, [154] = 154, - [155] = 85, - [156] = 82, - [157] = 81, - [158] = 86, - [159] = 87, - [160] = 116, - [161] = 154, - [162] = 92, - [163] = 94, - [164] = 95, - [165] = 96, - [166] = 150, - [167] = 167, - [168] = 120, - [169] = 121, - [170] = 110, + [155] = 155, + [156] = 156, + [157] = 157, + [158] = 58, + [159] = 157, + [160] = 156, + [161] = 161, + [162] = 162, + [163] = 163, + [164] = 63, + [165] = 165, + [166] = 166, + [167] = 165, + [168] = 166, + [169] = 169, + [170] = 170, [171] = 171, - [172] = 90, - [173] = 116, - [174] = 89, + [172] = 172, + [173] = 173, + [174] = 174, [175] = 175, - [176] = 93, - [177] = 123, - [178] = 178, - [179] = 91, - [180] = 92, - [181] = 94, - [182] = 95, - [183] = 96, - [184] = 97, - [185] = 98, - [186] = 99, - [187] = 100, - [188] = 101, - [189] = 102, - [190] = 103, - [191] = 104, - [192] = 105, - [193] = 167, - [194] = 107, - [195] = 108, + [176] = 176, + [177] = 176, + [178] = 175, + [179] = 179, + [180] = 180, + [181] = 181, + [182] = 182, + [183] = 183, + [184] = 184, + [185] = 185, + [186] = 186, + [187] = 187, + [188] = 188, + [189] = 189, + [190] = 190, + [191] = 191, + [192] = 192, + [193] = 193, + [194] = 194, + [195] = 195, [196] = 196, - [197] = 111, - [198] = 113, - [199] = 114, - [200] = 115, - [201] = 117, - [202] = 118, - [203] = 119, - [204] = 88, + [197] = 192, + [198] = 198, + [199] = 199, + [200] = 192, + [201] = 201, + [202] = 202, + [203] = 203, + [204] = 204, [205] = 205, [206] = 206, - [207] = 122, - [208] = 175, - [209] = 178, - [210] = 167, + [207] = 207, + [208] = 208, + [209] = 209, + [210] = 210, [211] = 211, - [212] = 178, - [213] = 211, - [214] = 109, - [215] = 106, - [216] = 112, + [212] = 212, + [213] = 213, + [214] = 214, + [215] = 215, + [216] = 216, [217] = 217, - [218] = 171, - [219] = 171, - [220] = 217, - [221] = 221, - [222] = 78, - [223] = 80, - [224] = 82, - [225] = 225, - [226] = 226, - [227] = 227, - [228] = 228, - [229] = 229, - [230] = 229, - [231] = 231, - [232] = 232, - [233] = 233, - [234] = 234, - [235] = 226, - [236] = 232, - [237] = 237, - [238] = 81, - [239] = 239, - [240] = 228, - [241] = 234, - [242] = 242, - [243] = 242, - [244] = 244, - [245] = 88, - [246] = 246, - [247] = 246, - [248] = 244, - [249] = 249, - [250] = 250, - [251] = 251, - [252] = 252, - [253] = 252, - [254] = 251, - [255] = 255, - [256] = 256, - [257] = 257, - [258] = 256, - [259] = 257, - [260] = 257, - [261] = 256, - [262] = 262, - [263] = 263, - [264] = 264, - [265] = 265, - [266] = 266, - [267] = 267, - [268] = 267, - [269] = 269, - [270] = 270, - [271] = 269, - [272] = 266, - [273] = 273, - [274] = 265, - [275] = 273, - [276] = 270, - [277] = 277, - [278] = 278, - [279] = 279, - [280] = 280, - [281] = 281, - [282] = 282, - [283] = 283, - [284] = 284, - [285] = 285, - [286] = 286, - [287] = 287, - [288] = 279, - [289] = 289, - [290] = 290, - [291] = 279, - [292] = 279, - [293] = 293, - [294] = 294, - [295] = 295, - [296] = 296, - [297] = 281, - [298] = 295, - [299] = 299, - [300] = 300, - [301] = 301, - [302] = 302, - [303] = 303, - [304] = 304, - [305] = 305, - [306] = 306, - [307] = 307, - [308] = 308, - [309] = 302, - [310] = 310, - [311] = 311, - [312] = 312, - [313] = 313, - [314] = 310, - [315] = 300, - [316] = 312, - [317] = 317, - [318] = 318, - [319] = 319, - [320] = 301, - [321] = 321, + [218] = 218, }; static bool ts_lex(TSLexer *lexer, TSStateId state) { @@ -1300,580 +1202,556 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { eof = lexer->eof(lexer); switch (state) { case 0: - if (eof) ADVANCE(23); + if (eof) ADVANCE(21); ADVANCE_MAP( - '!', 54, - '"', 5, - '#', 24, - '&', 62, - '\'', 7, - '(', 82, - ')', 83, - '*', 57, - '+', 52, - ',', 47, - '-', 51, - '.', 45, - '/', 58, - '0', 33, - '1', 35, - ':', 81, - ';', 80, - '<', 72, - '=', 79, - '>', 66, - '[', 84, - ']', 85, - '^', 64, - 't', 28, - '|', 63, + '!', 52, + '"', 4, + '#', 22, + '&', 60, + '\'', 6, + '(', 80, + ')', 81, + '*', 55, + '+', 50, + ',', 45, + '-', 49, + '.', 43, + '/', 56, + '0', 31, + '1', 33, + ':', 79, + ';', 78, + '<', 70, + '=', 77, + '>', 64, + '[', 82, + ']', 83, + '^', 62, + 't', 26, + '{', 44, + '|', 61, + '}', 46, ); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(25); - if (('2' <= lookahead && lookahead <= '9')) ADVANCE(36); + lookahead == ' ') ADVANCE(23); + if (('2' <= lookahead && lookahead <= '9')) ADVANCE(34); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(30); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(28); END_STATE(); case 1: ADVANCE_MAP( - '!', 53, - '"', 5, - '#', 24, - '(', 82, - ')', 83, - '*', 56, - '+', 52, - '-', 50, - '.', 10, - '/', 58, - '0', 34, - ':', 12, - '<', 9, - '>', 18, - '[', 84, - ']', 85, + '!', 51, + '"', 4, + '#', 22, + '(', 80, + ')', 81, + '*', 54, + '+', 50, + '-', 48, + '.', 8, + '/', 56, + '0', 32, + ':', 10, + '<', 12, + '>', 16, + '[', 82, + ']', 83, + '{', 44, ); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(25); - if (('1' <= lookahead && lookahead <= '9')) ADVANCE(36); + lookahead == ' ') ADVANCE(23); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(34); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(30); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(28); END_STATE(); case 2: ADVANCE_MAP( - '!', 14, - '#', 24, - '&', 62, - '\'', 7, - '(', 82, - ')', 17, - '*', 57, - '+', 52, - ',', 47, - '-', 51, - '.', 44, - '/', 58, - ':', 12, - '<', 72, - '=', 15, - '>', 67, - '^', 64, - '|', 63, + '!', 13, + '#', 22, + '\'', 6, + '*', 54, + '+', 50, + '-', 48, + '.', 42, + '/', 56, + ':', 10, + '<', 71, + '=', 14, + '>', 63, ); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(25); + lookahead == ' ') ADVANCE(23); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(30); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(28); END_STATE(); case 3: ADVANCE_MAP( - '!', 14, - '#', 24, - '\'', 7, - '*', 56, - '+', 52, - '-', 50, - '.', 44, - '/', 58, - ':', 12, - '<', 73, - '=', 15, - '>', 65, - ); - if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(25); - if (('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(30); - END_STATE(); - case 4: - ADVANCE_MAP( - '!', 14, - '#', 24, - ')', 83, - '*', 56, - '+', 52, - '-', 50, - '/', 58, - ':', 12, - '<', 73, - '=', 15, - '>', 68, + '!', 13, + '#', 22, + ')', 81, + '*', 54, + '+', 50, + '-', 48, + '/', 56, + ':', 10, + '<', 71, + '=', 14, + '>', 66, ); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(25); + lookahead == ' ') ADVANCE(23); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(39); + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(37); + END_STATE(); + case 4: + if (lookahead == '"') ADVANCE(29); + if (lookahead == '\\') ADVANCE(5); + if (lookahead != 0) ADVANCE(4); END_STATE(); case 5: - if (lookahead == '"') ADVANCE(31); - if (lookahead == '\\') ADVANCE(6); - if (lookahead != 0) ADVANCE(5); + if (lookahead == '"') ADVANCE(30); + if (lookahead == '\\') ADVANCE(5); + if (lookahead != 0) ADVANCE(4); END_STATE(); case 6: - if (lookahead == '"') ADVANCE(32); - if (lookahead == '\\') ADVANCE(6); - if (lookahead != 0) ADVANCE(5); + if (lookahead == '\'') ADVANCE(40); + if (lookahead == '\\') ADVANCE(7); + if (lookahead != 0) ADVANCE(6); END_STATE(); case 7: - if (lookahead == '\'') ADVANCE(42); - if (lookahead == '\\') ADVANCE(8); - if (lookahead != 0) ADVANCE(7); + if (lookahead == '\'') ADVANCE(41); + if (lookahead == '\\') ADVANCE(7); + if (lookahead != 0) ADVANCE(6); END_STATE(); case 8: - if (lookahead == '\'') ADVANCE(43); - if (lookahead == '\\') ADVANCE(8); - if (lookahead != 0) ADVANCE(7); + if (lookahead == '.') ADVANCE(9); END_STATE(); case 9: - if (lookahead == '(') ADVANCE(46); - if (lookahead == '<') ADVANCE(13); + if (lookahead == '.') ADVANCE(84); END_STATE(); case 10: - if (lookahead == '.') ADVANCE(11); + if (lookahead == ':') ADVANCE(47); END_STATE(); case 11: - if (lookahead == '.') ADVANCE(86); + if (lookahead == '<') ADVANCE(86); END_STATE(); case 12: - if (lookahead == ':') ADVANCE(49); + if (lookahead == '<') ADVANCE(11); END_STATE(); case 13: - if (lookahead == '<') ADVANCE(88); + if (lookahead == '=') ADVANCE(72); END_STATE(); case 14: - if (lookahead == '=') ADVANCE(74); + if (lookahead == '=') ADVANCE(68); END_STATE(); case 15: - if (lookahead == '=') ADVANCE(70); + if (lookahead == '>') ADVANCE(87); END_STATE(); case 16: - if (lookahead == '>') ADVANCE(89); + if (lookahead == '>') ADVANCE(15); END_STATE(); case 17: - if (lookahead == '>') ADVANCE(48); - END_STATE(); - case 18: - if (lookahead == '>') ADVANCE(16); - END_STATE(); - case 19: - if (eof) ADVANCE(23); + if (eof) ADVANCE(21); ADVANCE_MAP( - '!', 14, - '#', 24, - '&', 62, - '\'', 7, - '(', 82, - ')', 83, - '*', 57, - '+', 52, - ',', 47, - '-', 51, - '.', 44, - '/', 58, - ':', 81, - ';', 80, - '<', 72, - '=', 79, - '>', 67, - ']', 85, - '^', 64, - 't', 28, - '|', 63, + '!', 13, + '#', 22, + '&', 60, + '\'', 6, + '(', 80, + ')', 81, + '*', 55, + '+', 50, + ',', 45, + '-', 49, + '.', 42, + '/', 56, + ':', 79, + ';', 78, + '<', 70, + '=', 77, + '>', 65, + ']', 83, + '^', 62, + 't', 26, + '|', 61, + '}', 46, ); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(25); + lookahead == ' ') ADVANCE(23); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(30); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(28); END_STATE(); - case 20: - if (eof) ADVANCE(23); + case 18: + if (eof) ADVANCE(21); ADVANCE_MAP( - '!', 14, - '#', 24, - '&', 62, - '\'', 7, - '(', 82, - ')', 83, - '*', 57, - '+', 52, - ',', 47, - '-', 51, - '.', 44, - '/', 58, - ':', 81, - ';', 80, - '<', 72, - '=', 79, - '>', 67, - ']', 85, - '^', 64, - '|', 63, - '0', 41, - '1', 41, + '!', 13, + '#', 22, + '&', 60, + '\'', 6, + '(', 80, + ')', 81, + '*', 55, + '+', 50, + ',', 45, + '-', 49, + '.', 42, + '/', 56, + ':', 79, + ';', 78, + '<', 70, + '=', 77, + '>', 65, + ']', 83, + '^', 62, + '|', 61, + '}', 46, ); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(25); + lookahead == ' ') ADVANCE(23); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(34); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(30); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(28); END_STATE(); - case 21: - if (eof) ADVANCE(23); + case 19: + if (eof) ADVANCE(21); ADVANCE_MAP( - '!', 14, - '#', 24, - '&', 62, - '\'', 7, - '(', 82, - ')', 83, - '*', 57, - '+', 52, - ',', 47, - '-', 50, - '.', 44, - '/', 58, - ':', 81, - ';', 80, - '<', 72, - '=', 79, - '>', 66, - ']', 85, - '^', 64, - '|', 63, + '!', 13, + '#', 22, + '&', 60, + '\'', 6, + '(', 80, + ')', 81, + '*', 55, + '+', 50, + ',', 45, + '-', 48, + '.', 42, + '/', 56, + ':', 79, + ';', 78, + '<', 70, + '=', 77, + '>', 64, + ']', 83, + '^', 62, + '|', 61, + '}', 46, + '0', 39, + '1', 39, ); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(25); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(36); + lookahead == ' ') ADVANCE(23); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(30); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(28); END_STATE(); - case 22: - if (eof) ADVANCE(23); + case 20: + if (eof) ADVANCE(21); ADVANCE_MAP( - '!', 14, - '#', 24, - '&', 62, - '(', 82, - ')', 83, - '*', 57, - '+', 52, - ',', 47, - '-', 50, - '.', 44, - '/', 58, - ':', 81, - ';', 80, - '<', 72, - '=', 79, - '>', 66, - ']', 85, - '^', 64, - 't', 28, - '|', 63, + '!', 13, + '#', 22, + '&', 60, + '(', 80, + ')', 81, + '*', 55, + '+', 50, + ',', 45, + '-', 48, + '.', 42, + '/', 56, + ':', 79, + ';', 78, + '<', 70, + '=', 77, + '>', 64, + ']', 83, + '^', 62, + 't', 26, + '|', 61, + '}', 46, ); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(25); + lookahead == ' ') ADVANCE(23); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(30); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(28); END_STATE(); - case 23: + case 21: ACCEPT_TOKEN(ts_builtin_sym_end); END_STATE(); - case 24: + case 22: ACCEPT_TOKEN(sym_comment); if (lookahead != 0 && - lookahead != '\n') ADVANCE(24); + lookahead != '\n') ADVANCE(22); END_STATE(); - case 25: + case 23: ACCEPT_TOKEN(sym__whitespace); END_STATE(); - case 26: + case 24: ACCEPT_TOKEN(sym_identifier); - if (lookahead == ' ') ADVANCE(78); + if (lookahead == ' ') ADVANCE(76); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(30); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(28); END_STATE(); - case 27: + case 25: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'e') ADVANCE(29); + if (lookahead == 'e') ADVANCE(27); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(30); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(28); END_STATE(); - case 28: + case 26: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'h') ADVANCE(27); + if (lookahead == 'h') ADVANCE(25); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(30); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(28); END_STATE(); - case 29: + case 27: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'n') ADVANCE(26); + if (lookahead == 'n') ADVANCE(24); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(30); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(28); END_STATE(); - case 30: + case 28: ACCEPT_TOKEN(sym_identifier); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(30); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(28); END_STATE(); - case 31: + case 29: ACCEPT_TOKEN(sym_string); END_STATE(); - case 32: + case 30: ACCEPT_TOKEN(sym_string); - if (lookahead == '"') ADVANCE(31); - if (lookahead == '\\') ADVANCE(6); - if (lookahead != 0) ADVANCE(5); + if (lookahead == '"') ADVANCE(29); + if (lookahead == '\\') ADVANCE(5); + if (lookahead != 0) ADVANCE(4); END_STATE(); - case 33: + case 31: ACCEPT_TOKEN(aux_sym_base_ten_token1); - if (lookahead == 'b') ADVANCE(40); - if (lookahead == 'o') ADVANCE(37); - if (lookahead == 'x') ADVANCE(38); + if (lookahead == 'b') ADVANCE(38); + if (lookahead == 'o') ADVANCE(35); + if (lookahead == 'x') ADVANCE(36); if (lookahead == '0' || - lookahead == '1') ADVANCE(35); - if (('2' <= lookahead && lookahead <= '9')) ADVANCE(36); + lookahead == '1') ADVANCE(33); + if (('2' <= lookahead && lookahead <= '9')) ADVANCE(34); END_STATE(); - case 34: + case 32: ACCEPT_TOKEN(aux_sym_base_ten_token1); - if (lookahead == 'b') ADVANCE(40); - if (lookahead == 'o') ADVANCE(37); - if (lookahead == 'x') ADVANCE(38); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(36); + if (lookahead == 'b') ADVANCE(38); + if (lookahead == 'o') ADVANCE(35); + if (lookahead == 'x') ADVANCE(36); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(34); END_STATE(); - case 35: + case 33: ACCEPT_TOKEN(aux_sym_base_ten_token1); if (lookahead == '0' || - lookahead == '1') ADVANCE(35); - if (('2' <= lookahead && lookahead <= '9')) ADVANCE(36); + lookahead == '1') ADVANCE(33); + if (('2' <= lookahead && lookahead <= '9')) ADVANCE(34); END_STATE(); - case 36: + case 34: ACCEPT_TOKEN(aux_sym_base_ten_token1); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(36); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(34); END_STATE(); - case 37: + case 35: ACCEPT_TOKEN(aux_sym_octal_token1); END_STATE(); - case 38: + case 36: ACCEPT_TOKEN(aux_sym_hex_token1); END_STATE(); - case 39: + case 37: ACCEPT_TOKEN(aux_sym_hex_token2); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(39); + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(37); END_STATE(); - case 40: + case 38: ACCEPT_TOKEN(aux_sym_binary_token1); END_STATE(); - case 41: + case 39: ACCEPT_TOKEN(aux_sym_binary_token2); if (lookahead == '0' || - lookahead == '1') ADVANCE(41); + lookahead == '1') ADVANCE(39); END_STATE(); - case 42: + case 40: ACCEPT_TOKEN(sym_unit_quote); END_STATE(); - case 43: + case 41: ACCEPT_TOKEN(sym_unit_quote); - if (lookahead == '\'') ADVANCE(42); - if (lookahead == '\\') ADVANCE(8); - if (lookahead != 0) ADVANCE(7); + if (lookahead == '\'') ADVANCE(40); + if (lookahead == '\\') ADVANCE(7); + if (lookahead != 0) ADVANCE(6); END_STATE(); - case 44: + case 42: ACCEPT_TOKEN(anon_sym_DOT); END_STATE(); - case 45: + case 43: ACCEPT_TOKEN(anon_sym_DOT); - if (lookahead == '.') ADVANCE(11); + if (lookahead == '.') ADVANCE(9); + END_STATE(); + case 44: + ACCEPT_TOKEN(anon_sym_LBRACE); + END_STATE(); + case 45: + ACCEPT_TOKEN(anon_sym_COMMA); END_STATE(); case 46: - ACCEPT_TOKEN(anon_sym_LT_LPAREN); + ACCEPT_TOKEN(anon_sym_RBRACE); END_STATE(); case 47: - ACCEPT_TOKEN(anon_sym_COMMA); + ACCEPT_TOKEN(anon_sym_COLON_COLON); END_STATE(); case 48: - ACCEPT_TOKEN(anon_sym_RPAREN_GT); + ACCEPT_TOKEN(anon_sym_DASH); END_STATE(); case 49: - ACCEPT_TOKEN(anon_sym_COLON_COLON); + ACCEPT_TOKEN(anon_sym_DASH); + if (lookahead == '>') ADVANCE(85); END_STATE(); case 50: - ACCEPT_TOKEN(anon_sym_DASH); + ACCEPT_TOKEN(anon_sym_PLUS); END_STATE(); case 51: - ACCEPT_TOKEN(anon_sym_DASH); - if (lookahead == '>') ADVANCE(87); + ACCEPT_TOKEN(anon_sym_BANG); END_STATE(); case 52: - ACCEPT_TOKEN(anon_sym_PLUS); + ACCEPT_TOKEN(anon_sym_BANG); + if (lookahead == '=') ADVANCE(72); END_STATE(); case 53: - ACCEPT_TOKEN(anon_sym_BANG); + ACCEPT_TOKEN(anon_sym_STAR_STAR); END_STATE(); case 54: - ACCEPT_TOKEN(anon_sym_BANG); - if (lookahead == '=') ADVANCE(74); + ACCEPT_TOKEN(anon_sym_STAR); END_STATE(); case 55: - ACCEPT_TOKEN(anon_sym_STAR_STAR); + ACCEPT_TOKEN(anon_sym_STAR); + if (lookahead == '*') ADVANCE(53); END_STATE(); case 56: - ACCEPT_TOKEN(anon_sym_STAR); + ACCEPT_TOKEN(anon_sym_SLASH); END_STATE(); case 57: - ACCEPT_TOKEN(anon_sym_STAR); - if (lookahead == '*') ADVANCE(55); + ACCEPT_TOKEN(anon_sym_LT_LT); END_STATE(); case 58: - ACCEPT_TOKEN(anon_sym_SLASH); + ACCEPT_TOKEN(anon_sym_GT_GT); END_STATE(); case 59: - ACCEPT_TOKEN(anon_sym_LT_LT); + ACCEPT_TOKEN(anon_sym_GT_GT); + if (lookahead == '>') ADVANCE(87); END_STATE(); case 60: - ACCEPT_TOKEN(anon_sym_GT_GT); + ACCEPT_TOKEN(anon_sym_AMP); + if (lookahead == '&') ADVANCE(73); END_STATE(); case 61: - ACCEPT_TOKEN(anon_sym_GT_GT); - if (lookahead == '>') ADVANCE(89); + ACCEPT_TOKEN(anon_sym_PIPE); + if (lookahead == '|') ADVANCE(74); END_STATE(); case 62: - ACCEPT_TOKEN(anon_sym_AMP); - if (lookahead == '&') ADVANCE(75); + ACCEPT_TOKEN(anon_sym_CARET); + if (lookahead == '^') ADVANCE(75); END_STATE(); case 63: - ACCEPT_TOKEN(anon_sym_PIPE); - if (lookahead == '|') ADVANCE(76); + ACCEPT_TOKEN(anon_sym_GT); + if (lookahead == '=') ADVANCE(67); END_STATE(); case 64: - ACCEPT_TOKEN(anon_sym_CARET); - if (lookahead == '^') ADVANCE(77); + ACCEPT_TOKEN(anon_sym_GT); + if (lookahead == '=') ADVANCE(67); + if (lookahead == '>') ADVANCE(59); END_STATE(); case 65: ACCEPT_TOKEN(anon_sym_GT); - if (lookahead == '=') ADVANCE(69); + if (lookahead == '=') ADVANCE(67); + if (lookahead == '>') ADVANCE(58); END_STATE(); case 66: ACCEPT_TOKEN(anon_sym_GT); - if (lookahead == '=') ADVANCE(69); - if (lookahead == '>') ADVANCE(61); + if (lookahead == '=') ADVANCE(67); + if (lookahead == '>') ADVANCE(15); END_STATE(); case 67: - ACCEPT_TOKEN(anon_sym_GT); - if (lookahead == '=') ADVANCE(69); - if (lookahead == '>') ADVANCE(60); - END_STATE(); - case 68: - ACCEPT_TOKEN(anon_sym_GT); - if (lookahead == '=') ADVANCE(69); - if (lookahead == '>') ADVANCE(16); - END_STATE(); - case 69: ACCEPT_TOKEN(anon_sym_GT_EQ); END_STATE(); - case 70: + case 68: ACCEPT_TOKEN(anon_sym_EQ_EQ); END_STATE(); - case 71: + case 69: ACCEPT_TOKEN(anon_sym_LT_EQ); END_STATE(); - case 72: + case 70: ACCEPT_TOKEN(anon_sym_LT); - if (lookahead == '<') ADVANCE(59); - if (lookahead == '=') ADVANCE(71); + if (lookahead == '<') ADVANCE(57); + if (lookahead == '=') ADVANCE(69); END_STATE(); - case 73: + case 71: ACCEPT_TOKEN(anon_sym_LT); - if (lookahead == '=') ADVANCE(71); + if (lookahead == '=') ADVANCE(69); END_STATE(); - case 74: + case 72: ACCEPT_TOKEN(anon_sym_BANG_EQ); END_STATE(); - case 75: + case 73: ACCEPT_TOKEN(anon_sym_AMP_AMP); END_STATE(); - case 76: + case 74: ACCEPT_TOKEN(anon_sym_PIPE_PIPE); END_STATE(); - case 77: + case 75: ACCEPT_TOKEN(anon_sym_CARET_CARET); END_STATE(); - case 78: + case 76: ACCEPT_TOKEN(anon_sym_then); END_STATE(); - case 79: + case 77: ACCEPT_TOKEN(anon_sym_EQ); - if (lookahead == '=') ADVANCE(70); + if (lookahead == '=') ADVANCE(68); END_STATE(); - case 80: + case 78: ACCEPT_TOKEN(anon_sym_SEMI); END_STATE(); - case 81: + case 79: ACCEPT_TOKEN(anon_sym_COLON); - if (lookahead == ':') ADVANCE(49); + if (lookahead == ':') ADVANCE(47); END_STATE(); - case 82: + case 80: ACCEPT_TOKEN(anon_sym_LPAREN); END_STATE(); - case 83: + case 81: ACCEPT_TOKEN(anon_sym_RPAREN); END_STATE(); - case 84: + case 82: ACCEPT_TOKEN(anon_sym_LBRACK); END_STATE(); - case 85: + case 83: ACCEPT_TOKEN(anon_sym_RBRACK); END_STATE(); - case 86: + case 84: ACCEPT_TOKEN(sym_varadic_dots); END_STATE(); - case 87: + case 85: ACCEPT_TOKEN(anon_sym_DASH_GT); END_STATE(); - case 88: + case 86: ACCEPT_TOKEN(anon_sym_LT_LT_LT); END_STATE(); - case 89: + case 87: ACCEPT_TOKEN(anon_sym_GT_GT_GT); END_STATE(); default: @@ -2037,272 +1915,169 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [53] = {.lex_state = 1}, [54] = {.lex_state = 1}, [55] = {.lex_state = 1}, - [56] = {.lex_state = 1}, - [57] = {.lex_state = 1}, - [58] = {.lex_state = 1}, - [59] = {.lex_state = 1}, - [60] = {.lex_state = 1}, - [61] = {.lex_state = 1}, - [62] = {.lex_state = 1}, - [63] = {.lex_state = 1}, - [64] = {.lex_state = 1}, - [65] = {.lex_state = 1}, - [66] = {.lex_state = 1}, - [67] = {.lex_state = 1}, - [68] = {.lex_state = 1}, - [69] = {.lex_state = 1}, - [70] = {.lex_state = 1}, - [71] = {.lex_state = 1}, - [72] = {.lex_state = 1}, - [73] = {.lex_state = 1}, - [74] = {.lex_state = 1}, - [75] = {.lex_state = 1}, - [76] = {.lex_state = 1}, - [77] = {.lex_state = 1}, - [78] = {.lex_state = 21}, - [79] = {.lex_state = 20}, - [80] = {.lex_state = 21}, - [81] = {.lex_state = 21}, - [82] = {.lex_state = 21}, - [83] = {.lex_state = 19}, - [84] = {.lex_state = 19}, - [85] = {.lex_state = 19}, - [86] = {.lex_state = 19}, - [87] = {.lex_state = 19}, - [88] = {.lex_state = 22}, - [89] = {.lex_state = 19}, - [90] = {.lex_state = 19}, - [91] = {.lex_state = 19}, - [92] = {.lex_state = 20}, - [93] = {.lex_state = 19}, - [94] = {.lex_state = 20}, - [95] = {.lex_state = 20}, - [96] = {.lex_state = 20}, - [97] = {.lex_state = 20}, - [98] = {.lex_state = 20}, - [99] = {.lex_state = 20}, - [100] = {.lex_state = 20}, - [101] = {.lex_state = 20}, - [102] = {.lex_state = 20}, - [103] = {.lex_state = 19}, - [104] = {.lex_state = 20}, - [105] = {.lex_state = 19}, - [106] = {.lex_state = 19}, - [107] = {.lex_state = 19}, - [108] = {.lex_state = 19}, - [109] = {.lex_state = 19}, - [110] = {.lex_state = 19}, - [111] = {.lex_state = 19}, - [112] = {.lex_state = 20}, - [113] = {.lex_state = 19}, - [114] = {.lex_state = 20}, - [115] = {.lex_state = 20}, - [116] = {.lex_state = 20}, - [117] = {.lex_state = 19}, - [118] = {.lex_state = 19}, - [119] = {.lex_state = 19}, - [120] = {.lex_state = 19}, - [121] = {.lex_state = 19}, - [122] = {.lex_state = 20}, - [123] = {.lex_state = 19}, - [124] = {.lex_state = 2}, - [125] = {.lex_state = 2}, - [126] = {.lex_state = 19}, - [127] = {.lex_state = 20}, - [128] = {.lex_state = 2}, - [129] = {.lex_state = 2}, - [130] = {.lex_state = 19}, - [131] = {.lex_state = 20}, - [132] = {.lex_state = 2}, - [133] = {.lex_state = 2}, - [134] = {.lex_state = 2}, - [135] = {.lex_state = 2}, - [136] = {.lex_state = 2}, - [137] = {.lex_state = 2}, - [138] = {.lex_state = 2}, - [139] = {.lex_state = 2}, - [140] = {.lex_state = 20}, - [141] = {.lex_state = 19}, - [142] = {.lex_state = 2}, - [143] = {.lex_state = 2}, - [144] = {.lex_state = 2}, + [56] = {.lex_state = 18}, + [57] = {.lex_state = 19}, + [58] = {.lex_state = 19}, + [59] = {.lex_state = 19}, + [60] = {.lex_state = 19}, + [61] = {.lex_state = 17}, + [62] = {.lex_state = 17}, + [63] = {.lex_state = 20}, + [64] = {.lex_state = 17}, + [65] = {.lex_state = 17}, + [66] = {.lex_state = 17}, + [67] = {.lex_state = 17}, + [68] = {.lex_state = 17}, + [69] = {.lex_state = 17}, + [70] = {.lex_state = 17}, + [71] = {.lex_state = 17}, + [72] = {.lex_state = 18}, + [73] = {.lex_state = 17}, + [74] = {.lex_state = 18}, + [75] = {.lex_state = 18}, + [76] = {.lex_state = 18}, + [77] = {.lex_state = 18}, + [78] = {.lex_state = 18}, + [79] = {.lex_state = 18}, + [80] = {.lex_state = 18}, + [81] = {.lex_state = 18}, + [82] = {.lex_state = 18}, + [83] = {.lex_state = 18}, + [84] = {.lex_state = 17}, + [85] = {.lex_state = 17}, + [86] = {.lex_state = 17}, + [87] = {.lex_state = 17}, + [88] = {.lex_state = 17}, + [89] = {.lex_state = 17}, + [90] = {.lex_state = 18}, + [91] = {.lex_state = 18}, + [92] = {.lex_state = 17}, + [93] = {.lex_state = 17}, + [94] = {.lex_state = 17}, + [95] = {.lex_state = 17}, + [96] = {.lex_state = 17}, + [97] = {.lex_state = 18}, + [98] = {.lex_state = 18}, + [99] = {.lex_state = 17}, + [100] = {.lex_state = 18}, + [101] = {.lex_state = 17}, + [102] = {.lex_state = 18}, + [103] = {.lex_state = 17}, + [104] = {.lex_state = 17}, + [105] = {.lex_state = 18}, + [106] = {.lex_state = 18}, + [107] = {.lex_state = 18}, + [108] = {.lex_state = 18}, + [109] = {.lex_state = 18}, + [110] = {.lex_state = 18}, + [111] = {.lex_state = 17}, + [112] = {.lex_state = 18}, + [113] = {.lex_state = 18}, + [114] = {.lex_state = 17}, + [115] = {.lex_state = 17}, + [116] = {.lex_state = 18}, + [117] = {.lex_state = 18}, + [118] = {.lex_state = 18}, + [119] = {.lex_state = 18}, + [120] = {.lex_state = 17}, + [121] = {.lex_state = 18}, + [122] = {.lex_state = 18}, + [123] = {.lex_state = 17}, + [124] = {.lex_state = 17}, + [125] = {.lex_state = 17}, + [126] = {.lex_state = 17}, + [127] = {.lex_state = 17}, + [128] = {.lex_state = 17}, + [129] = {.lex_state = 17}, + [130] = {.lex_state = 17}, + [131] = {.lex_state = 17}, + [132] = {.lex_state = 17}, + [133] = {.lex_state = 17}, + [134] = {.lex_state = 17}, + [135] = {.lex_state = 18}, + [136] = {.lex_state = 18}, + [137] = {.lex_state = 18}, + [138] = {.lex_state = 17}, + [139] = {.lex_state = 17}, + [140] = {.lex_state = 17}, + [141] = {.lex_state = 18}, + [142] = {.lex_state = 17}, + [143] = {.lex_state = 17}, + [144] = {.lex_state = 1}, [145] = {.lex_state = 2}, [146] = {.lex_state = 2}, - [147] = {.lex_state = 20}, - [148] = {.lex_state = 2}, - [149] = {.lex_state = 2}, - [150] = {.lex_state = 20}, - [151] = {.lex_state = 20}, - [152] = {.lex_state = 20}, - [153] = {.lex_state = 2}, - [154] = {.lex_state = 2}, - [155] = {.lex_state = 2}, - [156] = {.lex_state = 19}, - [157] = {.lex_state = 19}, + [147] = {.lex_state = 2}, + [148] = {.lex_state = 18}, + [149] = {.lex_state = 3}, + [150] = {.lex_state = 18}, + [151] = {.lex_state = 3}, + [152] = {.lex_state = 18}, + [153] = {.lex_state = 3}, + [154] = {.lex_state = 3}, + [155] = {.lex_state = 18}, + [156] = {.lex_state = 18}, + [157] = {.lex_state = 18}, [158] = {.lex_state = 2}, - [159] = {.lex_state = 2}, - [160] = {.lex_state = 2}, - [161] = {.lex_state = 2}, - [162] = {.lex_state = 2}, + [159] = {.lex_state = 18}, + [160] = {.lex_state = 18}, + [161] = {.lex_state = 18}, + [162] = {.lex_state = 18}, [163] = {.lex_state = 2}, [164] = {.lex_state = 2}, [165] = {.lex_state = 2}, - [166] = {.lex_state = 20}, - [167] = {.lex_state = 20}, - [168] = {.lex_state = 2}, - [169] = {.lex_state = 2}, - [170] = {.lex_state = 2}, - [171] = {.lex_state = 19}, - [172] = {.lex_state = 2}, - [173] = {.lex_state = 19}, - [174] = {.lex_state = 2}, - [175] = {.lex_state = 20}, - [176] = {.lex_state = 2}, - [177] = {.lex_state = 2}, - [178] = {.lex_state = 20}, - [179] = {.lex_state = 2}, - [180] = {.lex_state = 19}, - [181] = {.lex_state = 19}, - [182] = {.lex_state = 19}, - [183] = {.lex_state = 19}, - [184] = {.lex_state = 19}, - [185] = {.lex_state = 19}, - [186] = {.lex_state = 19}, - [187] = {.lex_state = 19}, - [188] = {.lex_state = 19}, - [189] = {.lex_state = 19}, - [190] = {.lex_state = 2}, - [191] = {.lex_state = 19}, - [192] = {.lex_state = 2}, - [193] = {.lex_state = 20}, - [194] = {.lex_state = 2}, - [195] = {.lex_state = 2}, - [196] = {.lex_state = 20}, - [197] = {.lex_state = 2}, - [198] = {.lex_state = 2}, - [199] = {.lex_state = 19}, - [200] = {.lex_state = 19}, - [201] = {.lex_state = 2}, - [202] = {.lex_state = 2}, - [203] = {.lex_state = 2}, - [204] = {.lex_state = 2}, - [205] = {.lex_state = 20}, - [206] = {.lex_state = 20}, - [207] = {.lex_state = 19}, - [208] = {.lex_state = 20}, - [209] = {.lex_state = 20}, - [210] = {.lex_state = 20}, - [211] = {.lex_state = 2}, - [212] = {.lex_state = 20}, - [213] = {.lex_state = 2}, - [214] = {.lex_state = 2}, - [215] = {.lex_state = 2}, - [216] = {.lex_state = 19}, - [217] = {.lex_state = 20}, - [218] = {.lex_state = 19}, - [219] = {.lex_state = 19}, - [220] = {.lex_state = 20}, - [221] = {.lex_state = 1}, - [222] = {.lex_state = 3}, - [223] = {.lex_state = 3}, - [224] = {.lex_state = 3}, - [225] = {.lex_state = 21}, - [226] = {.lex_state = 21}, - [227] = {.lex_state = 4}, - [228] = {.lex_state = 21}, - [229] = {.lex_state = 21}, - [230] = {.lex_state = 21}, - [231] = {.lex_state = 4}, - [232] = {.lex_state = 21}, - [233] = {.lex_state = 4}, - [234] = {.lex_state = 21}, - [235] = {.lex_state = 21}, - [236] = {.lex_state = 21}, - [237] = {.lex_state = 4}, - [238] = {.lex_state = 3}, - [239] = {.lex_state = 21}, - [240] = {.lex_state = 21}, - [241] = {.lex_state = 21}, - [242] = {.lex_state = 3}, - [243] = {.lex_state = 3}, - [244] = {.lex_state = 3}, - [245] = {.lex_state = 3}, - [246] = {.lex_state = 3}, - [247] = {.lex_state = 1}, - [248] = {.lex_state = 1}, - [249] = {.lex_state = 0}, - [250] = {.lex_state = 0}, - [251] = {.lex_state = 1}, - [252] = {.lex_state = 1}, - [253] = {.lex_state = 1}, - [254] = {.lex_state = 1}, - [255] = {.lex_state = 1}, - [256] = {.lex_state = 1}, - [257] = {.lex_state = 1}, - [258] = {.lex_state = 1}, - [259] = {.lex_state = 1}, - [260] = {.lex_state = 1}, - [261] = {.lex_state = 1}, - [262] = {.lex_state = 1}, - [263] = {.lex_state = 1}, - [264] = {.lex_state = 0}, - [265] = {.lex_state = 1}, - [266] = {.lex_state = 0}, - [267] = {.lex_state = 1}, - [268] = {.lex_state = 1}, - [269] = {.lex_state = 1}, - [270] = {.lex_state = 1}, - [271] = {.lex_state = 1}, - [272] = {.lex_state = 0}, - [273] = {.lex_state = 0}, - [274] = {.lex_state = 1}, - [275] = {.lex_state = 0}, - [276] = {.lex_state = 1}, - [277] = {.lex_state = 0}, - [278] = {.lex_state = 1}, - [279] = {.lex_state = 21}, - [280] = {.lex_state = 1}, - [281] = {.lex_state = 0}, - [282] = {.lex_state = 1}, - [283] = {.lex_state = 0}, - [284] = {.lex_state = 1}, - [285] = {.lex_state = 1}, - [286] = {.lex_state = 0}, - [287] = {.lex_state = 0}, - [288] = {.lex_state = 21}, - [289] = {.lex_state = 0}, - [290] = {.lex_state = 0}, - [291] = {.lex_state = 21}, - [292] = {.lex_state = 21}, - [293] = {.lex_state = 1}, - [294] = {.lex_state = 0}, - [295] = {.lex_state = 1}, - [296] = {.lex_state = 1}, - [297] = {.lex_state = 0}, - [298] = {.lex_state = 1}, - [299] = {.lex_state = 1}, - [300] = {.lex_state = 0}, - [301] = {.lex_state = 0}, - [302] = {.lex_state = 1}, - [303] = {.lex_state = 4}, - [304] = {.lex_state = 20}, - [305] = {.lex_state = 21}, - [306] = {.lex_state = 1}, - [307] = {.lex_state = 0}, - [308] = {.lex_state = 0}, - [309] = {.lex_state = 1}, - [310] = {.lex_state = 0}, - [311] = {.lex_state = 0}, - [312] = {.lex_state = 1}, - [313] = {.lex_state = 0}, - [314] = {.lex_state = 0}, - [315] = {.lex_state = 0}, - [316] = {.lex_state = 1}, - [317] = {.lex_state = 1}, - [318] = {.lex_state = 0}, - [319] = {.lex_state = 0}, - [320] = {.lex_state = 0}, - [321] = {.lex_state = 0}, + [166] = {.lex_state = 2}, + [167] = {.lex_state = 1}, + [168] = {.lex_state = 1}, + [169] = {.lex_state = 1}, + [170] = {.lex_state = 0}, + [171] = {.lex_state = 0}, + [172] = {.lex_state = 1}, + [173] = {.lex_state = 1}, + [174] = {.lex_state = 1}, + [175] = {.lex_state = 1}, + [176] = {.lex_state = 1}, + [177] = {.lex_state = 1}, + [178] = {.lex_state = 1}, + [179] = {.lex_state = 0}, + [180] = {.lex_state = 1}, + [181] = {.lex_state = 0}, + [182] = {.lex_state = 1}, + [183] = {.lex_state = 0}, + [184] = {.lex_state = 0}, + [185] = {.lex_state = 1}, + [186] = {.lex_state = 1}, + [187] = {.lex_state = 0}, + [188] = {.lex_state = 1}, + [189] = {.lex_state = 1}, + [190] = {.lex_state = 0}, + [191] = {.lex_state = 0}, + [192] = {.lex_state = 18}, + [193] = {.lex_state = 0}, + [194] = {.lex_state = 0}, + [195] = {.lex_state = 0}, + [196] = {.lex_state = 0}, + [197] = {.lex_state = 18}, + [198] = {.lex_state = 1}, + [199] = {.lex_state = 1}, + [200] = {.lex_state = 18}, + [201] = {.lex_state = 1}, + [202] = {.lex_state = 1}, + [203] = {.lex_state = 1}, + [204] = {.lex_state = 19}, + [205] = {.lex_state = 0}, + [206] = {.lex_state = 0}, + [207] = {.lex_state = 1}, + [208] = {.lex_state = 0}, + [209] = {.lex_state = 0}, + [210] = {.lex_state = 0}, + [211] = {.lex_state = 0}, + [212] = {.lex_state = 0}, + [213] = {.lex_state = 1}, + [214] = {.lex_state = 18}, + [215] = {.lex_state = 0}, + [216] = {.lex_state = 0}, + [217] = {.lex_state = 1}, + [218] = {.lex_state = 3}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { @@ -2322,7 +2097,9 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [aux_sym_unsigned_integer_token1] = ACTIONS(1), [sym_unit_quote] = ACTIONS(1), [anon_sym_DOT] = ACTIONS(1), + [anon_sym_LBRACE] = ACTIONS(1), [anon_sym_COMMA] = ACTIONS(1), + [anon_sym_RBRACE] = ACTIONS(1), [sym_true] = ACTIONS(1), [sym_false] = ACTIONS(1), [anon_sym_COLON_COLON] = ACTIONS(1), @@ -2363,35 +2140,35 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_GT_GT_GT] = ACTIONS(1), }, [STATE(1)] = { - [sym_source_file] = STATE(319), - [sym_base_ten] = STATE(284), - [sym_octal] = STATE(284), - [sym_hex] = STATE(284), - [sym_binary] = STATE(284), - [sym_integer] = STATE(298), - [sym_signed_integer] = STATE(109), - [sym_unsigned_integer] = STATE(109), - [sym_number] = STATE(80), - [sym__float] = STATE(78), - [sym_scalar] = STATE(109), - [sym_vector2] = STATE(109), - [sym_vector3] = STATE(109), - [sym_vector4] = STATE(109), - [sym_boolean] = STATE(109), - [sym_function_call] = STATE(109), - [sym_method_call] = STATE(109), - [sym_expression] = STATE(206), - [sym_unary_expression] = STATE(109), - [sym_binary_expression] = STATE(109), - [sym_if] = STATE(109), - [sym_let_in] = STATE(109), - [sym_member_access] = STATE(109), - [sym_parenthesis] = STATE(109), - [sym_list] = STATE(109), - [sym_struct_definition] = STATE(112), - [sym_dictionary_construction] = STATE(109), - [sym_closure_definition] = STATE(109), - [sym_constraint_set] = STATE(109), + [sym_source_file] = STATE(216), + [sym_base_ten] = STATE(202), + [sym_octal] = STATE(202), + [sym_hex] = STATE(202), + [sym_binary] = STATE(202), + [sym_integer] = STATE(201), + [sym_signed_integer] = STATE(92), + [sym_unsigned_integer] = STATE(92), + [sym_number] = STATE(59), + [sym__float] = STATE(57), + [sym_scalar] = STATE(92), + [sym_vector2] = STATE(92), + [sym_vector3] = STATE(92), + [sym_vector4] = STATE(92), + [sym_boolean] = STATE(92), + [sym_function_call] = STATE(92), + [sym_method_call] = STATE(92), + [sym_expression] = STATE(136), + [sym_unary_expression] = STATE(92), + [sym_binary_expression] = STATE(92), + [sym_if] = STATE(92), + [sym_let_in] = STATE(92), + [sym_member_access] = STATE(92), + [sym_parenthesis] = STATE(92), + [sym_list] = STATE(92), + [sym_struct_definition] = STATE(97), + [sym_dictionary_construction] = STATE(92), + [sym_closure_definition] = STATE(92), + [sym_constraint_set] = STATE(92), [sym_identifier] = ACTIONS(5), [sym_comment] = ACTIONS(3), [sym__whitespace] = ACTIONS(3), @@ -2401,7 +2178,7 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [aux_sym_octal_token1] = ACTIONS(11), [aux_sym_hex_token1] = ACTIONS(13), [aux_sym_binary_token1] = ACTIONS(15), - [anon_sym_LT_LPAREN] = ACTIONS(17), + [anon_sym_LBRACE] = ACTIONS(17), [sym_true] = ACTIONS(19), [sym_false] = ACTIONS(19), [anon_sym_DASH] = ACTIONS(21), @@ -2414,38 +2191,38 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_LT_LT_LT] = ACTIONS(31), }, [STATE(2)] = { - [sym_base_ten] = STATE(284), - [sym_octal] = STATE(284), - [sym_hex] = STATE(284), - [sym_binary] = STATE(284), - [sym_integer] = STATE(298), - [sym_signed_integer] = STATE(109), - [sym_unsigned_integer] = STATE(109), - [sym_number] = STATE(80), - [sym__float] = STATE(78), - [sym_scalar] = STATE(109), - [sym_vector2] = STATE(109), - [sym_vector3] = STATE(109), - [sym_vector4] = STATE(109), - [sym_boolean] = STATE(109), - [sym_function_call] = STATE(109), - [sym_method_call] = STATE(109), - [sym_expression] = STATE(175), - [sym_unary_expression] = STATE(109), - [sym_binary_expression] = STATE(109), - [sym_if] = STATE(109), - [sym_let_in] = STATE(109), - [sym_member_access] = STATE(109), - [sym_parenthesis] = STATE(109), - [sym_list] = STATE(109), - [sym_struct_member] = STATE(283), - [sym__struct_final_element] = STATE(310), - [sym_struct_definition] = STATE(112), - [sym_dictionary_member_assignment] = STATE(273), - [sym_dictionary_construction] = STATE(109), - [sym_closure_definition] = STATE(109), - [sym_constraint_set] = STATE(109), - [aux_sym_struct_definition_repeat1] = STATE(252), + [sym_base_ten] = STATE(202), + [sym_octal] = STATE(202), + [sym_hex] = STATE(202), + [sym_binary] = STATE(202), + [sym_integer] = STATE(201), + [sym_signed_integer] = STATE(92), + [sym_unsigned_integer] = STATE(92), + [sym_number] = STATE(59), + [sym__float] = STATE(57), + [sym_scalar] = STATE(92), + [sym_vector2] = STATE(92), + [sym_vector3] = STATE(92), + [sym_vector4] = STATE(92), + [sym_boolean] = STATE(92), + [sym_function_call] = STATE(92), + [sym_method_call] = STATE(92), + [sym_expression] = STATE(106), + [sym_unary_expression] = STATE(92), + [sym_binary_expression] = STATE(92), + [sym_if] = STATE(92), + [sym_let_in] = STATE(92), + [sym_member_access] = STATE(92), + [sym_parenthesis] = STATE(92), + [sym_list] = STATE(92), + [sym_struct_member] = STATE(187), + [sym__struct_final_element] = STATE(211), + [sym_struct_definition] = STATE(97), + [sym_dictionary_argument] = STATE(183), + [sym_dictionary_construction] = STATE(92), + [sym_closure_definition] = STATE(92), + [sym_constraint_set] = STATE(92), + [aux_sym_struct_definition_repeat1] = STATE(172), [sym_identifier] = ACTIONS(33), [sym_comment] = ACTIONS(3), [sym__whitespace] = ACTIONS(3), @@ -2455,7 +2232,7 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [aux_sym_octal_token1] = ACTIONS(11), [aux_sym_hex_token1] = ACTIONS(13), [aux_sym_binary_token1] = ACTIONS(15), - [anon_sym_LT_LPAREN] = ACTIONS(17), + [anon_sym_LBRACE] = ACTIONS(17), [sym_true] = ACTIONS(19), [sym_false] = ACTIONS(19), [anon_sym_DASH] = ACTIONS(21), @@ -2469,62 +2246,6 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [sym_varadic_dots] = ACTIONS(37), [anon_sym_LT_LT_LT] = ACTIONS(31), }, - [STATE(3)] = { - [sym_base_ten] = STATE(284), - [sym_octal] = STATE(284), - [sym_hex] = STATE(284), - [sym_binary] = STATE(284), - [sym_integer] = STATE(298), - [sym_signed_integer] = STATE(109), - [sym_unsigned_integer] = STATE(109), - [sym_number] = STATE(80), - [sym__float] = STATE(78), - [sym_scalar] = STATE(109), - [sym_vector2] = STATE(109), - [sym_vector3] = STATE(109), - [sym_vector4] = STATE(109), - [sym_boolean] = STATE(109), - [sym_function_call] = STATE(109), - [sym_method_call] = STATE(109), - [sym_expression] = STATE(208), - [sym_unary_expression] = STATE(109), - [sym_binary_expression] = STATE(109), - [sym_if] = STATE(109), - [sym_let_in] = STATE(109), - [sym_member_access] = STATE(109), - [sym_parenthesis] = STATE(109), - [sym_list] = STATE(109), - [sym_struct_member] = STATE(283), - [sym__struct_final_element] = STATE(314), - [sym_struct_definition] = STATE(112), - [sym_dictionary_member_assignment] = STATE(275), - [sym_dictionary_construction] = STATE(109), - [sym_closure_definition] = STATE(109), - [sym_constraint_set] = STATE(109), - [aux_sym_struct_definition_repeat1] = STATE(253), - [sym_identifier] = ACTIONS(33), - [sym_comment] = ACTIONS(3), - [sym__whitespace] = ACTIONS(3), - [sym_string] = ACTIONS(7), - [sym_self] = ACTIONS(5), - [aux_sym_base_ten_token1] = ACTIONS(9), - [aux_sym_octal_token1] = ACTIONS(11), - [aux_sym_hex_token1] = ACTIONS(13), - [aux_sym_binary_token1] = ACTIONS(15), - [anon_sym_LT_LPAREN] = ACTIONS(17), - [sym_true] = ACTIONS(19), - [sym_false] = ACTIONS(19), - [anon_sym_DASH] = ACTIONS(21), - [anon_sym_PLUS] = ACTIONS(21), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_if] = ACTIONS(23), - [anon_sym_let] = ACTIONS(25), - [anon_sym_LPAREN] = ACTIONS(27), - [anon_sym_RPAREN] = ACTIONS(39), - [anon_sym_LBRACK] = ACTIONS(29), - [sym_varadic_dots] = ACTIONS(37), - [anon_sym_LT_LT_LT] = ACTIONS(31), - }, }; static const uint16_t ts_small_parse_table[] = { @@ -2540,7 +2261,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(23), 1, anon_sym_if, ACTIONS(25), 1, @@ -2551,19 +2272,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - ACTIONS(41), 1, + ACTIONS(39), 1, anon_sym_RBRACK, - STATE(8), 1, + STATE(7), 1, aux_sym_list_repeat1, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(112), 1, + STATE(97), 1, sym_struct_definition, - STATE(140), 1, + STATE(108), 1, sym_expression, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -2578,12 +2299,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -2615,7 +2336,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(23), 1, anon_sym_if, ACTIONS(25), 1, @@ -2626,19 +2347,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - ACTIONS(43), 1, + ACTIONS(41), 1, anon_sym_RBRACK, - STATE(4), 1, + STATE(3), 1, aux_sym_list_repeat1, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(112), 1, + STATE(97), 1, sym_struct_definition, - STATE(166), 1, + STATE(113), 1, sym_expression, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -2653,12 +2374,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -2690,7 +2411,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(23), 1, anon_sym_if, ACTIONS(25), 1, @@ -2701,19 +2422,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - ACTIONS(45), 1, - anon_sym_RBRACK, - STATE(7), 1, - aux_sym_list_repeat1, - STATE(78), 1, + ACTIONS(43), 1, + anon_sym_RPAREN, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(112), 1, + STATE(97), 1, sym_struct_definition, - STATE(150), 1, + STATE(105), 1, sym_expression, - STATE(298), 1, + STATE(183), 1, + sym_dictionary_argument, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -2728,12 +2449,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -2765,7 +2486,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(23), 1, anon_sym_if, ACTIONS(25), 1, @@ -2776,19 +2497,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - ACTIONS(47), 1, - anon_sym_RBRACK, - STATE(8), 1, - aux_sym_list_repeat1, - STATE(78), 1, + ACTIONS(45), 1, + anon_sym_RPAREN, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(112), 1, + STATE(97), 1, sym_struct_definition, - STATE(152), 1, + STATE(105), 1, sym_expression, - STATE(298), 1, + STATE(195), 1, + sym_dictionary_argument, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -2803,12 +2524,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -2829,61 +2550,61 @@ static const uint16_t ts_small_parse_table[] = { sym_closure_definition, sym_constraint_set, [396] = 24, - ACTIONS(52), 1, + ACTIONS(50), 1, sym_string, - ACTIONS(55), 1, + ACTIONS(53), 1, aux_sym_base_ten_token1, - ACTIONS(58), 1, + ACTIONS(56), 1, aux_sym_octal_token1, - ACTIONS(61), 1, + ACTIONS(59), 1, aux_sym_hex_token1, - ACTIONS(64), 1, + ACTIONS(62), 1, aux_sym_binary_token1, - ACTIONS(67), 1, - anon_sym_LT_LPAREN, - ACTIONS(76), 1, + ACTIONS(65), 1, + anon_sym_LBRACE, + ACTIONS(74), 1, anon_sym_if, - ACTIONS(79), 1, + ACTIONS(77), 1, anon_sym_let, - ACTIONS(82), 1, + ACTIONS(80), 1, anon_sym_LPAREN, - ACTIONS(85), 1, + ACTIONS(83), 1, anon_sym_LBRACK, - ACTIONS(88), 1, + ACTIONS(86), 1, anon_sym_RBRACK, - ACTIONS(90), 1, + ACTIONS(88), 1, anon_sym_LT_LT_LT, - STATE(8), 1, + STATE(7), 1, aux_sym_list_repeat1, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(112), 1, + STATE(97), 1, sym_struct_definition, - STATE(205), 1, + STATE(118), 1, sym_expression, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(49), 2, + ACTIONS(47), 2, sym_identifier, sym_self, - ACTIONS(70), 2, + ACTIONS(68), 2, sym_true, sym_false, - ACTIONS(73), 3, + ACTIONS(71), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -2903,9 +2624,11 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [495] = 22, + [495] = 24, ACTIONS(7), 1, sym_string, + ACTIONS(9), 1, + aux_sym_base_ten_token1, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, @@ -2913,28 +2636,30 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, + ACTIONS(23), 1, + anon_sym_if, + ACTIONS(25), 1, + anon_sym_let, ACTIONS(27), 1, anon_sym_LPAREN, ACTIONS(29), 1, anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - ACTIONS(93), 1, - aux_sym_base_ten_token1, - ACTIONS(97), 1, - anon_sym_if, - ACTIONS(99), 1, - anon_sym_let, - STATE(130), 1, + ACTIONS(91), 1, + anon_sym_RPAREN, + STATE(57), 1, sym__float, - STATE(141), 1, + STATE(59), 1, sym_number, - STATE(185), 1, - sym_expression, - STATE(216), 1, + STATE(97), 1, sym_struct_definition, - STATE(298), 1, + STATE(105), 1, + sym_expression, + STATE(195), 1, + sym_dictionary_argument, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -2945,16 +2670,16 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(95), 3, + ACTIONS(21), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -2974,7 +2699,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [588] = 22, + [594] = 23, ACTIONS(7), 1, sym_string, ACTIONS(9), 1, @@ -2986,7 +2711,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(23), 1, anon_sym_if, ACTIONS(25), 1, @@ -2997,15 +2722,17 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(86), 1, - sym_expression, - STATE(112), 1, + STATE(97), 1, sym_struct_definition, - STATE(298), 1, + STATE(105), 1, + sym_expression, + STATE(195), 1, + sym_dictionary_argument, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -3020,12 +2747,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -3045,11 +2772,9 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [681] = 22, + [690] = 22, ACTIONS(7), 1, sym_string, - ACTIONS(9), 1, - aux_sym_base_ten_token1, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, @@ -3057,26 +2782,28 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, - ACTIONS(23), 1, - anon_sym_if, - ACTIONS(25), 1, - anon_sym_let, + anon_sym_LBRACE, ACTIONS(27), 1, anon_sym_LPAREN, ACTIONS(29), 1, anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(78), 1, + ACTIONS(93), 1, + aux_sym_base_ten_token1, + ACTIONS(97), 1, + anon_sym_if, + ACTIONS(99), 1, + anon_sym_let, + STATE(104), 1, sym__float, - STATE(80), 1, + STATE(111), 1, sym_number, - STATE(94), 1, + STATE(142), 1, sym_expression, - STATE(112), 1, + STATE(143), 1, sym_struct_definition, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -3087,16 +2814,16 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(21), 3, + ACTIONS(95), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -3116,11 +2843,9 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [774] = 22, + [783] = 22, ACTIONS(7), 1, sym_string, - ACTIONS(9), 1, - aux_sym_base_ten_token1, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, @@ -3128,26 +2853,28 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, - ACTIONS(23), 1, - anon_sym_if, - ACTIONS(25), 1, - anon_sym_let, + anon_sym_LBRACE, ACTIONS(27), 1, anon_sym_LPAREN, ACTIONS(29), 1, anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(78), 1, + ACTIONS(93), 1, + aux_sym_base_ten_token1, + ACTIONS(97), 1, + anon_sym_if, + ACTIONS(99), 1, + anon_sym_let, + STATE(104), 1, sym__float, - STATE(80), 1, + STATE(111), 1, sym_number, - STATE(95), 1, + STATE(123), 1, sym_expression, - STATE(112), 1, + STATE(143), 1, sym_struct_definition, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -3158,16 +2885,16 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(21), 3, + ACTIONS(95), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -3187,7 +2914,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [867] = 22, + [876] = 22, ACTIONS(7), 1, sym_string, ACTIONS(9), 1, @@ -3199,7 +2926,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(23), 1, anon_sym_if, ACTIONS(25), 1, @@ -3210,15 +2937,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(96), 1, + STATE(72), 1, sym_expression, - STATE(112), 1, + STATE(97), 1, sym_struct_definition, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -3233,12 +2960,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -3258,7 +2985,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [960] = 22, + [969] = 22, ACTIONS(7), 1, sym_string, ACTIONS(9), 1, @@ -3270,7 +2997,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(23), 1, anon_sym_if, ACTIONS(25), 1, @@ -3281,15 +3008,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(97), 1, + STATE(61), 1, sym_expression, - STATE(112), 1, + STATE(97), 1, sym_struct_definition, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -3304,12 +3031,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -3329,7 +3056,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [1053] = 22, + [1062] = 22, ACTIONS(7), 1, sym_string, ACTIONS(9), 1, @@ -3341,7 +3068,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(23), 1, anon_sym_if, ACTIONS(25), 1, @@ -3352,15 +3079,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(98), 1, + STATE(74), 1, sym_expression, - STATE(112), 1, + STATE(97), 1, sym_struct_definition, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -3375,12 +3102,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -3400,7 +3127,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [1146] = 22, + [1155] = 22, ACTIONS(7), 1, sym_string, ACTIONS(9), 1, @@ -3412,7 +3139,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(23), 1, anon_sym_if, ACTIONS(25), 1, @@ -3423,15 +3150,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(99), 1, + STATE(75), 1, sym_expression, - STATE(112), 1, + STATE(97), 1, sym_struct_definition, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -3446,12 +3173,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -3471,7 +3198,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [1239] = 22, + [1248] = 22, ACTIONS(7), 1, sym_string, ACTIONS(9), 1, @@ -3483,7 +3210,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(23), 1, anon_sym_if, ACTIONS(25), 1, @@ -3494,15 +3221,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(100), 1, + STATE(76), 1, sym_expression, - STATE(112), 1, + STATE(97), 1, sym_struct_definition, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -3517,12 +3244,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -3542,7 +3269,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [1332] = 22, + [1341] = 22, ACTIONS(7), 1, sym_string, ACTIONS(9), 1, @@ -3554,7 +3281,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(23), 1, anon_sym_if, ACTIONS(25), 1, @@ -3565,15 +3292,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(101), 1, + STATE(77), 1, sym_expression, - STATE(112), 1, + STATE(97), 1, sym_struct_definition, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -3588,12 +3315,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -3613,7 +3340,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [1425] = 22, + [1434] = 22, ACTIONS(7), 1, sym_string, ACTIONS(9), 1, @@ -3625,7 +3352,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(23), 1, anon_sym_if, ACTIONS(25), 1, @@ -3636,15 +3363,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(102), 1, + STATE(78), 1, sym_expression, - STATE(112), 1, + STATE(97), 1, sym_struct_definition, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -3659,12 +3386,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -3684,7 +3411,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [1518] = 22, + [1527] = 22, ACTIONS(7), 1, sym_string, ACTIONS(9), 1, @@ -3696,7 +3423,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(23), 1, anon_sym_if, ACTIONS(25), 1, @@ -3707,15 +3434,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(112), 1, - sym_struct_definition, - STATE(178), 1, + STATE(79), 1, sym_expression, - STATE(298), 1, + STATE(97), 1, + sym_struct_definition, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -3730,12 +3457,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -3755,58 +3482,58 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [1611] = 22, + [1620] = 22, + ACTIONS(7), 1, + sym_string, + ACTIONS(9), 1, + aux_sym_base_ten_token1, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, aux_sym_hex_token1, ACTIONS(15), 1, aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, - aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, + ACTIONS(17), 1, + anon_sym_LBRACE, + ACTIONS(23), 1, anon_sym_if, - ACTIONS(115), 1, + ACTIONS(25), 1, anon_sym_let, - ACTIONS(117), 1, + ACTIONS(27), 1, anon_sym_LPAREN, - ACTIONS(119), 1, + ACTIONS(29), 1, anon_sym_LBRACK, - ACTIONS(121), 1, + ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(125), 1, + STATE(57), 1, sym__float, - STATE(129), 1, + STATE(59), 1, sym_number, - STATE(144), 1, + STATE(80), 1, sym_expression, - STATE(145), 1, + STATE(97), 1, sym_struct_definition, - STATE(295), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(101), 2, + ACTIONS(5), 2, sym_identifier, sym_self, - ACTIONS(109), 2, + ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(111), 3, + ACTIONS(21), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(214), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -3826,7 +3553,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [1704] = 22, + [1713] = 22, ACTIONS(7), 1, sym_string, ACTIONS(9), 1, @@ -3838,7 +3565,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(23), 1, anon_sym_if, ACTIONS(25), 1, @@ -3849,15 +3576,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(112), 1, - sym_struct_definition, - STATE(193), 1, + STATE(81), 1, sym_expression, - STATE(298), 1, + STATE(97), 1, + sym_struct_definition, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -3872,12 +3599,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -3897,7 +3624,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [1797] = 22, + [1806] = 22, ACTIONS(7), 1, sym_string, ACTIONS(9), 1, @@ -3909,7 +3636,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(23), 1, anon_sym_if, ACTIONS(25), 1, @@ -3920,15 +3647,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(112), 1, - sym_struct_definition, - STATE(196), 1, + STATE(82), 1, sym_expression, - STATE(298), 1, + STATE(97), 1, + sym_struct_definition, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -3943,12 +3670,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -3968,7 +3695,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [1890] = 22, + [1899] = 22, ACTIONS(7), 1, sym_string, ACTIONS(9), 1, @@ -3980,7 +3707,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(23), 1, anon_sym_if, ACTIONS(25), 1, @@ -3991,15 +3718,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(104), 1, - sym_expression, - STATE(112), 1, + STATE(97), 1, sym_struct_definition, - STATE(298), 1, + STATE(121), 1, + sym_expression, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -4014,12 +3741,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -4039,7 +3766,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [1983] = 22, + [1992] = 22, ACTIONS(7), 1, sym_string, ACTIONS(9), 1, @@ -4051,7 +3778,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(23), 1, anon_sym_if, ACTIONS(25), 1, @@ -4062,15 +3789,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(112), 1, + STATE(97), 1, sym_struct_definition, - STATE(151), 1, + STATE(117), 1, sym_expression, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -4085,12 +3812,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -4110,7 +3837,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [2076] = 22, + [2085] = 22, ACTIONS(7), 1, sym_string, ACTIONS(9), 1, @@ -4122,7 +3849,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(23), 1, anon_sym_if, ACTIONS(25), 1, @@ -4133,15 +3860,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(112), 1, + STATE(97), 1, sym_struct_definition, - STATE(127), 1, + STATE(110), 1, sym_expression, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -4156,12 +3883,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -4181,9 +3908,11 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [2169] = 22, + [2178] = 22, ACTIONS(7), 1, sym_string, + ACTIONS(9), 1, + aux_sym_base_ten_token1, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, @@ -4191,28 +3920,26 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, + ACTIONS(23), 1, + anon_sym_if, + ACTIONS(25), 1, + anon_sym_let, ACTIONS(27), 1, anon_sym_LPAREN, ACTIONS(29), 1, anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - ACTIONS(93), 1, - aux_sym_base_ten_token1, - ACTIONS(97), 1, - anon_sym_if, - ACTIONS(99), 1, - anon_sym_let, - STATE(130), 1, + STATE(57), 1, sym__float, - STATE(141), 1, + STATE(59), 1, sym_number, - STATE(171), 1, - sym_expression, - STATE(216), 1, + STATE(97), 1, sym_struct_definition, - STATE(298), 1, + STATE(135), 1, + sym_expression, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -4223,16 +3950,16 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(95), 3, + ACTIONS(21), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -4252,7 +3979,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [2262] = 22, + [2271] = 22, ACTIONS(7), 1, sym_string, ACTIONS(9), 1, @@ -4264,7 +3991,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(23), 1, anon_sym_if, ACTIONS(25), 1, @@ -4275,15 +4002,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(112), 1, + STATE(97), 1, sym_struct_definition, - STATE(147), 1, + STATE(119), 1, sym_expression, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -4298,12 +4025,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -4323,7 +4050,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [2355] = 22, + [2364] = 22, ACTIONS(7), 1, sym_string, ACTIONS(9), 1, @@ -4335,7 +4062,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(23), 1, anon_sym_if, ACTIONS(25), 1, @@ -4346,15 +4073,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(112), 1, - sym_struct_definition, - STATE(114), 1, + STATE(83), 1, sym_expression, - STATE(298), 1, + STATE(97), 1, + sym_struct_definition, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -4369,12 +4096,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -4394,58 +4121,58 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [2448] = 22, + [2457] = 22, + ACTIONS(7), 1, + sym_string, + ACTIONS(9), 1, + aux_sym_base_ten_token1, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, aux_sym_hex_token1, ACTIONS(15), 1, aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, - aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, + ACTIONS(17), 1, + anon_sym_LBRACE, + ACTIONS(23), 1, anon_sym_if, - ACTIONS(115), 1, + ACTIONS(25), 1, anon_sym_let, - ACTIONS(117), 1, + ACTIONS(27), 1, anon_sym_LPAREN, - ACTIONS(119), 1, + ACTIONS(29), 1, anon_sym_LBRACK, - ACTIONS(121), 1, + ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(125), 1, + STATE(57), 1, sym__float, - STATE(129), 1, + STATE(59), 1, sym_number, - STATE(145), 1, + STATE(97), 1, sym_struct_definition, - STATE(161), 1, + STATE(107), 1, sym_expression, - STATE(295), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(101), 2, + ACTIONS(5), 2, sym_identifier, sym_self, - ACTIONS(109), 2, + ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(111), 3, + ACTIONS(21), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(214), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -4465,7 +4192,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [2541] = 22, + [2550] = 22, ACTIONS(7), 1, sym_string, ACTIONS(9), 1, @@ -4477,7 +4204,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(23), 1, anon_sym_if, ACTIONS(25), 1, @@ -4488,15 +4215,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(112), 1, + STATE(97), 1, sym_struct_definition, - STATE(115), 1, + STATE(116), 1, sym_expression, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -4511,12 +4238,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -4536,58 +4263,58 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [2634] = 22, + [2643] = 22, + ACTIONS(7), 1, + sym_string, + ACTIONS(9), 1, + aux_sym_base_ten_token1, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, aux_sym_hex_token1, ACTIONS(15), 1, aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, - aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, + ACTIONS(17), 1, + anon_sym_LBRACE, + ACTIONS(23), 1, anon_sym_if, - ACTIONS(115), 1, + ACTIONS(25), 1, anon_sym_let, - ACTIONS(117), 1, + ACTIONS(27), 1, anon_sym_LPAREN, - ACTIONS(119), 1, + ACTIONS(29), 1, anon_sym_LBRACK, - ACTIONS(121), 1, + ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(125), 1, + STATE(57), 1, sym__float, - STATE(129), 1, + STATE(59), 1, sym_number, - STATE(145), 1, + STATE(97), 1, sym_struct_definition, - STATE(213), 1, + STATE(112), 1, sym_expression, - STATE(295), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(101), 2, + ACTIONS(5), 2, sym_identifier, sym_self, - ACTIONS(109), 2, + ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(111), 3, + ACTIONS(21), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(214), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -4607,9 +4334,11 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [2727] = 22, + [2736] = 22, ACTIONS(7), 1, sym_string, + ACTIONS(9), 1, + aux_sym_base_ten_token1, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, @@ -4617,28 +4346,26 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, + ACTIONS(23), 1, + anon_sym_if, + ACTIONS(25), 1, + anon_sym_let, ACTIONS(27), 1, anon_sym_LPAREN, ACTIONS(29), 1, anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - ACTIONS(93), 1, - aux_sym_base_ten_token1, - ACTIONS(97), 1, - anon_sym_if, - ACTIONS(99), 1, - anon_sym_let, - STATE(130), 1, + STATE(57), 1, sym__float, - STATE(141), 1, + STATE(59), 1, sym_number, - STATE(207), 1, + STATE(90), 1, sym_expression, - STATE(216), 1, + STATE(97), 1, sym_struct_definition, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -4649,16 +4376,16 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(95), 3, + ACTIONS(21), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -4678,9 +4405,11 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [2820] = 22, + [2829] = 22, ACTIONS(7), 1, sym_string, + ACTIONS(9), 1, + aux_sym_base_ten_token1, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, @@ -4688,28 +4417,26 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, + ACTIONS(23), 1, + anon_sym_if, + ACTIONS(25), 1, + anon_sym_let, ACTIONS(27), 1, anon_sym_LPAREN, ACTIONS(29), 1, anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - ACTIONS(93), 1, - aux_sym_base_ten_token1, - ACTIONS(97), 1, - anon_sym_if, - ACTIONS(99), 1, - anon_sym_let, - STATE(130), 1, + STATE(57), 1, sym__float, - STATE(141), 1, + STATE(59), 1, sym_number, - STATE(173), 1, - sym_expression, - STATE(216), 1, + STATE(97), 1, sym_struct_definition, - STATE(298), 1, + STATE(109), 1, + sym_expression, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -4720,16 +4447,16 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(95), 3, + ACTIONS(21), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -4749,9 +4476,11 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [2913] = 22, + [2922] = 22, ACTIONS(7), 1, sym_string, + ACTIONS(9), 1, + aux_sym_base_ten_token1, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, @@ -4759,28 +4488,26 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, + ACTIONS(23), 1, + anon_sym_if, + ACTIONS(25), 1, + anon_sym_let, ACTIONS(27), 1, anon_sym_LPAREN, ACTIONS(29), 1, anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - ACTIONS(93), 1, - aux_sym_base_ten_token1, - ACTIONS(97), 1, - anon_sym_if, - ACTIONS(99), 1, - anon_sym_let, - STATE(130), 1, + STATE(57), 1, sym__float, - STATE(141), 1, + STATE(59), 1, sym_number, - STATE(180), 1, + STATE(91), 1, sym_expression, - STATE(216), 1, + STATE(97), 1, sym_struct_definition, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -4791,16 +4518,16 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(95), 3, + ACTIONS(21), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -4820,9 +4547,11 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [3006] = 22, + [3015] = 22, ACTIONS(7), 1, sym_string, + ACTIONS(9), 1, + aux_sym_base_ten_token1, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, @@ -4830,28 +4559,26 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, + ACTIONS(23), 1, + anon_sym_if, + ACTIONS(25), 1, + anon_sym_let, ACTIONS(27), 1, anon_sym_LPAREN, ACTIONS(29), 1, anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - ACTIONS(93), 1, - aux_sym_base_ten_token1, - ACTIONS(97), 1, - anon_sym_if, - ACTIONS(99), 1, - anon_sym_let, - STATE(86), 1, - sym_expression, - STATE(130), 1, + STATE(57), 1, sym__float, - STATE(141), 1, + STATE(59), 1, sym_number, - STATE(216), 1, + STATE(97), 1, sym_struct_definition, - STATE(298), 1, + STATE(100), 1, + sym_expression, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -4862,16 +4589,16 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(95), 3, + ACTIONS(21), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -4891,9 +4618,11 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [3099] = 22, + [3108] = 22, ACTIONS(7), 1, sym_string, + ACTIONS(9), 1, + aux_sym_base_ten_token1, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, @@ -4901,28 +4630,26 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, + ACTIONS(23), 1, + anon_sym_if, + ACTIONS(25), 1, + anon_sym_let, ACTIONS(27), 1, anon_sym_LPAREN, ACTIONS(29), 1, anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - ACTIONS(93), 1, - aux_sym_base_ten_token1, - ACTIONS(97), 1, - anon_sym_if, - ACTIONS(99), 1, - anon_sym_let, - STATE(130), 1, + STATE(57), 1, sym__float, - STATE(141), 1, + STATE(59), 1, sym_number, - STATE(181), 1, - sym_expression, - STATE(216), 1, + STATE(97), 1, sym_struct_definition, - STATE(298), 1, + STATE(122), 1, + sym_expression, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -4933,16 +4660,16 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(95), 3, + ACTIONS(21), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -4962,7 +4689,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [3192] = 22, + [3201] = 22, ACTIONS(7), 1, sym_string, ACTIONS(11), 1, @@ -4972,7 +4699,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(27), 1, anon_sym_LPAREN, ACTIONS(29), 1, @@ -4985,15 +4712,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_if, ACTIONS(99), 1, anon_sym_let, - STATE(130), 1, + STATE(104), 1, sym__float, - STATE(141), 1, + STATE(111), 1, sym_number, - STATE(182), 1, + STATE(140), 1, sym_expression, - STATE(216), 1, + STATE(143), 1, sym_struct_definition, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -5008,12 +4735,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -5033,7 +4760,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [3285] = 22, + [3294] = 22, ACTIONS(7), 1, sym_string, ACTIONS(11), 1, @@ -5043,7 +4770,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(27), 1, anon_sym_LPAREN, ACTIONS(29), 1, @@ -5056,15 +4783,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_if, ACTIONS(99), 1, anon_sym_let, - STATE(130), 1, + STATE(104), 1, sym__float, - STATE(141), 1, + STATE(111), 1, sym_number, - STATE(183), 1, + STATE(120), 1, sym_expression, - STATE(216), 1, + STATE(143), 1, sym_struct_definition, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -5079,12 +4806,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -5104,7 +4831,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [3378] = 22, + [3387] = 22, ACTIONS(7), 1, sym_string, ACTIONS(11), 1, @@ -5114,7 +4841,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(27), 1, anon_sym_LPAREN, ACTIONS(29), 1, @@ -5127,15 +4854,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_if, ACTIONS(99), 1, anon_sym_let, - STATE(130), 1, + STATE(104), 1, sym__float, - STATE(141), 1, + STATE(111), 1, sym_number, - STATE(184), 1, + STATE(124), 1, sym_expression, - STATE(216), 1, + STATE(143), 1, sym_struct_definition, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -5150,12 +4877,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -5175,7 +4902,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [3471] = 22, + [3480] = 22, ACTIONS(7), 1, sym_string, ACTIONS(11), 1, @@ -5185,7 +4912,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(27), 1, anon_sym_LPAREN, ACTIONS(29), 1, @@ -5198,15 +4925,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_if, ACTIONS(99), 1, anon_sym_let, - STATE(130), 1, + STATE(61), 1, + sym_expression, + STATE(104), 1, sym__float, - STATE(141), 1, + STATE(111), 1, sym_number, - STATE(186), 1, - sym_expression, - STATE(216), 1, + STATE(143), 1, sym_struct_definition, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -5221,12 +4948,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -5246,7 +4973,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [3564] = 22, + [3573] = 22, ACTIONS(7), 1, sym_string, ACTIONS(11), 1, @@ -5256,7 +4983,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(27), 1, anon_sym_LPAREN, ACTIONS(29), 1, @@ -5269,15 +4996,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_if, ACTIONS(99), 1, anon_sym_let, - STATE(130), 1, + STATE(104), 1, sym__float, - STATE(141), 1, + STATE(111), 1, sym_number, - STATE(187), 1, + STATE(125), 1, sym_expression, - STATE(216), 1, + STATE(143), 1, sym_struct_definition, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -5292,12 +5019,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -5317,7 +5044,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [3657] = 22, + [3666] = 22, ACTIONS(7), 1, sym_string, ACTIONS(11), 1, @@ -5327,7 +5054,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(27), 1, anon_sym_LPAREN, ACTIONS(29), 1, @@ -5340,15 +5067,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_if, ACTIONS(99), 1, anon_sym_let, - STATE(130), 1, + STATE(104), 1, sym__float, - STATE(141), 1, + STATE(111), 1, sym_number, - STATE(188), 1, + STATE(126), 1, sym_expression, - STATE(216), 1, + STATE(143), 1, sym_struct_definition, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -5363,12 +5090,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -5388,7 +5115,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [3750] = 22, + [3759] = 22, ACTIONS(7), 1, sym_string, ACTIONS(11), 1, @@ -5398,7 +5125,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(27), 1, anon_sym_LPAREN, ACTIONS(29), 1, @@ -5411,15 +5138,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_if, ACTIONS(99), 1, anon_sym_let, - STATE(130), 1, + STATE(104), 1, sym__float, - STATE(141), 1, + STATE(111), 1, sym_number, - STATE(189), 1, + STATE(127), 1, sym_expression, - STATE(216), 1, + STATE(143), 1, sym_struct_definition, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -5434,12 +5161,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -5459,7 +5186,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [3843] = 22, + [3852] = 22, ACTIONS(7), 1, sym_string, ACTIONS(11), 1, @@ -5469,7 +5196,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(27), 1, anon_sym_LPAREN, ACTIONS(29), 1, @@ -5482,15 +5209,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_if, ACTIONS(99), 1, anon_sym_let, - STATE(130), 1, + STATE(104), 1, sym__float, - STATE(141), 1, + STATE(111), 1, sym_number, - STATE(191), 1, + STATE(128), 1, sym_expression, - STATE(216), 1, + STATE(143), 1, sym_struct_definition, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -5505,12 +5232,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -5530,11 +5257,9 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [3936] = 22, + [3945] = 22, ACTIONS(7), 1, sym_string, - ACTIONS(9), 1, - aux_sym_base_ten_token1, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, @@ -5542,26 +5267,28 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, - ACTIONS(23), 1, - anon_sym_if, - ACTIONS(25), 1, - anon_sym_let, + anon_sym_LBRACE, ACTIONS(27), 1, anon_sym_LPAREN, ACTIONS(29), 1, anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(78), 1, + ACTIONS(93), 1, + aux_sym_base_ten_token1, + ACTIONS(97), 1, + anon_sym_if, + ACTIONS(99), 1, + anon_sym_let, + STATE(104), 1, sym__float, - STATE(80), 1, + STATE(111), 1, sym_number, - STATE(112), 1, - sym_struct_definition, - STATE(220), 1, + STATE(129), 1, sym_expression, - STATE(298), 1, + STATE(143), 1, + sym_struct_definition, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -5572,16 +5299,16 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(21), 3, + ACTIONS(95), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -5601,7 +5328,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [4029] = 22, + [4038] = 22, ACTIONS(7), 1, sym_string, ACTIONS(11), 1, @@ -5611,7 +5338,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 1, aux_sym_binary_token1, ACTIONS(17), 1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, ACTIONS(27), 1, anon_sym_LPAREN, ACTIONS(29), 1, @@ -5624,15 +5351,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_if, ACTIONS(99), 1, anon_sym_let, - STATE(130), 1, + STATE(104), 1, sym__float, - STATE(141), 1, + STATE(111), 1, sym_number, - STATE(200), 1, + STATE(130), 1, sym_expression, - STATE(216), 1, + STATE(143), 1, sym_struct_definition, - STATE(298), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, @@ -5647,12 +5374,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(109), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -5672,58 +5399,58 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [4122] = 22, + [4131] = 22, + ACTIONS(7), 1, + sym_string, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, aux_sym_hex_token1, ACTIONS(15), 1, aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, - aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, - anon_sym_if, - ACTIONS(115), 1, - anon_sym_let, - ACTIONS(117), 1, + ACTIONS(17), 1, + anon_sym_LBRACE, + ACTIONS(27), 1, anon_sym_LPAREN, - ACTIONS(119), 1, + ACTIONS(29), 1, anon_sym_LBRACK, - ACTIONS(121), 1, + ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(125), 1, + ACTIONS(93), 1, + aux_sym_base_ten_token1, + ACTIONS(97), 1, + anon_sym_if, + ACTIONS(99), 1, + anon_sym_let, + STATE(104), 1, sym__float, - STATE(129), 1, + STATE(111), 1, sym_number, - STATE(145), 1, - sym_struct_definition, - STATE(146), 1, + STATE(131), 1, sym_expression, - STATE(295), 1, + STATE(143), 1, + sym_struct_definition, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(101), 2, + ACTIONS(5), 2, sym_identifier, sym_self, - ACTIONS(109), 2, + ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(111), 3, + ACTIONS(95), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(214), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -5743,58 +5470,58 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [4215] = 22, + [4224] = 22, + ACTIONS(7), 1, + sym_string, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, aux_sym_hex_token1, ACTIONS(15), 1, aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, - aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, - anon_sym_if, - ACTIONS(115), 1, - anon_sym_let, - ACTIONS(117), 1, + ACTIONS(17), 1, + anon_sym_LBRACE, + ACTIONS(27), 1, anon_sym_LPAREN, - ACTIONS(119), 1, + ACTIONS(29), 1, anon_sym_LBRACK, - ACTIONS(121), 1, + ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(125), 1, + ACTIONS(93), 1, + aux_sym_base_ten_token1, + ACTIONS(97), 1, + anon_sym_if, + ACTIONS(99), 1, + anon_sym_let, + STATE(104), 1, sym__float, - STATE(129), 1, + STATE(111), 1, sym_number, - STATE(145), 1, - sym_struct_definition, - STATE(160), 1, + STATE(132), 1, sym_expression, - STATE(295), 1, + STATE(143), 1, + sym_struct_definition, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(101), 2, + ACTIONS(5), 2, sym_identifier, sym_self, - ACTIONS(109), 2, + ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(111), 3, + ACTIONS(95), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(214), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -5814,58 +5541,58 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [4308] = 22, + [4317] = 22, + ACTIONS(7), 1, + sym_string, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, aux_sym_hex_token1, ACTIONS(15), 1, aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, - aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, - anon_sym_if, - ACTIONS(115), 1, - anon_sym_let, - ACTIONS(117), 1, + ACTIONS(17), 1, + anon_sym_LBRACE, + ACTIONS(27), 1, anon_sym_LPAREN, - ACTIONS(119), 1, + ACTIONS(29), 1, anon_sym_LBRACK, - ACTIONS(121), 1, + ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(125), 1, + ACTIONS(93), 1, + aux_sym_base_ten_token1, + ACTIONS(97), 1, + anon_sym_if, + ACTIONS(99), 1, + anon_sym_let, + STATE(104), 1, sym__float, - STATE(129), 1, + STATE(111), 1, sym_number, - STATE(145), 1, - sym_struct_definition, - STATE(162), 1, + STATE(133), 1, sym_expression, - STATE(295), 1, + STATE(143), 1, + sym_struct_definition, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(101), 2, + ACTIONS(5), 2, sym_identifier, sym_self, - ACTIONS(109), 2, + ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(111), 3, + ACTIONS(95), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(214), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -5885,58 +5612,58 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [4401] = 22, + [4410] = 22, + ACTIONS(7), 1, + sym_string, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, aux_sym_hex_token1, ACTIONS(15), 1, aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, - aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, - anon_sym_if, - ACTIONS(115), 1, - anon_sym_let, - ACTIONS(117), 1, + ACTIONS(17), 1, + anon_sym_LBRACE, + ACTIONS(27), 1, anon_sym_LPAREN, - ACTIONS(119), 1, + ACTIONS(29), 1, anon_sym_LBRACK, - ACTIONS(121), 1, + ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(125), 1, + ACTIONS(93), 1, + aux_sym_base_ten_token1, + ACTIONS(97), 1, + anon_sym_if, + ACTIONS(99), 1, + anon_sym_let, + STATE(104), 1, sym__float, - STATE(129), 1, + STATE(111), 1, sym_number, - STATE(145), 1, - sym_struct_definition, - STATE(158), 1, + STATE(134), 1, sym_expression, - STATE(295), 1, + STATE(143), 1, + sym_struct_definition, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(101), 2, + ACTIONS(5), 2, sym_identifier, sym_self, - ACTIONS(109), 2, + ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(111), 3, + ACTIONS(95), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(214), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -5956,58 +5683,58 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [4494] = 22, + [4503] = 22, + ACTIONS(7), 1, + sym_string, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, aux_sym_hex_token1, ACTIONS(15), 1, aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, - aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, - anon_sym_if, - ACTIONS(115), 1, - anon_sym_let, - ACTIONS(117), 1, + ACTIONS(17), 1, + anon_sym_LBRACE, + ACTIONS(27), 1, anon_sym_LPAREN, - ACTIONS(119), 1, + ACTIONS(29), 1, anon_sym_LBRACK, - ACTIONS(121), 1, + ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(125), 1, + ACTIONS(93), 1, + aux_sym_base_ten_token1, + ACTIONS(97), 1, + anon_sym_if, + ACTIONS(99), 1, + anon_sym_let, + STATE(104), 1, sym__float, - STATE(129), 1, + STATE(111), 1, sym_number, - STATE(145), 1, - sym_struct_definition, - STATE(163), 1, + STATE(138), 1, sym_expression, - STATE(295), 1, + STATE(143), 1, + sym_struct_definition, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(101), 2, + ACTIONS(5), 2, sym_identifier, sym_self, - ACTIONS(109), 2, + ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(111), 3, + ACTIONS(95), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(214), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -6027,129 +5754,58 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [4587] = 22, + [4596] = 22, + ACTIONS(7), 1, + sym_string, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, aux_sym_hex_token1, ACTIONS(15), 1, aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, - aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, - anon_sym_if, - ACTIONS(115), 1, - anon_sym_let, - ACTIONS(117), 1, + ACTIONS(17), 1, + anon_sym_LBRACE, + ACTIONS(27), 1, anon_sym_LPAREN, - ACTIONS(119), 1, + ACTIONS(29), 1, anon_sym_LBRACK, - ACTIONS(121), 1, + ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(125), 1, - sym__float, - STATE(129), 1, - sym_number, - STATE(145), 1, - sym_struct_definition, - STATE(164), 1, - sym_expression, - STATE(295), 1, - sym_integer, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(101), 2, - sym_identifier, - sym_self, - ACTIONS(109), 2, - sym_true, - sym_false, - ACTIONS(111), 3, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_BANG, - STATE(284), 4, - sym_base_ten, - sym_octal, - sym_hex, - sym_binary, - STATE(214), 19, - sym_signed_integer, - sym_unsigned_integer, - sym_scalar, - sym_vector2, - sym_vector3, - sym_vector4, - sym_boolean, - sym_function_call, - sym_method_call, - sym_unary_expression, - sym_binary_expression, - sym_if, - sym_let_in, - sym_member_access, - sym_parenthesis, - sym_list, - sym_dictionary_construction, - sym_closure_definition, - sym_constraint_set, - [4680] = 22, - ACTIONS(11), 1, - aux_sym_octal_token1, - ACTIONS(13), 1, - aux_sym_hex_token1, - ACTIONS(15), 1, - aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, + ACTIONS(93), 1, aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, + ACTIONS(97), 1, anon_sym_if, - ACTIONS(115), 1, + ACTIONS(99), 1, anon_sym_let, - ACTIONS(117), 1, - anon_sym_LPAREN, - ACTIONS(119), 1, - anon_sym_LBRACK, - ACTIONS(121), 1, - anon_sym_LT_LT_LT, - STATE(125), 1, + STATE(104), 1, sym__float, - STATE(129), 1, + STATE(111), 1, sym_number, - STATE(145), 1, - sym_struct_definition, - STATE(165), 1, + STATE(139), 1, sym_expression, - STATE(295), 1, + STATE(143), 1, + sym_struct_definition, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(101), 2, + ACTIONS(5), 2, sym_identifier, sym_self, - ACTIONS(109), 2, + ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(111), 3, + ACTIONS(95), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(214), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -6169,58 +5825,58 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [4773] = 22, + [4689] = 22, + ACTIONS(7), 1, + sym_string, + ACTIONS(9), 1, + aux_sym_base_ten_token1, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, aux_sym_hex_token1, ACTIONS(15), 1, aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, - aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, + ACTIONS(17), 1, + anon_sym_LBRACE, + ACTIONS(23), 1, anon_sym_if, - ACTIONS(115), 1, + ACTIONS(25), 1, anon_sym_let, - ACTIONS(117), 1, + ACTIONS(27), 1, anon_sym_LPAREN, - ACTIONS(119), 1, + ACTIONS(29), 1, anon_sym_LBRACK, - ACTIONS(121), 1, + ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(125), 1, + STATE(57), 1, sym__float, - STATE(129), 1, + STATE(59), 1, sym_number, - STATE(145), 1, + STATE(97), 1, sym_struct_definition, - STATE(149), 1, + STATE(137), 1, sym_expression, - STATE(295), 1, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(101), 2, + ACTIONS(5), 2, sym_identifier, sym_self, - ACTIONS(109), 2, + ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(111), 3, + ACTIONS(21), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(214), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -6240,58 +5896,58 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [4866] = 22, + [4782] = 22, + ACTIONS(7), 1, + sym_string, + ACTIONS(9), 1, + aux_sym_base_ten_token1, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, aux_sym_hex_token1, ACTIONS(15), 1, aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, - aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, + ACTIONS(17), 1, + anon_sym_LBRACE, + ACTIONS(23), 1, anon_sym_if, - ACTIONS(115), 1, + ACTIONS(25), 1, anon_sym_let, - ACTIONS(117), 1, + ACTIONS(27), 1, anon_sym_LPAREN, - ACTIONS(119), 1, + ACTIONS(29), 1, anon_sym_LBRACK, - ACTIONS(121), 1, + ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(125), 1, + STATE(57), 1, sym__float, - STATE(129), 1, + STATE(59), 1, sym_number, - STATE(134), 1, - sym_expression, - STATE(145), 1, + STATE(97), 1, sym_struct_definition, - STATE(295), 1, + STATE(141), 1, + sym_expression, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(101), 2, + ACTIONS(5), 2, sym_identifier, sym_self, - ACTIONS(109), 2, + ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(111), 3, + ACTIONS(21), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(214), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -6311,58 +5967,58 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [4959] = 22, + [4875] = 22, + ACTIONS(7), 1, + sym_string, + ACTIONS(9), 1, + aux_sym_base_ten_token1, ACTIONS(11), 1, aux_sym_octal_token1, ACTIONS(13), 1, aux_sym_hex_token1, ACTIONS(15), 1, aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, - aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, + ACTIONS(17), 1, + anon_sym_LBRACE, + ACTIONS(23), 1, anon_sym_if, - ACTIONS(115), 1, + ACTIONS(25), 1, anon_sym_let, - ACTIONS(117), 1, + ACTIONS(27), 1, anon_sym_LPAREN, - ACTIONS(119), 1, + ACTIONS(29), 1, anon_sym_LBRACK, - ACTIONS(121), 1, + ACTIONS(31), 1, anon_sym_LT_LT_LT, - STATE(125), 1, + STATE(57), 1, sym__float, - STATE(129), 1, + STATE(59), 1, sym_number, - STATE(135), 1, - sym_expression, - STATE(145), 1, + STATE(97), 1, sym_struct_definition, - STATE(295), 1, + STATE(98), 1, + sym_expression, + STATE(201), 1, sym_integer, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(101), 2, + ACTIONS(5), 2, sym_identifier, sym_self, - ACTIONS(109), 2, + ACTIONS(19), 2, sym_true, sym_false, - ACTIONS(111), 3, + ACTIONS(21), 3, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, - STATE(284), 4, + STATE(202), 4, sym_base_ten, sym_octal, sym_hex, sym_binary, - STATE(214), 19, + STATE(92), 19, sym_signed_integer, sym_unsigned_integer, sym_scalar, @@ -6382,3336 +6038,80 @@ static const uint16_t ts_small_parse_table[] = { sym_dictionary_construction, sym_closure_definition, sym_constraint_set, - [5052] = 22, - ACTIONS(11), 1, - aux_sym_octal_token1, - ACTIONS(13), 1, - aux_sym_hex_token1, - ACTIONS(15), 1, - aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, - aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, - anon_sym_if, - ACTIONS(115), 1, - anon_sym_let, - ACTIONS(117), 1, - anon_sym_LPAREN, - ACTIONS(119), 1, - anon_sym_LBRACK, - ACTIONS(121), 1, - anon_sym_LT_LT_LT, - STATE(125), 1, - sym__float, - STATE(129), 1, - sym_number, - STATE(136), 1, - sym_expression, - STATE(145), 1, - sym_struct_definition, - STATE(295), 1, - sym_integer, + [4968] = 4, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(101), 2, + ACTIONS(105), 2, + aux_sym_signed_integer_token1, + aux_sym_unsigned_integer_token1, + ACTIONS(103), 10, sym_identifier, - sym_self, - ACTIONS(109), 2, - sym_true, - sym_false, - ACTIONS(111), 3, + anon_sym_STAR, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_GT, + anon_sym_LT, + anon_sym_else, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(101), 23, + ts_builtin_sym_end, + sym_unit_quote, + anon_sym_DOT, + anon_sym_COMMA, + anon_sym_RBRACE, + anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, - anon_sym_BANG, - STATE(284), 4, - sym_base_ten, - sym_octal, - sym_hex, - sym_binary, - STATE(214), 19, - sym_signed_integer, - sym_unsigned_integer, - sym_scalar, - sym_vector2, - sym_vector3, - sym_vector4, - sym_boolean, - sym_function_call, - sym_method_call, - sym_unary_expression, - sym_binary_expression, - sym_if, - sym_let_in, - sym_member_access, - sym_parenthesis, - sym_list, - sym_dictionary_construction, - sym_closure_definition, - sym_constraint_set, - [5145] = 22, - ACTIONS(11), 1, - aux_sym_octal_token1, - ACTIONS(13), 1, - aux_sym_hex_token1, - ACTIONS(15), 1, - aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, - aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, - anon_sym_if, - ACTIONS(115), 1, - anon_sym_let, - ACTIONS(117), 1, + anon_sym_STAR_STAR, + anon_sym_SLASH, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_LT_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_CARET_CARET, + anon_sym_SEMI, anon_sym_LPAREN, - ACTIONS(119), 1, - anon_sym_LBRACK, - ACTIONS(121), 1, - anon_sym_LT_LT_LT, - STATE(125), 1, - sym__float, - STATE(129), 1, - sym_number, - STATE(137), 1, - sym_expression, - STATE(145), 1, - sym_struct_definition, - STATE(295), 1, - sym_integer, + anon_sym_RPAREN, + anon_sym_RBRACK, + [5014] = 6, + ACTIONS(109), 1, + sym_identifier, + ACTIONS(111), 1, + sym_unit_quote, + STATE(63), 1, + sym__unit, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(101), 2, - sym_identifier, - sym_self, - ACTIONS(109), 2, - sym_true, - sym_false, - ACTIONS(111), 3, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_BANG, - STATE(284), 4, - sym_base_ten, - sym_octal, - sym_hex, - sym_binary, - STATE(214), 19, - sym_signed_integer, - sym_unsigned_integer, - sym_scalar, - sym_vector2, - sym_vector3, - sym_vector4, - sym_boolean, - sym_function_call, - sym_method_call, - sym_unary_expression, - sym_binary_expression, - sym_if, - sym_let_in, - sym_member_access, - sym_parenthesis, - sym_list, - sym_dictionary_construction, - sym_closure_definition, - sym_constraint_set, - [5238] = 22, - ACTIONS(11), 1, - aux_sym_octal_token1, - ACTIONS(13), 1, - aux_sym_hex_token1, - ACTIONS(15), 1, - aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, - aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, - anon_sym_if, - ACTIONS(115), 1, - anon_sym_let, - ACTIONS(117), 1, - anon_sym_LPAREN, - ACTIONS(119), 1, - anon_sym_LBRACK, - ACTIONS(121), 1, - anon_sym_LT_LT_LT, - STATE(125), 1, - sym__float, - STATE(129), 1, - sym_number, - STATE(138), 1, - sym_expression, - STATE(145), 1, - sym_struct_definition, - STATE(295), 1, - sym_integer, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(101), 2, - sym_identifier, - sym_self, - ACTIONS(109), 2, - sym_true, - sym_false, - ACTIONS(111), 3, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_BANG, - STATE(284), 4, - sym_base_ten, - sym_octal, - sym_hex, - sym_binary, - STATE(214), 19, - sym_signed_integer, - sym_unsigned_integer, - sym_scalar, - sym_vector2, - sym_vector3, - sym_vector4, - sym_boolean, - sym_function_call, - sym_method_call, - sym_unary_expression, - sym_binary_expression, - sym_if, - sym_let_in, - sym_member_access, - sym_parenthesis, - sym_list, - sym_dictionary_construction, - sym_closure_definition, - sym_constraint_set, - [5331] = 22, - ACTIONS(11), 1, - aux_sym_octal_token1, - ACTIONS(13), 1, - aux_sym_hex_token1, - ACTIONS(15), 1, - aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, - aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, - anon_sym_if, - ACTIONS(115), 1, - anon_sym_let, - ACTIONS(117), 1, - anon_sym_LPAREN, - ACTIONS(119), 1, - anon_sym_LBRACK, - ACTIONS(121), 1, - anon_sym_LT_LT_LT, - STATE(125), 1, - sym__float, - STATE(129), 1, - sym_number, - STATE(139), 1, - sym_expression, - STATE(145), 1, - sym_struct_definition, - STATE(295), 1, - sym_integer, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(101), 2, - sym_identifier, - sym_self, - ACTIONS(109), 2, - sym_true, - sym_false, - ACTIONS(111), 3, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_BANG, - STATE(284), 4, - sym_base_ten, - sym_octal, - sym_hex, - sym_binary, - STATE(214), 19, - sym_signed_integer, - sym_unsigned_integer, - sym_scalar, - sym_vector2, - sym_vector3, - sym_vector4, - sym_boolean, - sym_function_call, - sym_method_call, - sym_unary_expression, - sym_binary_expression, - sym_if, - sym_let_in, - sym_member_access, - sym_parenthesis, - sym_list, - sym_dictionary_construction, - sym_closure_definition, - sym_constraint_set, - [5424] = 22, - ACTIONS(11), 1, - aux_sym_octal_token1, - ACTIONS(13), 1, - aux_sym_hex_token1, - ACTIONS(15), 1, - aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, - aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, - anon_sym_if, - ACTIONS(115), 1, - anon_sym_let, - ACTIONS(117), 1, - anon_sym_LPAREN, - ACTIONS(119), 1, - anon_sym_LBRACK, - ACTIONS(121), 1, - anon_sym_LT_LT_LT, - STATE(125), 1, - sym__float, - STATE(129), 1, - sym_number, - STATE(142), 1, - sym_expression, - STATE(145), 1, - sym_struct_definition, - STATE(295), 1, - sym_integer, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(101), 2, - sym_identifier, - sym_self, - ACTIONS(109), 2, - sym_true, - sym_false, - ACTIONS(111), 3, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_BANG, - STATE(284), 4, - sym_base_ten, - sym_octal, - sym_hex, - sym_binary, - STATE(214), 19, - sym_signed_integer, - sym_unsigned_integer, - sym_scalar, - sym_vector2, - sym_vector3, - sym_vector4, - sym_boolean, - sym_function_call, - sym_method_call, - sym_unary_expression, - sym_binary_expression, - sym_if, - sym_let_in, - sym_member_access, - sym_parenthesis, - sym_list, - sym_dictionary_construction, - sym_closure_definition, - sym_constraint_set, - [5517] = 22, - ACTIONS(11), 1, - aux_sym_octal_token1, - ACTIONS(13), 1, - aux_sym_hex_token1, - ACTIONS(15), 1, - aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, - aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, - anon_sym_if, - ACTIONS(115), 1, - anon_sym_let, - ACTIONS(117), 1, - anon_sym_LPAREN, - ACTIONS(119), 1, - anon_sym_LBRACK, - ACTIONS(121), 1, - anon_sym_LT_LT_LT, - STATE(125), 1, - sym__float, - STATE(129), 1, - sym_number, - STATE(143), 1, - sym_expression, - STATE(145), 1, - sym_struct_definition, - STATE(295), 1, - sym_integer, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(101), 2, - sym_identifier, - sym_self, - ACTIONS(109), 2, - sym_true, - sym_false, - ACTIONS(111), 3, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_BANG, - STATE(284), 4, - sym_base_ten, - sym_octal, - sym_hex, - sym_binary, - STATE(214), 19, - sym_signed_integer, - sym_unsigned_integer, - sym_scalar, - sym_vector2, - sym_vector3, - sym_vector4, - sym_boolean, - sym_function_call, - sym_method_call, - sym_unary_expression, - sym_binary_expression, - sym_if, - sym_let_in, - sym_member_access, - sym_parenthesis, - sym_list, - sym_dictionary_construction, - sym_closure_definition, - sym_constraint_set, - [5610] = 22, - ACTIONS(7), 1, - sym_string, - ACTIONS(9), 1, - aux_sym_base_ten_token1, - ACTIONS(11), 1, - aux_sym_octal_token1, - ACTIONS(13), 1, - aux_sym_hex_token1, - ACTIONS(15), 1, - aux_sym_binary_token1, - ACTIONS(17), 1, - anon_sym_LT_LPAREN, - ACTIONS(23), 1, - anon_sym_if, - ACTIONS(25), 1, - anon_sym_let, - ACTIONS(27), 1, - anon_sym_LPAREN, - ACTIONS(29), 1, - anon_sym_LBRACK, - ACTIONS(31), 1, - anon_sym_LT_LT_LT, - STATE(78), 1, - sym__float, - STATE(80), 1, - sym_number, - STATE(112), 1, - sym_struct_definition, - STATE(116), 1, - sym_expression, - STATE(298), 1, - sym_integer, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(5), 2, - sym_identifier, - sym_self, - ACTIONS(19), 2, - sym_true, - sym_false, - ACTIONS(21), 3, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_BANG, - STATE(284), 4, - sym_base_ten, - sym_octal, - sym_hex, - sym_binary, - STATE(109), 19, - sym_signed_integer, - sym_unsigned_integer, - sym_scalar, - sym_vector2, - sym_vector3, - sym_vector4, - sym_boolean, - sym_function_call, - sym_method_call, - sym_unary_expression, - sym_binary_expression, - sym_if, - sym_let_in, - sym_member_access, - sym_parenthesis, - sym_list, - sym_dictionary_construction, - sym_closure_definition, - sym_constraint_set, - [5703] = 22, - ACTIONS(7), 1, - sym_string, - ACTIONS(9), 1, - aux_sym_base_ten_token1, - ACTIONS(11), 1, - aux_sym_octal_token1, - ACTIONS(13), 1, - aux_sym_hex_token1, - ACTIONS(15), 1, - aux_sym_binary_token1, - ACTIONS(17), 1, - anon_sym_LT_LPAREN, - ACTIONS(23), 1, - anon_sym_if, - ACTIONS(25), 1, - anon_sym_let, - ACTIONS(27), 1, - anon_sym_LPAREN, - ACTIONS(29), 1, - anon_sym_LBRACK, - ACTIONS(31), 1, - anon_sym_LT_LT_LT, - STATE(78), 1, - sym__float, - STATE(80), 1, - sym_number, - STATE(112), 1, - sym_struct_definition, - STATE(122), 1, - sym_expression, - STATE(298), 1, - sym_integer, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(5), 2, - sym_identifier, - sym_self, - ACTIONS(19), 2, - sym_true, - sym_false, - ACTIONS(21), 3, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_BANG, - STATE(284), 4, - sym_base_ten, - sym_octal, - sym_hex, - sym_binary, - STATE(109), 19, - sym_signed_integer, - sym_unsigned_integer, - sym_scalar, - sym_vector2, - sym_vector3, - sym_vector4, - sym_boolean, - sym_function_call, - sym_method_call, - sym_unary_expression, - sym_binary_expression, - sym_if, - sym_let_in, - sym_member_access, - sym_parenthesis, - sym_list, - sym_dictionary_construction, - sym_closure_definition, - sym_constraint_set, - [5796] = 22, - ACTIONS(7), 1, - sym_string, - ACTIONS(9), 1, - aux_sym_base_ten_token1, - ACTIONS(11), 1, - aux_sym_octal_token1, - ACTIONS(13), 1, - aux_sym_hex_token1, - ACTIONS(15), 1, - aux_sym_binary_token1, - ACTIONS(17), 1, - anon_sym_LT_LPAREN, - ACTIONS(23), 1, - anon_sym_if, - ACTIONS(25), 1, - anon_sym_let, - ACTIONS(27), 1, - anon_sym_LPAREN, - ACTIONS(29), 1, - anon_sym_LBRACK, - ACTIONS(31), 1, - anon_sym_LT_LT_LT, - STATE(78), 1, - sym__float, - STATE(80), 1, - sym_number, - STATE(92), 1, - sym_expression, - STATE(112), 1, - sym_struct_definition, - STATE(298), 1, - sym_integer, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(5), 2, - sym_identifier, - sym_self, - ACTIONS(19), 2, - sym_true, - sym_false, - ACTIONS(21), 3, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_BANG, - STATE(284), 4, - sym_base_ten, - sym_octal, - sym_hex, - sym_binary, - STATE(109), 19, - sym_signed_integer, - sym_unsigned_integer, - sym_scalar, - sym_vector2, - sym_vector3, - sym_vector4, - sym_boolean, - sym_function_call, - sym_method_call, - sym_unary_expression, - sym_binary_expression, - sym_if, - sym_let_in, - sym_member_access, - sym_parenthesis, - sym_list, - sym_dictionary_construction, - sym_closure_definition, - sym_constraint_set, - [5889] = 22, - ACTIONS(7), 1, - sym_string, - ACTIONS(9), 1, - aux_sym_base_ten_token1, - ACTIONS(11), 1, - aux_sym_octal_token1, - ACTIONS(13), 1, - aux_sym_hex_token1, - ACTIONS(15), 1, - aux_sym_binary_token1, - ACTIONS(17), 1, - anon_sym_LT_LPAREN, - ACTIONS(23), 1, - anon_sym_if, - ACTIONS(25), 1, - anon_sym_let, - ACTIONS(27), 1, - anon_sym_LPAREN, - ACTIONS(29), 1, - anon_sym_LBRACK, - ACTIONS(31), 1, - anon_sym_LT_LT_LT, - STATE(78), 1, - sym__float, - STATE(80), 1, - sym_number, - STATE(112), 1, - sym_struct_definition, - STATE(209), 1, - sym_expression, - STATE(298), 1, - sym_integer, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(5), 2, - sym_identifier, - sym_self, - ACTIONS(19), 2, - sym_true, - sym_false, - ACTIONS(21), 3, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_BANG, - STATE(284), 4, - sym_base_ten, - sym_octal, - sym_hex, - sym_binary, - STATE(109), 19, - sym_signed_integer, - sym_unsigned_integer, - sym_scalar, - sym_vector2, - sym_vector3, - sym_vector4, - sym_boolean, - sym_function_call, - sym_method_call, - sym_unary_expression, - sym_binary_expression, - sym_if, - sym_let_in, - sym_member_access, - sym_parenthesis, - sym_list, - sym_dictionary_construction, - sym_closure_definition, - sym_constraint_set, - [5982] = 22, - ACTIONS(11), 1, - aux_sym_octal_token1, - ACTIONS(13), 1, - aux_sym_hex_token1, - ACTIONS(15), 1, - aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, - aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, - anon_sym_if, - ACTIONS(115), 1, - anon_sym_let, - ACTIONS(117), 1, - anon_sym_LPAREN, - ACTIONS(119), 1, - anon_sym_LBRACK, - ACTIONS(121), 1, - anon_sym_LT_LT_LT, - STATE(125), 1, - sym__float, - STATE(129), 1, - sym_number, - STATE(133), 1, - sym_expression, - STATE(145), 1, - sym_struct_definition, - STATE(295), 1, - sym_integer, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(101), 2, - sym_identifier, - sym_self, - ACTIONS(109), 2, - sym_true, - sym_false, - ACTIONS(111), 3, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_BANG, - STATE(284), 4, - sym_base_ten, - sym_octal, - sym_hex, - sym_binary, - STATE(214), 19, - sym_signed_integer, - sym_unsigned_integer, - sym_scalar, - sym_vector2, - sym_vector3, - sym_vector4, - sym_boolean, - sym_function_call, - sym_method_call, - sym_unary_expression, - sym_binary_expression, - sym_if, - sym_let_in, - sym_member_access, - sym_parenthesis, - sym_list, - sym_dictionary_construction, - sym_closure_definition, - sym_constraint_set, - [6075] = 22, - ACTIONS(7), 1, - sym_string, - ACTIONS(9), 1, - aux_sym_base_ten_token1, - ACTIONS(11), 1, - aux_sym_octal_token1, - ACTIONS(13), 1, - aux_sym_hex_token1, - ACTIONS(15), 1, - aux_sym_binary_token1, - ACTIONS(17), 1, - anon_sym_LT_LPAREN, - ACTIONS(23), 1, - anon_sym_if, - ACTIONS(25), 1, - anon_sym_let, - ACTIONS(27), 1, - anon_sym_LPAREN, - ACTIONS(29), 1, - anon_sym_LBRACK, - ACTIONS(31), 1, - anon_sym_LT_LT_LT, - STATE(78), 1, - sym__float, - STATE(80), 1, - sym_number, - STATE(112), 1, - sym_struct_definition, - STATE(210), 1, - sym_expression, - STATE(298), 1, - sym_integer, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(5), 2, - sym_identifier, - sym_self, - ACTIONS(19), 2, - sym_true, - sym_false, - ACTIONS(21), 3, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_BANG, - STATE(284), 4, - sym_base_ten, - sym_octal, - sym_hex, - sym_binary, - STATE(109), 19, - sym_signed_integer, - sym_unsigned_integer, - sym_scalar, - sym_vector2, - sym_vector3, - sym_vector4, - sym_boolean, - sym_function_call, - sym_method_call, - sym_unary_expression, - sym_binary_expression, - sym_if, - sym_let_in, - sym_member_access, - sym_parenthesis, - sym_list, - sym_dictionary_construction, - sym_closure_definition, - sym_constraint_set, - [6168] = 22, - ACTIONS(11), 1, - aux_sym_octal_token1, - ACTIONS(13), 1, - aux_sym_hex_token1, - ACTIONS(15), 1, - aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, - aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, - anon_sym_if, - ACTIONS(115), 1, - anon_sym_let, - ACTIONS(117), 1, - anon_sym_LPAREN, - ACTIONS(119), 1, - anon_sym_LBRACK, - ACTIONS(121), 1, - anon_sym_LT_LT_LT, - STATE(125), 1, - sym__float, - STATE(129), 1, - sym_number, - STATE(145), 1, - sym_struct_definition, - STATE(154), 1, - sym_expression, - STATE(295), 1, - sym_integer, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(101), 2, - sym_identifier, - sym_self, - ACTIONS(109), 2, - sym_true, - sym_false, - ACTIONS(111), 3, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_BANG, - STATE(284), 4, - sym_base_ten, - sym_octal, - sym_hex, - sym_binary, - STATE(214), 19, - sym_signed_integer, - sym_unsigned_integer, - sym_scalar, - sym_vector2, - sym_vector3, - sym_vector4, - sym_boolean, - sym_function_call, - sym_method_call, - sym_unary_expression, - sym_binary_expression, - sym_if, - sym_let_in, - sym_member_access, - sym_parenthesis, - sym_list, - sym_dictionary_construction, - sym_closure_definition, - sym_constraint_set, - [6261] = 22, - ACTIONS(11), 1, - aux_sym_octal_token1, - ACTIONS(13), 1, - aux_sym_hex_token1, - ACTIONS(15), 1, - aux_sym_binary_token1, - ACTIONS(103), 1, - sym_string, - ACTIONS(105), 1, - aux_sym_base_ten_token1, - ACTIONS(107), 1, - anon_sym_LT_LPAREN, - ACTIONS(113), 1, - anon_sym_if, - ACTIONS(115), 1, - anon_sym_let, - ACTIONS(117), 1, - anon_sym_LPAREN, - ACTIONS(119), 1, - anon_sym_LBRACK, - ACTIONS(121), 1, - anon_sym_LT_LT_LT, - STATE(125), 1, - sym__float, - STATE(129), 1, - sym_number, - STATE(145), 1, - sym_struct_definition, - STATE(211), 1, - sym_expression, - STATE(295), 1, - sym_integer, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(101), 2, - sym_identifier, - sym_self, - ACTIONS(109), 2, - sym_true, - sym_false, - ACTIONS(111), 3, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_BANG, - STATE(284), 4, - sym_base_ten, - sym_octal, - sym_hex, - sym_binary, - STATE(214), 19, - sym_signed_integer, - sym_unsigned_integer, - sym_scalar, - sym_vector2, - sym_vector3, - sym_vector4, - sym_boolean, - sym_function_call, - sym_method_call, - sym_unary_expression, - sym_binary_expression, - sym_if, - sym_let_in, - sym_member_access, - sym_parenthesis, - sym_list, - sym_dictionary_construction, - sym_closure_definition, - sym_constraint_set, - [6354] = 22, - ACTIONS(7), 1, - sym_string, - ACTIONS(9), 1, - aux_sym_base_ten_token1, - ACTIONS(11), 1, - aux_sym_octal_token1, - ACTIONS(13), 1, - aux_sym_hex_token1, - ACTIONS(15), 1, - aux_sym_binary_token1, - ACTIONS(17), 1, - anon_sym_LT_LPAREN, - ACTIONS(23), 1, - anon_sym_if, - ACTIONS(25), 1, - anon_sym_let, - ACTIONS(27), 1, - anon_sym_LPAREN, - ACTIONS(29), 1, - anon_sym_LBRACK, - ACTIONS(31), 1, - anon_sym_LT_LT_LT, - STATE(78), 1, - sym__float, - STATE(80), 1, - sym_number, - STATE(112), 1, - sym_struct_definition, - STATE(212), 1, - sym_expression, - STATE(298), 1, - sym_integer, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(5), 2, - sym_identifier, - sym_self, - ACTIONS(19), 2, - sym_true, - sym_false, - ACTIONS(21), 3, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_BANG, - STATE(284), 4, - sym_base_ten, - sym_octal, - sym_hex, - sym_binary, - STATE(109), 19, - sym_signed_integer, - sym_unsigned_integer, - sym_scalar, - sym_vector2, - sym_vector3, - sym_vector4, - sym_boolean, - sym_function_call, - sym_method_call, - sym_unary_expression, - sym_binary_expression, - sym_if, - sym_let_in, - sym_member_access, - sym_parenthesis, - sym_list, - sym_dictionary_construction, - sym_closure_definition, - sym_constraint_set, - [6447] = 22, - ACTIONS(7), 1, - sym_string, - ACTIONS(9), 1, - aux_sym_base_ten_token1, - ACTIONS(11), 1, - aux_sym_octal_token1, - ACTIONS(13), 1, - aux_sym_hex_token1, - ACTIONS(15), 1, - aux_sym_binary_token1, - ACTIONS(17), 1, - anon_sym_LT_LPAREN, - ACTIONS(23), 1, - anon_sym_if, - ACTIONS(25), 1, - anon_sym_let, - ACTIONS(27), 1, - anon_sym_LPAREN, - ACTIONS(29), 1, - anon_sym_LBRACK, - ACTIONS(31), 1, - anon_sym_LT_LT_LT, - STATE(78), 1, - sym__float, - STATE(80), 1, - sym_number, - STATE(112), 1, - sym_struct_definition, - STATE(167), 1, - sym_expression, - STATE(298), 1, - sym_integer, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(5), 2, - sym_identifier, - sym_self, - ACTIONS(19), 2, - sym_true, - sym_false, - ACTIONS(21), 3, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_BANG, - STATE(284), 4, - sym_base_ten, - sym_octal, - sym_hex, - sym_binary, - STATE(109), 19, - sym_signed_integer, - sym_unsigned_integer, - sym_scalar, - sym_vector2, - sym_vector3, - sym_vector4, - sym_boolean, - sym_function_call, - sym_method_call, - sym_unary_expression, - sym_binary_expression, - sym_if, - sym_let_in, - sym_member_access, - sym_parenthesis, - sym_list, - sym_dictionary_construction, - sym_closure_definition, - sym_constraint_set, - [6540] = 22, - ACTIONS(7), 1, - sym_string, - ACTIONS(9), 1, - aux_sym_base_ten_token1, - ACTIONS(11), 1, - aux_sym_octal_token1, - ACTIONS(13), 1, - aux_sym_hex_token1, - ACTIONS(15), 1, - aux_sym_binary_token1, - ACTIONS(17), 1, - anon_sym_LT_LPAREN, - ACTIONS(23), 1, - anon_sym_if, - ACTIONS(25), 1, - anon_sym_let, - ACTIONS(27), 1, - anon_sym_LPAREN, - ACTIONS(29), 1, - anon_sym_LBRACK, - ACTIONS(31), 1, - anon_sym_LT_LT_LT, - STATE(78), 1, - sym__float, - STATE(80), 1, - sym_number, - STATE(112), 1, - sym_struct_definition, - STATE(217), 1, - sym_expression, - STATE(298), 1, - sym_integer, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(5), 2, - sym_identifier, - sym_self, - ACTIONS(19), 2, - sym_true, - sym_false, - ACTIONS(21), 3, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_BANG, - STATE(284), 4, - sym_base_ten, - sym_octal, - sym_hex, - sym_binary, - STATE(109), 19, - sym_signed_integer, - sym_unsigned_integer, - sym_scalar, - sym_vector2, - sym_vector3, - sym_vector4, - sym_boolean, - sym_function_call, - sym_method_call, - sym_unary_expression, - sym_binary_expression, - sym_if, - sym_let_in, - sym_member_access, - sym_parenthesis, - sym_list, - sym_dictionary_construction, - sym_closure_definition, - sym_constraint_set, - [6633] = 22, - ACTIONS(7), 1, - sym_string, - ACTIONS(11), 1, - aux_sym_octal_token1, - ACTIONS(13), 1, - aux_sym_hex_token1, - ACTIONS(15), 1, - aux_sym_binary_token1, - ACTIONS(17), 1, - anon_sym_LT_LPAREN, - ACTIONS(27), 1, - anon_sym_LPAREN, - ACTIONS(29), 1, - anon_sym_LBRACK, - ACTIONS(31), 1, - anon_sym_LT_LT_LT, - ACTIONS(93), 1, - aux_sym_base_ten_token1, - ACTIONS(97), 1, - anon_sym_if, - ACTIONS(99), 1, - anon_sym_let, - STATE(130), 1, - sym__float, - STATE(141), 1, - sym_number, - STATE(216), 1, - sym_struct_definition, - STATE(218), 1, - sym_expression, - STATE(298), 1, - sym_integer, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(5), 2, - sym_identifier, - sym_self, - ACTIONS(19), 2, - sym_true, - sym_false, - ACTIONS(95), 3, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_BANG, - STATE(284), 4, - sym_base_ten, - sym_octal, - sym_hex, - sym_binary, - STATE(109), 19, - sym_signed_integer, - sym_unsigned_integer, - sym_scalar, - sym_vector2, - sym_vector3, - sym_vector4, - sym_boolean, - sym_function_call, - sym_method_call, - sym_unary_expression, - sym_binary_expression, - sym_if, - sym_let_in, - sym_member_access, - sym_parenthesis, - sym_list, - sym_dictionary_construction, - sym_closure_definition, - sym_constraint_set, - [6726] = 22, - ACTIONS(7), 1, - sym_string, - ACTIONS(11), 1, - aux_sym_octal_token1, - ACTIONS(13), 1, - aux_sym_hex_token1, - ACTIONS(15), 1, - aux_sym_binary_token1, - ACTIONS(17), 1, - anon_sym_LT_LPAREN, - ACTIONS(27), 1, - anon_sym_LPAREN, - ACTIONS(29), 1, - anon_sym_LBRACK, - ACTIONS(31), 1, - anon_sym_LT_LT_LT, - ACTIONS(93), 1, - aux_sym_base_ten_token1, - ACTIONS(97), 1, - anon_sym_if, - ACTIONS(99), 1, - anon_sym_let, - STATE(130), 1, - sym__float, - STATE(141), 1, - sym_number, - STATE(216), 1, - sym_struct_definition, - STATE(219), 1, - sym_expression, - STATE(298), 1, - sym_integer, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(5), 2, - sym_identifier, - sym_self, - ACTIONS(19), 2, - sym_true, - sym_false, - ACTIONS(95), 3, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_BANG, - STATE(284), 4, - sym_base_ten, - sym_octal, - sym_hex, - sym_binary, - STATE(109), 19, - sym_signed_integer, - sym_unsigned_integer, - sym_scalar, - sym_vector2, - sym_vector3, - sym_vector4, - sym_boolean, - sym_function_call, - sym_method_call, - sym_unary_expression, - sym_binary_expression, - sym_if, - sym_let_in, - sym_member_access, - sym_parenthesis, - sym_list, - sym_dictionary_construction, - sym_closure_definition, - sym_constraint_set, - [6819] = 22, - ACTIONS(7), 1, - sym_string, - ACTIONS(11), 1, - aux_sym_octal_token1, - ACTIONS(13), 1, - aux_sym_hex_token1, - ACTIONS(15), 1, - aux_sym_binary_token1, - ACTIONS(17), 1, - anon_sym_LT_LPAREN, - ACTIONS(27), 1, - anon_sym_LPAREN, - ACTIONS(29), 1, - anon_sym_LBRACK, - ACTIONS(31), 1, - anon_sym_LT_LT_LT, - ACTIONS(93), 1, - aux_sym_base_ten_token1, - ACTIONS(97), 1, - anon_sym_if, - ACTIONS(99), 1, - anon_sym_let, - STATE(130), 1, - sym__float, - STATE(141), 1, - sym_number, - STATE(199), 1, - sym_expression, - STATE(216), 1, - sym_struct_definition, - STATE(298), 1, - sym_integer, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(5), 2, - sym_identifier, - sym_self, - ACTIONS(19), 2, - sym_true, - sym_false, - ACTIONS(95), 3, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_BANG, - STATE(284), 4, - sym_base_ten, - sym_octal, - sym_hex, - sym_binary, - STATE(109), 19, - sym_signed_integer, - sym_unsigned_integer, - sym_scalar, - sym_vector2, - sym_vector3, - sym_vector4, - sym_boolean, - sym_function_call, - sym_method_call, - sym_unary_expression, - sym_binary_expression, - sym_if, - sym_let_in, - sym_member_access, - sym_parenthesis, - sym_list, - sym_dictionary_construction, - sym_closure_definition, - sym_constraint_set, - [6912] = 6, - ACTIONS(125), 1, - sym_identifier, - ACTIONS(127), 1, - sym_unit_quote, - STATE(88), 1, - sym__unit, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(129), 10, - anon_sym_STAR, - anon_sym_GT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_else, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(123), 21, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_GT_GT_GT, - [6961] = 4, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(135), 2, - aux_sym_signed_integer_token1, - aux_sym_unsigned_integer_token1, - ACTIONS(133), 10, - sym_identifier, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_else, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(131), 22, - ts_builtin_sym_end, - sym_unit_quote, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - [7006] = 4, - ACTIONS(141), 1, - anon_sym_DOT, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(139), 11, - sym_identifier, - anon_sym_STAR, - anon_sym_GT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_else, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(137), 21, - ts_builtin_sym_end, - sym_unit_quote, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_GT_GT_GT, - [7050] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(145), 11, - sym_identifier, - anon_sym_STAR, - anon_sym_GT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_else, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(143), 22, - ts_builtin_sym_end, - sym_unit_quote, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_GT_GT_GT, - [7092] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(133), 11, - sym_identifier, - anon_sym_STAR, - anon_sym_GT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_else, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(131), 22, - ts_builtin_sym_end, - sym_unit_quote, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_GT_GT_GT, - [7134] = 4, - ACTIONS(151), 1, - anon_sym_DASH_GT, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(149), 9, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(147), 22, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - [7177] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(155), 9, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(153), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_DASH_GT, - [7218] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(159), 9, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(157), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_DASH_GT, - [7259] = 7, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - STATE(90), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(167), 8, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(161), 20, - ts_builtin_sym_end, - anon_sym_COMMA, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_RPAREN, - anon_sym_RBRACK, - [7308] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(173), 9, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(171), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_DASH_GT, - [7349] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(177), 9, - anon_sym_STAR, - anon_sym_GT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(175), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_GT_GT_GT, - [7390] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(181), 8, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(179), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - [7430] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(185), 8, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(183), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - [7470] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(189), 8, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(187), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - [7510] = 10, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - ACTIONS(191), 1, - anon_sym_STAR_STAR, - ACTIONS(193), 1, - anon_sym_STAR, - ACTIONS(195), 1, - anon_sym_SLASH, - STATE(90), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(167), 7, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(161), 17, - ts_builtin_sym_end, - anon_sym_COMMA, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_else, - anon_sym_SEMI, - anon_sym_RPAREN, - anon_sym_RBRACK, - [7564] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(199), 8, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(197), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - [7604] = 8, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - ACTIONS(191), 1, - anon_sym_STAR_STAR, - STATE(90), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(167), 8, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(161), 18, - ts_builtin_sym_end, - anon_sym_COMMA, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_else, - anon_sym_SEMI, - anon_sym_RPAREN, - anon_sym_RBRACK, - [7654] = 11, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - ACTIONS(191), 1, - anon_sym_STAR_STAR, - ACTIONS(193), 1, - anon_sym_STAR, - ACTIONS(195), 1, - anon_sym_SLASH, - STATE(90), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(201), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(167), 7, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(161), 15, - ts_builtin_sym_end, - anon_sym_COMMA, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_else, - anon_sym_SEMI, - anon_sym_RPAREN, - anon_sym_RBRACK, - [7710] = 12, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - ACTIONS(191), 1, - anon_sym_STAR_STAR, - ACTIONS(193), 1, - anon_sym_STAR, - ACTIONS(195), 1, - anon_sym_SLASH, - STATE(90), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(201), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(203), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(167), 7, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(161), 13, - ts_builtin_sym_end, - anon_sym_COMMA, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_else, - anon_sym_SEMI, - anon_sym_RPAREN, - anon_sym_RBRACK, - [7768] = 14, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - ACTIONS(191), 1, - anon_sym_STAR_STAR, - ACTIONS(193), 1, - anon_sym_STAR, - ACTIONS(195), 1, - anon_sym_SLASH, - ACTIONS(205), 1, - anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - STATE(90), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(201), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(203), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(167), 5, - anon_sym_PIPE, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(161), 13, - ts_builtin_sym_end, - anon_sym_COMMA, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_else, - anon_sym_SEMI, - anon_sym_RPAREN, - anon_sym_RBRACK, - [7830] = 13, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - ACTIONS(191), 1, - anon_sym_STAR_STAR, - ACTIONS(193), 1, - anon_sym_STAR, - ACTIONS(195), 1, - anon_sym_SLASH, - ACTIONS(205), 1, - anon_sym_AMP, - STATE(90), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(201), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(203), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(167), 6, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(161), 13, - ts_builtin_sym_end, - anon_sym_COMMA, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_else, - anon_sym_SEMI, - anon_sym_RPAREN, - anon_sym_RBRACK, - [7890] = 15, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - ACTIONS(191), 1, - anon_sym_STAR_STAR, - ACTIONS(193), 1, - anon_sym_STAR, - ACTIONS(195), 1, - anon_sym_SLASH, - ACTIONS(205), 1, - anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - ACTIONS(209), 1, - anon_sym_PIPE, - STATE(90), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(201), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(203), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(167), 4, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(161), 13, - ts_builtin_sym_end, - anon_sym_COMMA, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_else, - anon_sym_SEMI, - anon_sym_RPAREN, - anon_sym_RBRACK, - [7954] = 17, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - ACTIONS(191), 1, - anon_sym_STAR_STAR, - ACTIONS(193), 1, - anon_sym_STAR, - ACTIONS(195), 1, - anon_sym_SLASH, - ACTIONS(205), 1, - anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - ACTIONS(209), 1, - anon_sym_PIPE, - STATE(90), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(167), 2, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(201), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(203), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(211), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(213), 4, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - ACTIONS(161), 9, - ts_builtin_sym_end, - anon_sym_COMMA, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_else, - anon_sym_SEMI, - anon_sym_RPAREN, - anon_sym_RBRACK, - [8022] = 18, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - ACTIONS(191), 1, - anon_sym_STAR_STAR, - ACTIONS(193), 1, - anon_sym_STAR, - ACTIONS(195), 1, - anon_sym_SLASH, - ACTIONS(205), 1, - anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - ACTIONS(209), 1, - anon_sym_PIPE, - ACTIONS(215), 1, - anon_sym_AMP_AMP, - STATE(90), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(167), 2, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(201), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(203), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(211), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(213), 4, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - ACTIONS(161), 8, - ts_builtin_sym_end, - anon_sym_COMMA, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_else, - anon_sym_SEMI, - anon_sym_RPAREN, - anon_sym_RBRACK, - [8092] = 19, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - ACTIONS(191), 1, - anon_sym_STAR_STAR, - ACTIONS(193), 1, - anon_sym_STAR, - ACTIONS(195), 1, - anon_sym_SLASH, - ACTIONS(205), 1, - anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - ACTIONS(209), 1, - anon_sym_PIPE, - ACTIONS(215), 1, - anon_sym_AMP_AMP, - ACTIONS(217), 1, - anon_sym_PIPE_PIPE, - STATE(90), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(167), 2, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(201), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(203), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(211), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(213), 4, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - ACTIONS(161), 7, - ts_builtin_sym_end, - anon_sym_COMMA, - anon_sym_CARET_CARET, - anon_sym_else, - anon_sym_SEMI, - anon_sym_RPAREN, - anon_sym_RBRACK, - [8164] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(149), 8, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(147), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - [8204] = 20, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - ACTIONS(191), 1, - anon_sym_STAR_STAR, - ACTIONS(193), 1, - anon_sym_STAR, - ACTIONS(195), 1, - anon_sym_SLASH, - ACTIONS(205), 1, - anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - ACTIONS(209), 1, - anon_sym_PIPE, - ACTIONS(215), 1, - anon_sym_AMP_AMP, - ACTIONS(217), 1, - anon_sym_PIPE_PIPE, - ACTIONS(221), 1, - anon_sym_CARET_CARET, - STATE(90), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(201), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(203), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(211), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(223), 2, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(213), 4, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - ACTIONS(219), 6, - ts_builtin_sym_end, - anon_sym_COMMA, - anon_sym_else, - anon_sym_SEMI, - anon_sym_RPAREN, - anon_sym_RBRACK, - [8278] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(227), 8, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(225), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - [8318] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(231), 8, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(229), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - [8358] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(235), 8, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(233), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - [8398] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(239), 8, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(237), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - [8438] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(243), 8, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(241), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - [8478] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(247), 8, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(245), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - [8518] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(251), 8, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(249), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - [8558] = 4, - ACTIONS(253), 1, - anon_sym_DASH_GT, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(243), 9, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(241), 21, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - [8600] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(257), 8, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(255), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - [8640] = 20, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - ACTIONS(191), 1, - anon_sym_STAR_STAR, - ACTIONS(193), 1, - anon_sym_STAR, - ACTIONS(195), 1, - anon_sym_SLASH, - ACTIONS(205), 1, - anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - ACTIONS(209), 1, - anon_sym_PIPE, - ACTIONS(215), 1, - anon_sym_AMP_AMP, - ACTIONS(217), 1, - anon_sym_PIPE_PIPE, - ACTIONS(221), 1, - anon_sym_CARET_CARET, - STATE(90), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(201), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(203), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(211), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(261), 2, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(213), 4, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - ACTIONS(259), 6, - ts_builtin_sym_end, - anon_sym_COMMA, - anon_sym_else, - anon_sym_SEMI, - anon_sym_RPAREN, - anon_sym_RBRACK, - [8714] = 20, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - ACTIONS(191), 1, - anon_sym_STAR_STAR, - ACTIONS(193), 1, - anon_sym_STAR, - ACTIONS(195), 1, - anon_sym_SLASH, - ACTIONS(205), 1, - anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - ACTIONS(209), 1, - anon_sym_PIPE, - ACTIONS(215), 1, - anon_sym_AMP_AMP, - ACTIONS(217), 1, - anon_sym_PIPE_PIPE, - ACTIONS(221), 1, - anon_sym_CARET_CARET, - STATE(90), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(201), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(203), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(211), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(265), 2, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(213), 4, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - ACTIONS(263), 6, - ts_builtin_sym_end, - anon_sym_COMMA, - anon_sym_else, - anon_sym_SEMI, - anon_sym_RPAREN, - anon_sym_RBRACK, - [8788] = 20, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - ACTIONS(191), 1, - anon_sym_STAR_STAR, - ACTIONS(193), 1, - anon_sym_STAR, - ACTIONS(195), 1, - anon_sym_SLASH, - ACTIONS(205), 1, - anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - ACTIONS(209), 1, - anon_sym_PIPE, - ACTIONS(215), 1, - anon_sym_AMP_AMP, - ACTIONS(217), 1, - anon_sym_PIPE_PIPE, - ACTIONS(221), 1, - anon_sym_CARET_CARET, - STATE(90), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(201), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(203), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(211), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(269), 2, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(213), 4, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - ACTIONS(267), 6, - ts_builtin_sym_end, - anon_sym_COMMA, - anon_sym_else, - anon_sym_SEMI, - anon_sym_RPAREN, - anon_sym_RBRACK, - [8862] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(273), 8, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(271), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - [8902] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(277), 8, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(275), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - [8942] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(281), 8, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(279), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - [8982] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(285), 8, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(283), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - [9022] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(289), 8, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(287), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, - anon_sym_SEMI, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - [9062] = 20, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - ACTIONS(191), 1, - anon_sym_STAR_STAR, - ACTIONS(193), 1, - anon_sym_STAR, - ACTIONS(195), 1, - anon_sym_SLASH, - ACTIONS(205), 1, - anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - ACTIONS(209), 1, - anon_sym_PIPE, - ACTIONS(215), 1, - anon_sym_AMP_AMP, - ACTIONS(217), 1, - anon_sym_PIPE_PIPE, - ACTIONS(221), 1, - anon_sym_CARET_CARET, - STATE(90), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(201), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(203), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(211), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(293), 2, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(213), 4, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - ACTIONS(291), 6, - ts_builtin_sym_end, - anon_sym_COMMA, - anon_sym_else, - anon_sym_SEMI, - anon_sym_RPAREN, - anon_sym_RBRACK, - [9136] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(297), 8, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(295), 23, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_COLON_COLON, + ACTIONS(113), 10, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_GT, + anon_sym_LT, + anon_sym_else, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(107), 22, + ts_builtin_sym_end, + anon_sym_DOT, + anon_sym_COMMA, + anon_sym_RBRACE, + anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, anon_sym_STAR_STAR, anon_sym_SLASH, anon_sym_LT_LT, - anon_sym_GT_GT, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, @@ -9719,39 +6119,39 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_else, anon_sym_SEMI, anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_RBRACK, - [9176] = 4, + anon_sym_GT_GT_GT, + [5064] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(135), 2, - aux_sym_signed_integer_token1, - aux_sym_unsigned_integer_token1, - ACTIONS(133), 7, + ACTIONS(117), 11, sym_identifier, anon_sym_STAR, + anon_sym_GT_GT, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(131), 19, + anon_sym_else, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(115), 23, + ts_builtin_sym_end, sym_unit_quote, anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, + anon_sym_RBRACE, anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, anon_sym_STAR_STAR, anon_sym_SLASH, anon_sym_LT_LT, - anon_sym_GT_GT, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, @@ -9759,67 +6159,40 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, + anon_sym_SEMI, anon_sym_LPAREN, - [9215] = 5, - STATE(204), 1, - sym__unit, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(299), 2, - sym_identifier, - sym_unit_quote, - ACTIONS(129), 6, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - ACTIONS(123), 18, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_GT_GT_GT, + [5107] = 4, + ACTIONS(123), 1, anon_sym_DOT, - anon_sym_COMMA, - anon_sym_RPAREN_GT, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_LPAREN, - [9255] = 4, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(135), 2, - aux_sym_signed_integer_token1, - aux_sym_unsigned_integer_token1, - ACTIONS(133), 7, + ACTIONS(121), 11, sym_identifier, anon_sym_STAR, + anon_sym_GT_GT, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(131), 18, + anon_sym_else, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(119), 22, + ts_builtin_sym_end, sym_unit_quote, - anon_sym_DOT, + anon_sym_COMMA, + anon_sym_RBRACE, anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, anon_sym_STAR_STAR, anon_sym_SLASH, anon_sym_LT_LT, - anon_sym_GT_GT, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, @@ -9827,81 +6200,39 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_LPAREN, - [9293] = 20, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, + anon_sym_SEMI, anon_sym_LPAREN, - ACTIONS(191), 1, - anon_sym_STAR_STAR, - ACTIONS(193), 1, - anon_sym_STAR, - ACTIONS(195), 1, - anon_sym_SLASH, - ACTIONS(205), 1, - anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - ACTIONS(209), 1, - anon_sym_PIPE, - ACTIONS(215), 1, - anon_sym_AMP_AMP, - ACTIONS(217), 1, - anon_sym_PIPE_PIPE, - ACTIONS(221), 1, - anon_sym_CARET_CARET, - ACTIONS(303), 1, - anon_sym_EQ, - STATE(90), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(201), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(203), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(211), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(301), 2, - anon_sym_COMMA, anon_sym_RPAREN, - ACTIONS(213), 4, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - [9362] = 3, + anon_sym_RBRACK, + anon_sym_GT_GT_GT, + [5152] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(145), 6, + ACTIONS(103), 11, + sym_identifier, anon_sym_STAR, + anon_sym_GT_GT, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(143), 20, - sym_identifier, + anon_sym_else, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(101), 23, + ts_builtin_sym_end, sym_unit_quote, anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, + anon_sym_RBRACE, anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, anon_sym_STAR_STAR, anon_sym_SLASH, anon_sym_LT_LT, - anon_sym_GT_GT, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, @@ -9909,128 +6240,36 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, + anon_sym_SEMI, anon_sym_LPAREN, - [9397] = 4, - ACTIONS(305), 1, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_GT_GT_GT, + [5195] = 7, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(139), 6, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - ACTIONS(137), 19, - sym_identifier, - sym_unit_quote, - anon_sym_COMMA, - anon_sym_RPAREN_GT, + ACTIONS(129), 1, anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, + ACTIONS(133), 1, anon_sym_LPAREN, - [9434] = 6, - ACTIONS(125), 1, - sym_identifier, - ACTIONS(127), 1, - sym_unit_quote, - STATE(88), 1, - sym__unit, + STATE(99), 1, + sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(129), 6, + ACTIONS(131), 8, anon_sym_STAR, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(123), 17, - anon_sym_DOT, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_LPAREN, - [9475] = 6, - ACTIONS(307), 1, anon_sym_EQ, - ACTIONS(309), 1, anon_sym_COLON, - STATE(277), 1, - sym_declaration_type, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(243), 6, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - ACTIONS(241), 17, - anon_sym_DOT, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_LPAREN, - anon_sym_RPAREN, - [9516] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(133), 6, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - ACTIONS(131), 20, - sym_identifier, - sym_unit_quote, - anon_sym_DOT, + ACTIONS(125), 21, + ts_builtin_sym_end, anon_sym_COMMA, - anon_sym_RPAREN_GT, - anon_sym_COLON_COLON, + anon_sym_RBRACE, anon_sym_DASH, anon_sym_PLUS, anon_sym_STAR_STAR, @@ -10044,89 +6283,36 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, - anon_sym_LPAREN, - [9551] = 20, - ACTIONS(311), 1, - anon_sym_DOT, - ACTIONS(313), 1, - anon_sym_COMMA, - ACTIONS(315), 1, - anon_sym_RPAREN_GT, - ACTIONS(317), 1, - anon_sym_COLON_COLON, - ACTIONS(321), 1, - anon_sym_STAR_STAR, - ACTIONS(323), 1, - anon_sym_STAR, - ACTIONS(325), 1, - anon_sym_SLASH, - ACTIONS(329), 1, - anon_sym_AMP, - ACTIONS(331), 1, - anon_sym_PIPE, - ACTIONS(333), 1, - anon_sym_CARET, - ACTIONS(339), 1, - anon_sym_AMP_AMP, - ACTIONS(341), 1, - anon_sym_PIPE_PIPE, - ACTIONS(343), 1, - anon_sym_CARET_CARET, - ACTIONS(345), 1, - anon_sym_LPAREN, - STATE(172), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(319), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(327), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(335), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(337), 4, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - [9619] = 13, - ACTIONS(311), 1, - anon_sym_DOT, - ACTIONS(317), 1, - anon_sym_COLON_COLON, - ACTIONS(321), 1, - anon_sym_STAR_STAR, - ACTIONS(323), 1, - anon_sym_STAR, - ACTIONS(325), 1, - anon_sym_SLASH, - ACTIONS(329), 1, - anon_sym_AMP, - ACTIONS(345), 1, - anon_sym_LPAREN, - STATE(172), 1, - sym_dictionary_construction, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACK, + [5245] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(319), 2, + ACTIONS(137), 9, anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(327), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(167), 4, + anon_sym_STAR, + anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(161), 9, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(135), 24, + ts_builtin_sym_end, + anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_SLASH, + anon_sym_LT_LT, + anon_sym_GT_GT, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, @@ -10134,42 +6320,38 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, - [9673] = 15, - ACTIONS(311), 1, - anon_sym_DOT, - ACTIONS(317), 1, - anon_sym_COLON_COLON, - ACTIONS(321), 1, - anon_sym_STAR_STAR, - ACTIONS(323), 1, - anon_sym_STAR, - ACTIONS(325), 1, - anon_sym_SLASH, - ACTIONS(329), 1, - anon_sym_AMP, - ACTIONS(331), 1, - anon_sym_PIPE, - ACTIONS(333), 1, - anon_sym_CARET, - ACTIONS(345), 1, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, anon_sym_LPAREN, - STATE(172), 1, - sym_dictionary_construction, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_DASH_GT, + [5287] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(167), 2, + ACTIONS(141), 9, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(319), 2, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(139), 24, + ts_builtin_sym_end, + anon_sym_DOT, + anon_sym_COMMA, + anon_sym_RBRACE, + anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(327), 2, + anon_sym_STAR_STAR, + anon_sym_SLASH, anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(161), 9, - anon_sym_COMMA, - anon_sym_RPAREN_GT, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, @@ -10177,252 +6359,225 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, - [9731] = 16, - ACTIONS(311), 1, - anon_sym_DOT, - ACTIONS(317), 1, - anon_sym_COLON_COLON, - ACTIONS(321), 1, - anon_sym_STAR_STAR, - ACTIONS(323), 1, - anon_sym_STAR, - ACTIONS(325), 1, - anon_sym_SLASH, - ACTIONS(329), 1, - anon_sym_AMP, - ACTIONS(331), 1, - anon_sym_PIPE, - ACTIONS(333), 1, - anon_sym_CARET, - ACTIONS(345), 1, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, anon_sym_LPAREN, - STATE(172), 1, - sym_dictionary_construction, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_GT_GT_GT, + [5329] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(319), 2, + ACTIONS(145), 9, anon_sym_DASH, + anon_sym_STAR, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_GT, + anon_sym_LT, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(143), 24, + ts_builtin_sym_end, + anon_sym_DOT, + anon_sym_COMMA, + anon_sym_RBRACE, + anon_sym_COLON_COLON, anon_sym_PLUS, - ACTIONS(327), 2, + anon_sym_STAR_STAR, + anon_sym_SLASH, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(335), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(337), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - ACTIONS(161), 5, - anon_sym_COMMA, - anon_sym_RPAREN_GT, anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, - [9791] = 17, - ACTIONS(311), 1, - anon_sym_DOT, - ACTIONS(317), 1, - anon_sym_COLON_COLON, - ACTIONS(321), 1, - anon_sym_STAR_STAR, - ACTIONS(323), 1, - anon_sym_STAR, - ACTIONS(325), 1, - anon_sym_SLASH, - ACTIONS(329), 1, - anon_sym_AMP, - ACTIONS(331), 1, - anon_sym_PIPE, - ACTIONS(333), 1, - anon_sym_CARET, - ACTIONS(339), 1, - anon_sym_AMP_AMP, - ACTIONS(345), 1, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, anon_sym_LPAREN, - STATE(172), 1, - sym_dictionary_construction, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_DASH_GT, + [5371] = 4, + ACTIONS(151), 1, + anon_sym_DASH_GT, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(319), 2, + ACTIONS(149), 9, anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(327), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(335), 2, + anon_sym_STAR, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(161), 4, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(147), 23, + ts_builtin_sym_end, + anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - ACTIONS(337), 4, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_SLASH, + anon_sym_LT_LT, + anon_sym_GT_GT, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [9853] = 18, - ACTIONS(311), 1, - anon_sym_DOT, - ACTIONS(317), 1, - anon_sym_COLON_COLON, - ACTIONS(321), 1, - anon_sym_STAR_STAR, - ACTIONS(323), 1, - anon_sym_STAR, - ACTIONS(325), 1, - anon_sym_SLASH, - ACTIONS(329), 1, - anon_sym_AMP, - ACTIONS(331), 1, - anon_sym_PIPE, - ACTIONS(333), 1, - anon_sym_CARET, - ACTIONS(339), 1, anon_sym_AMP_AMP, - ACTIONS(341), 1, anon_sym_PIPE_PIPE, - ACTIONS(345), 1, + anon_sym_CARET_CARET, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, anon_sym_LPAREN, - STATE(172), 1, - sym_dictionary_construction, + anon_sym_RPAREN, + anon_sym_RBRACK, + [5415] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(319), 2, + ACTIONS(155), 9, anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(327), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(335), 2, + anon_sym_STAR, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(161), 3, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(153), 24, + ts_builtin_sym_end, + anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, - anon_sym_CARET_CARET, - ACTIONS(337), 4, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_SLASH, + anon_sym_LT_LT, + anon_sym_GT_GT, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [9917] = 19, - ACTIONS(311), 1, - anon_sym_DOT, - ACTIONS(317), 1, - anon_sym_COLON_COLON, - ACTIONS(321), 1, - anon_sym_STAR_STAR, - ACTIONS(323), 1, - anon_sym_STAR, - ACTIONS(325), 1, - anon_sym_SLASH, - ACTIONS(329), 1, - anon_sym_AMP, - ACTIONS(331), 1, - anon_sym_PIPE, - ACTIONS(333), 1, - anon_sym_CARET, - ACTIONS(339), 1, anon_sym_AMP_AMP, - ACTIONS(341), 1, anon_sym_PIPE_PIPE, - ACTIONS(343), 1, anon_sym_CARET_CARET, - ACTIONS(345), 1, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, anon_sym_LPAREN, - STATE(172), 1, - sym_dictionary_construction, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_DASH_GT, + [5457] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(219), 2, + ACTIONS(149), 8, + anon_sym_STAR, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_GT, + anon_sym_LT, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(147), 24, + ts_builtin_sym_end, + anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, - ACTIONS(319), 2, + anon_sym_RBRACE, + anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(327), 2, + anon_sym_STAR_STAR, + anon_sym_SLASH, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(335), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(337), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [9983] = 20, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - ACTIONS(191), 1, - anon_sym_STAR_STAR, - ACTIONS(193), 1, - anon_sym_STAR, - ACTIONS(195), 1, - anon_sym_SLASH, - ACTIONS(205), 1, - anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - ACTIONS(209), 1, - anon_sym_PIPE, - ACTIONS(215), 1, anon_sym_AMP_AMP, - ACTIONS(217), 1, anon_sym_PIPE_PIPE, - ACTIONS(221), 1, anon_sym_CARET_CARET, - ACTIONS(347), 1, - anon_sym_COMMA, - ACTIONS(349), 1, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, + anon_sym_LPAREN, + anon_sym_RPAREN, anon_sym_RBRACK, - STATE(90), 1, - sym_dictionary_construction, + [5498] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(201), 2, + ACTIONS(159), 8, + anon_sym_STAR, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_GT, + anon_sym_LT, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(157), 24, + ts_builtin_sym_end, + anon_sym_DOT, + anon_sym_COMMA, + anon_sym_RBRACE, + anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(203), 2, + anon_sym_STAR_STAR, + anon_sym_SLASH, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(211), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(213), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [10051] = 4, - ACTIONS(351), 1, - anon_sym_DOT, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_CARET_CARET, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + [5539] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(139), 7, - sym_identifier, + ACTIONS(163), 8, anon_sym_STAR, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(137), 17, - sym_unit_quote, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(161), 24, + ts_builtin_sym_end, + anon_sym_DOT, + anon_sym_COMMA, + anon_sym_RBRACE, anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, @@ -10438,168 +6593,152 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, anon_sym_then, + anon_sym_else, + anon_sym_SEMI, anon_sym_LPAREN, - [10087] = 19, - ACTIONS(311), 1, - anon_sym_DOT, - ACTIONS(317), 1, - anon_sym_COLON_COLON, - ACTIONS(321), 1, - anon_sym_STAR_STAR, - ACTIONS(323), 1, + anon_sym_RPAREN, + anon_sym_RBRACK, + [5580] = 3, + ACTIONS(3), 2, + sym_comment, + sym__whitespace, + ACTIONS(167), 8, anon_sym_STAR, - ACTIONS(325), 1, - anon_sym_SLASH, - ACTIONS(329), 1, anon_sym_AMP, - ACTIONS(331), 1, anon_sym_PIPE, - ACTIONS(333), 1, anon_sym_CARET, - ACTIONS(339), 1, - anon_sym_AMP_AMP, - ACTIONS(341), 1, - anon_sym_PIPE_PIPE, - ACTIONS(343), 1, - anon_sym_CARET_CARET, - ACTIONS(345), 1, - anon_sym_LPAREN, - STATE(172), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(259), 2, + anon_sym_GT, + anon_sym_LT, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(165), 24, + ts_builtin_sym_end, + anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, - ACTIONS(319), 2, + anon_sym_RBRACE, + anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(327), 2, + anon_sym_STAR_STAR, + anon_sym_SLASH, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(335), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(337), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [10153] = 19, - ACTIONS(311), 1, - anon_sym_DOT, - ACTIONS(317), 1, - anon_sym_COLON_COLON, - ACTIONS(321), 1, - anon_sym_STAR_STAR, - ACTIONS(323), 1, - anon_sym_STAR, - ACTIONS(325), 1, - anon_sym_SLASH, - ACTIONS(329), 1, - anon_sym_AMP, - ACTIONS(331), 1, - anon_sym_PIPE, - ACTIONS(333), 1, - anon_sym_CARET, - ACTIONS(339), 1, anon_sym_AMP_AMP, - ACTIONS(341), 1, anon_sym_PIPE_PIPE, - ACTIONS(343), 1, anon_sym_CARET_CARET, - ACTIONS(345), 1, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, anon_sym_LPAREN, - STATE(172), 1, - sym_dictionary_construction, + anon_sym_RPAREN, + anon_sym_RBRACK, + [5621] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(263), 2, + ACTIONS(171), 8, + anon_sym_STAR, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_GT, + anon_sym_LT, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(169), 24, + ts_builtin_sym_end, + anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, - ACTIONS(319), 2, + anon_sym_RBRACE, + anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(327), 2, + anon_sym_STAR_STAR, + anon_sym_SLASH, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(335), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(337), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [10219] = 20, - ACTIONS(311), 1, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_CARET_CARET, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + [5662] = 10, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(317), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(321), 1, + ACTIONS(133), 1, + anon_sym_LPAREN, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(323), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(325), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(329), 1, - anon_sym_AMP, - ACTIONS(331), 1, - anon_sym_PIPE, - ACTIONS(333), 1, - anon_sym_CARET, - ACTIONS(339), 1, - anon_sym_AMP_AMP, - ACTIONS(341), 1, - anon_sym_PIPE_PIPE, - ACTIONS(343), 1, - anon_sym_CARET_CARET, - ACTIONS(345), 1, - anon_sym_LPAREN, - ACTIONS(353), 1, - anon_sym_COMMA, - ACTIONS(355), 1, - anon_sym_RPAREN_GT, - STATE(172), 1, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(319), 2, + ACTIONS(131), 7, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_GT, + anon_sym_LT, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(125), 18, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACE, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(327), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(335), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(337), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [10287] = 4, - ACTIONS(357), 1, - anon_sym_DASH_GT, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_CARET_CARET, + anon_sym_else, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACK, + [5717] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(243), 7, - anon_sym_DASH, + ACTIONS(181), 8, anon_sym_STAR, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(241), 17, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(179), 24, + ts_builtin_sym_end, anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, + anon_sym_RBRACE, anon_sym_COLON_COLON, + anon_sym_DASH, anon_sym_PLUS, anon_sym_STAR_STAR, anon_sym_SLASH, @@ -10612,125 +6751,137 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, anon_sym_LPAREN, - [10323] = 19, - ACTIONS(311), 1, + anon_sym_RPAREN, + anon_sym_RBRACK, + [5758] = 8, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(317), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(321), 1, - anon_sym_STAR_STAR, - ACTIONS(323), 1, - anon_sym_STAR, - ACTIONS(325), 1, - anon_sym_SLASH, - ACTIONS(329), 1, - anon_sym_AMP, - ACTIONS(331), 1, - anon_sym_PIPE, - ACTIONS(333), 1, - anon_sym_CARET, - ACTIONS(339), 1, - anon_sym_AMP_AMP, - ACTIONS(341), 1, - anon_sym_PIPE_PIPE, - ACTIONS(343), 1, - anon_sym_CARET_CARET, - ACTIONS(345), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - STATE(172), 1, + ACTIONS(173), 1, + anon_sym_STAR_STAR, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(291), 2, + ACTIONS(131), 8, + anon_sym_STAR, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_GT, + anon_sym_LT, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(125), 19, + ts_builtin_sym_end, anon_sym_COMMA, - anon_sym_RPAREN_GT, - ACTIONS(319), 2, + anon_sym_RBRACE, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(327), 2, + anon_sym_SLASH, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(335), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(337), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [10389] = 19, - ACTIONS(163), 1, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_CARET_CARET, + anon_sym_else, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACK, + [5809] = 11, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(191), 1, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(193), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(195), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(205), 1, - anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - ACTIONS(209), 1, - anon_sym_PIPE, - ACTIONS(215), 1, - anon_sym_AMP_AMP, - ACTIONS(217), 1, - anon_sym_PIPE_PIPE, - ACTIONS(221), 1, - anon_sym_CARET_CARET, - STATE(90), 1, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(201), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(203), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(211), 2, + ACTIONS(131), 7, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(359), 2, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(125), 16, + ts_builtin_sym_end, anon_sym_COMMA, - anon_sym_RPAREN, - ACTIONS(213), 4, + anon_sym_RBRACE, + anon_sym_LT_LT, + anon_sym_GT_GT, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [10455] = 4, - ACTIONS(151), 1, - anon_sym_DASH_GT, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_CARET_CARET, + anon_sym_else, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACK, + [5866] = 12, + ACTIONS(127), 1, + anon_sym_DOT, + ACTIONS(129), 1, + anon_sym_COLON_COLON, + ACTIONS(133), 1, + anon_sym_LPAREN, + ACTIONS(173), 1, + anon_sym_STAR_STAR, + ACTIONS(175), 1, + anon_sym_STAR, + ACTIONS(177), 1, + anon_sym_SLASH, + STATE(99), 1, + sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(149), 7, + ACTIONS(183), 2, anon_sym_DASH, - anon_sym_STAR, + anon_sym_PLUS, + ACTIONS(185), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(131), 7, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(147), 17, - anon_sym_DOT, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(125), 14, + ts_builtin_sym_end, anon_sym_COMMA, - anon_sym_RPAREN_GT, - anon_sym_COLON_COLON, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, + anon_sym_RBRACE, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, @@ -10738,42 +6889,48 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, - anon_sym_LPAREN, - [10491] = 14, - ACTIONS(311), 1, + anon_sym_else, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACK, + [5925] = 14, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(317), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(321), 1, + ACTIONS(133), 1, + anon_sym_LPAREN, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(323), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(325), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(329), 1, + ACTIONS(187), 1, anon_sym_AMP, - ACTIONS(333), 1, + ACTIONS(189), 1, anon_sym_CARET, - ACTIONS(345), 1, - anon_sym_LPAREN, - STATE(172), 1, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(319), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(327), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(167), 3, + ACTIONS(131), 5, anon_sym_PIPE, anon_sym_GT, anon_sym_LT, - ACTIONS(161), 9, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(125), 14, + ts_builtin_sym_end, anon_sym_COMMA, - anon_sym_RPAREN_GT, + anon_sym_RBRACE, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, @@ -10781,343 +6938,341 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, - [10547] = 20, - ACTIONS(47), 1, + anon_sym_else, + anon_sym_SEMI, + anon_sym_RPAREN, anon_sym_RBRACK, - ACTIONS(163), 1, + [5988] = 13, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(191), 1, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(193), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(195), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(205), 1, + ACTIONS(187), 1, anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - ACTIONS(209), 1, - anon_sym_PIPE, - ACTIONS(215), 1, - anon_sym_AMP_AMP, - ACTIONS(217), 1, - anon_sym_PIPE_PIPE, - ACTIONS(221), 1, - anon_sym_CARET_CARET, - ACTIONS(347), 1, - anon_sym_COMMA, - STATE(90), 1, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(201), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(203), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(211), 2, + ACTIONS(131), 6, + anon_sym_PIPE, + anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(213), 4, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(125), 14, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACE, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [10615] = 19, - ACTIONS(163), 1, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_CARET_CARET, + anon_sym_else, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACK, + [6049] = 15, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(191), 1, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(193), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(195), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(205), 1, + ACTIONS(187), 1, anon_sym_AMP, - ACTIONS(207), 1, + ACTIONS(189), 1, anon_sym_CARET, - ACTIONS(209), 1, + ACTIONS(191), 1, anon_sym_PIPE, - ACTIONS(215), 1, - anon_sym_AMP_AMP, - ACTIONS(217), 1, - anon_sym_PIPE_PIPE, - ACTIONS(221), 1, - anon_sym_CARET_CARET, - STATE(90), 1, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(201), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(203), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(211), 2, + ACTIONS(131), 4, anon_sym_GT, anon_sym_LT, - ACTIONS(361), 2, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(125), 14, + ts_builtin_sym_end, anon_sym_COMMA, - anon_sym_RPAREN, - ACTIONS(213), 4, + anon_sym_RBRACE, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [10681] = 20, - ACTIONS(163), 1, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_CARET_CARET, + anon_sym_else, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACK, + [6114] = 17, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(191), 1, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(193), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(195), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(205), 1, + ACTIONS(187), 1, anon_sym_AMP, - ACTIONS(207), 1, + ACTIONS(189), 1, anon_sym_CARET, - ACTIONS(209), 1, + ACTIONS(191), 1, anon_sym_PIPE, - ACTIONS(215), 1, - anon_sym_AMP_AMP, - ACTIONS(217), 1, - anon_sym_PIPE_PIPE, - ACTIONS(221), 1, - anon_sym_CARET_CARET, - ACTIONS(347), 1, - anon_sym_COMMA, - ACTIONS(363), 1, - anon_sym_RBRACK, - STATE(90), 1, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(201), 2, + ACTIONS(131), 2, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(203), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(211), 2, + ACTIONS(193), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(213), 4, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [10749] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(155), 7, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - ACTIONS(153), 18, - anon_sym_DOT, + ACTIONS(125), 10, + ts_builtin_sym_end, anon_sym_COMMA, - anon_sym_RPAREN_GT, - anon_sym_COLON_COLON, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, + anon_sym_RBRACE, anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, - anon_sym_LPAREN, - anon_sym_DASH_GT, - [10783] = 20, - ACTIONS(311), 1, + anon_sym_else, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACK, + [6183] = 18, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(317), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(321), 1, + ACTIONS(133), 1, + anon_sym_LPAREN, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(323), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(325), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(329), 1, + ACTIONS(187), 1, anon_sym_AMP, - ACTIONS(331), 1, - anon_sym_PIPE, - ACTIONS(333), 1, + ACTIONS(189), 1, anon_sym_CARET, - ACTIONS(339), 1, + ACTIONS(191), 1, + anon_sym_PIPE, + ACTIONS(197), 1, anon_sym_AMP_AMP, - ACTIONS(341), 1, - anon_sym_PIPE_PIPE, - ACTIONS(343), 1, - anon_sym_CARET_CARET, - ACTIONS(345), 1, - anon_sym_LPAREN, - ACTIONS(365), 1, - anon_sym_COMMA, - ACTIONS(367), 1, - anon_sym_RPAREN_GT, - STATE(172), 1, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(319), 2, + ACTIONS(131), 2, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(327), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(335), 2, + ACTIONS(193), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(337), 4, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [10851] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(159), 7, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - ACTIONS(157), 18, - anon_sym_DOT, + ACTIONS(125), 9, + ts_builtin_sym_end, anon_sym_COMMA, - anon_sym_RPAREN_GT, + anon_sym_RBRACE, + anon_sym_PIPE_PIPE, + anon_sym_CARET_CARET, + anon_sym_else, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACK, + [6254] = 19, + ACTIONS(127), 1, + anon_sym_DOT, + ACTIONS(129), 1, anon_sym_COLON_COLON, - anon_sym_PLUS, + ACTIONS(133), 1, + anon_sym_LPAREN, + ACTIONS(173), 1, anon_sym_STAR_STAR, + ACTIONS(175), 1, + anon_sym_STAR, + ACTIONS(177), 1, anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, + ACTIONS(187), 1, + anon_sym_AMP, + ACTIONS(189), 1, + anon_sym_CARET, + ACTIONS(191), 1, + anon_sym_PIPE, + ACTIONS(197), 1, anon_sym_AMP_AMP, + ACTIONS(199), 1, anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_LPAREN, - anon_sym_DASH_GT, - [10885] = 3, + STATE(99), 1, + sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(133), 7, - sym_identifier, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - ACTIONS(131), 18, - sym_unit_quote, - anon_sym_DOT, - anon_sym_COLON_COLON, + ACTIONS(131), 2, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, + ACTIONS(193), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, + ACTIONS(125), 8, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACE, + anon_sym_CARET_CARET, + anon_sym_else, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACK, + [6327] = 20, + ACTIONS(127), 1, + anon_sym_DOT, + ACTIONS(129), 1, + anon_sym_COLON_COLON, + ACTIONS(133), 1, + anon_sym_LPAREN, + ACTIONS(173), 1, + anon_sym_STAR_STAR, + ACTIONS(175), 1, + anon_sym_STAR, + ACTIONS(177), 1, + anon_sym_SLASH, + ACTIONS(187), 1, + anon_sym_AMP, + ACTIONS(189), 1, + anon_sym_CARET, + ACTIONS(191), 1, + anon_sym_PIPE, + ACTIONS(197), 1, anon_sym_AMP_AMP, + ACTIONS(199), 1, anon_sym_PIPE_PIPE, + ACTIONS(203), 1, anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_LPAREN, - [10919] = 3, + STATE(99), 1, + sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(145), 7, - sym_identifier, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - ACTIONS(143), 18, - sym_unit_quote, - anon_sym_DOT, - anon_sym_COLON_COLON, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, + ACTIONS(193), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(205), 2, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_LPAREN, - [10953] = 7, - ACTIONS(311), 1, - anon_sym_DOT, - ACTIONS(317), 1, - anon_sym_COLON_COLON, - ACTIONS(345), 1, - anon_sym_LPAREN, - STATE(172), 1, - sym_dictionary_construction, + ACTIONS(201), 7, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACE, + anon_sym_else, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACK, + [6402] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(167), 6, + ACTIONS(209), 8, anon_sym_STAR, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(161), 15, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(207), 24, + ts_builtin_sym_end, + anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, + anon_sym_RBRACE, + anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, anon_sym_STAR_STAR, @@ -11131,23 +7286,32 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, - [10995] = 3, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + [6443] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(173), 7, - anon_sym_DASH, + ACTIONS(213), 8, anon_sym_STAR, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(171), 18, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(211), 24, + ts_builtin_sym_end, anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, + anon_sym_RBRACE, anon_sym_COLON_COLON, + anon_sym_DASH, anon_sym_PLUS, anon_sym_STAR_STAR, anon_sym_SLASH, @@ -11160,132 +7324,73 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, anon_sym_LPAREN, - anon_sym_DASH_GT, - [11029] = 19, - ACTIONS(311), 1, - anon_sym_DOT, - ACTIONS(317), 1, - anon_sym_COLON_COLON, - ACTIONS(321), 1, - anon_sym_STAR_STAR, - ACTIONS(323), 1, + anon_sym_RPAREN, + anon_sym_RBRACK, + [6484] = 3, + ACTIONS(3), 2, + sym_comment, + sym__whitespace, + ACTIONS(217), 8, anon_sym_STAR, - ACTIONS(325), 1, - anon_sym_SLASH, - ACTIONS(329), 1, anon_sym_AMP, - ACTIONS(331), 1, anon_sym_PIPE, - ACTIONS(333), 1, anon_sym_CARET, - ACTIONS(339), 1, - anon_sym_AMP_AMP, - ACTIONS(341), 1, - anon_sym_PIPE_PIPE, - ACTIONS(343), 1, - anon_sym_CARET_CARET, - ACTIONS(345), 1, - anon_sym_LPAREN, - STATE(172), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(267), 2, + anon_sym_GT, + anon_sym_LT, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(215), 24, + ts_builtin_sym_end, + anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, - ACTIONS(319), 2, + anon_sym_RBRACE, + anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(327), 2, + anon_sym_STAR_STAR, + anon_sym_SLASH, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(335), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(337), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [11095] = 20, - ACTIONS(311), 1, - anon_sym_DOT, - ACTIONS(317), 1, - anon_sym_COLON_COLON, - ACTIONS(321), 1, - anon_sym_STAR_STAR, - ACTIONS(323), 1, - anon_sym_STAR, - ACTIONS(325), 1, - anon_sym_SLASH, - ACTIONS(329), 1, - anon_sym_AMP, - ACTIONS(331), 1, - anon_sym_PIPE, - ACTIONS(333), 1, - anon_sym_CARET, - ACTIONS(339), 1, anon_sym_AMP_AMP, - ACTIONS(341), 1, anon_sym_PIPE_PIPE, - ACTIONS(343), 1, anon_sym_CARET_CARET, - ACTIONS(345), 1, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, anon_sym_LPAREN, - ACTIONS(369), 1, - anon_sym_COMMA, - ACTIONS(371), 1, - anon_sym_RPAREN_GT, - STATE(172), 1, - sym_dictionary_construction, + anon_sym_RPAREN, + anon_sym_RBRACK, + [6525] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(319), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(327), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(335), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(337), 4, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - [11163] = 10, - ACTIONS(311), 1, - anon_sym_DOT, - ACTIONS(317), 1, - anon_sym_COLON_COLON, - ACTIONS(321), 1, - anon_sym_STAR_STAR, - ACTIONS(323), 1, + ACTIONS(221), 8, anon_sym_STAR, - ACTIONS(325), 1, - anon_sym_SLASH, - ACTIONS(345), 1, - anon_sym_LPAREN, - STATE(172), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(167), 5, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(161), 13, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(219), 24, + ts_builtin_sym_end, + anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, + anon_sym_RBRACE, + anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_SLASH, anon_sym_LT_LT, anon_sym_GT_GT, anon_sym_GT_EQ, @@ -11295,32 +7400,34 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, - [11211] = 8, - ACTIONS(311), 1, - anon_sym_DOT, - ACTIONS(317), 1, - anon_sym_COLON_COLON, - ACTIONS(321), 1, - anon_sym_STAR_STAR, - ACTIONS(345), 1, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, anon_sym_LPAREN, - STATE(172), 1, - sym_dictionary_construction, + anon_sym_RPAREN, + anon_sym_RBRACK, + [6566] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(167), 6, + ACTIONS(225), 8, anon_sym_STAR, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(161), 14, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(223), 24, + ts_builtin_sym_end, + anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, + anon_sym_RBRACE, + anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, + anon_sym_STAR_STAR, anon_sym_SLASH, anon_sym_LT_LT, anon_sym_GT_GT, @@ -11331,36 +7438,35 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, - [11255] = 11, - ACTIONS(311), 1, - anon_sym_DOT, - ACTIONS(317), 1, - anon_sym_COLON_COLON, - ACTIONS(321), 1, - anon_sym_STAR_STAR, - ACTIONS(323), 1, - anon_sym_STAR, - ACTIONS(325), 1, - anon_sym_SLASH, - ACTIONS(345), 1, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, anon_sym_LPAREN, - STATE(172), 1, - sym_dictionary_construction, + anon_sym_RPAREN, + anon_sym_RBRACK, + [6607] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(319), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(167), 5, + ACTIONS(229), 8, + anon_sym_STAR, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(161), 11, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(227), 24, + ts_builtin_sym_end, + anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_SLASH, anon_sym_LT_LT, anon_sym_GT_GT, anon_sym_GT_EQ, @@ -11370,155 +7476,178 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, - [11305] = 12, - ACTIONS(311), 1, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + [6648] = 20, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(317), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(321), 1, + ACTIONS(133), 1, + anon_sym_LPAREN, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(323), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(325), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(345), 1, - anon_sym_LPAREN, - STATE(172), 1, + ACTIONS(187), 1, + anon_sym_AMP, + ACTIONS(189), 1, + anon_sym_CARET, + ACTIONS(191), 1, + anon_sym_PIPE, + ACTIONS(197), 1, + anon_sym_AMP_AMP, + ACTIONS(199), 1, + anon_sym_PIPE_PIPE, + ACTIONS(203), 1, + anon_sym_CARET_CARET, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(319), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(327), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(167), 5, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, + ACTIONS(193), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(161), 9, - anon_sym_COMMA, - anon_sym_RPAREN_GT, + ACTIONS(233), 2, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - [11357] = 20, - ACTIONS(41), 1, + ACTIONS(231), 7, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACE, + anon_sym_else, + anon_sym_SEMI, + anon_sym_RPAREN, anon_sym_RBRACK, - ACTIONS(163), 1, + [6723] = 20, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(191), 1, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(193), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(195), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(205), 1, + ACTIONS(187), 1, anon_sym_AMP, - ACTIONS(207), 1, + ACTIONS(189), 1, anon_sym_CARET, - ACTIONS(209), 1, + ACTIONS(191), 1, anon_sym_PIPE, - ACTIONS(215), 1, + ACTIONS(197), 1, anon_sym_AMP_AMP, - ACTIONS(217), 1, + ACTIONS(199), 1, anon_sym_PIPE_PIPE, - ACTIONS(221), 1, + ACTIONS(203), 1, anon_sym_CARET_CARET, - ACTIONS(347), 1, - anon_sym_COMMA, - STATE(90), 1, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(201), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(203), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(211), 2, + ACTIONS(193), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(213), 4, + ACTIONS(237), 2, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [11425] = 19, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - ACTIONS(191), 1, - anon_sym_STAR_STAR, - ACTIONS(193), 1, - anon_sym_STAR, - ACTIONS(195), 1, - anon_sym_SLASH, - ACTIONS(205), 1, - anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - ACTIONS(209), 1, - anon_sym_PIPE, - ACTIONS(215), 1, - anon_sym_AMP_AMP, - ACTIONS(217), 1, - anon_sym_PIPE_PIPE, - ACTIONS(221), 1, - anon_sym_CARET_CARET, - ACTIONS(373), 1, + ACTIONS(235), 7, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACE, anon_sym_else, - STATE(90), 1, - sym_dictionary_construction, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACK, + [6798] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(201), 2, + ACTIONS(241), 8, + anon_sym_STAR, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_GT, + anon_sym_LT, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(239), 24, + ts_builtin_sym_end, + anon_sym_DOT, + anon_sym_COMMA, + anon_sym_RBRACE, + anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(203), 2, + anon_sym_STAR_STAR, + anon_sym_SLASH, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(211), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(213), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [11490] = 3, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_CARET_CARET, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + [6839] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(285), 6, + ACTIONS(245), 8, anon_sym_STAR, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(283), 18, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(243), 24, + ts_builtin_sym_end, anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, + anon_sym_RBRACE, anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, @@ -11533,22 +7662,30 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, anon_sym_LPAREN, - [11523] = 3, + anon_sym_RPAREN, + anon_sym_RBRACK, + [6880] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(289), 6, + ACTIONS(249), 8, anon_sym_STAR, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(287), 18, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(247), 24, + ts_builtin_sym_end, anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, + anon_sym_RBRACE, anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, @@ -11563,22 +7700,30 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, anon_sym_LPAREN, - [11556] = 3, + anon_sym_RPAREN, + anon_sym_RBRACK, + [6921] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(247), 6, + ACTIONS(253), 8, anon_sym_STAR, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(245), 18, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(251), 24, + ts_builtin_sym_end, anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, + anon_sym_RBRACE, anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, @@ -11593,68 +7738,30 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, - anon_sym_LPAREN, - [11589] = 19, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - ACTIONS(377), 1, - anon_sym_STAR_STAR, - ACTIONS(379), 1, - anon_sym_STAR, - ACTIONS(381), 1, - anon_sym_SLASH, - ACTIONS(385), 1, - anon_sym_AMP, - ACTIONS(387), 1, - anon_sym_PIPE, - ACTIONS(389), 1, - anon_sym_CARET, - ACTIONS(395), 1, - anon_sym_AMP_AMP, - ACTIONS(397), 1, - anon_sym_PIPE_PIPE, - ACTIONS(399), 1, - anon_sym_CARET_CARET, - ACTIONS(401), 1, anon_sym_then, - STATE(90), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(375), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(383), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(391), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(393), 4, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - [11654] = 3, + anon_sym_else, + anon_sym_SEMI, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + [6962] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(185), 6, + ACTIONS(257), 8, anon_sym_STAR, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(183), 18, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(255), 24, + ts_builtin_sym_end, anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, + anon_sym_RBRACE, anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, @@ -11669,70 +7776,34 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, - anon_sym_LPAREN, - [11687] = 19, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - ACTIONS(267), 1, anon_sym_then, - ACTIONS(377), 1, - anon_sym_STAR_STAR, - ACTIONS(379), 1, - anon_sym_STAR, - ACTIONS(381), 1, - anon_sym_SLASH, - ACTIONS(385), 1, - anon_sym_AMP, - ACTIONS(387), 1, - anon_sym_PIPE, - ACTIONS(389), 1, - anon_sym_CARET, - ACTIONS(395), 1, - anon_sym_AMP_AMP, - ACTIONS(397), 1, - anon_sym_PIPE_PIPE, - ACTIONS(399), 1, - anon_sym_CARET_CARET, - STATE(90), 1, - sym_dictionary_construction, + anon_sym_else, + anon_sym_SEMI, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + [7003] = 4, + ACTIONS(259), 1, + anon_sym_DASH_GT, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(375), 2, + ACTIONS(241), 9, anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(383), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(391), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(393), 4, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - [11752] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(181), 6, anon_sym_STAR, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(179), 18, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(239), 22, + ts_builtin_sym_end, anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, + anon_sym_RBRACE, anon_sym_COLON_COLON, - anon_sym_DASH, anon_sym_PLUS, anon_sym_STAR_STAR, anon_sym_SLASH, @@ -11745,98 +7816,84 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, + anon_sym_else, + anon_sym_SEMI, anon_sym_LPAREN, - [11785] = 19, - ACTIONS(163), 1, + anon_sym_RPAREN, + anon_sym_RBRACK, + [7046] = 20, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(191), 1, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(193), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(195), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(205), 1, + ACTIONS(187), 1, anon_sym_AMP, - ACTIONS(207), 1, + ACTIONS(189), 1, anon_sym_CARET, - ACTIONS(209), 1, + ACTIONS(191), 1, anon_sym_PIPE, - ACTIONS(215), 1, + ACTIONS(197), 1, anon_sym_AMP_AMP, - ACTIONS(217), 1, + ACTIONS(199), 1, anon_sym_PIPE_PIPE, - ACTIONS(221), 1, + ACTIONS(203), 1, anon_sym_CARET_CARET, - ACTIONS(403), 1, - anon_sym_RPAREN, - STATE(90), 1, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(201), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(203), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(211), 2, + ACTIONS(193), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(213), 4, + ACTIONS(263), 2, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [11850] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(199), 6, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - ACTIONS(197), 18, - anon_sym_DOT, + ACTIONS(261), 7, + ts_builtin_sym_end, anon_sym_COMMA, - anon_sym_RPAREN_GT, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_LPAREN, - [11883] = 3, + anon_sym_RBRACE, + anon_sym_else, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACK, + [7121] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(297), 6, + ACTIONS(267), 8, anon_sym_STAR, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(295), 18, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(265), 24, + ts_builtin_sym_end, anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, + anon_sym_RBRACE, anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, @@ -11851,68 +7908,85 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, anon_sym_LPAREN, - [11916] = 19, - ACTIONS(163), 1, + anon_sym_RPAREN, + anon_sym_RBRACK, + [7162] = 20, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(191), 1, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(193), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(195), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(205), 1, + ACTIONS(187), 1, anon_sym_AMP, - ACTIONS(207), 1, + ACTIONS(189), 1, anon_sym_CARET, - ACTIONS(209), 1, + ACTIONS(191), 1, anon_sym_PIPE, - ACTIONS(215), 1, + ACTIONS(197), 1, anon_sym_AMP_AMP, - ACTIONS(217), 1, + ACTIONS(199), 1, anon_sym_PIPE_PIPE, - ACTIONS(221), 1, + ACTIONS(203), 1, anon_sym_CARET_CARET, - ACTIONS(405), 1, - anon_sym_COLON, - STATE(90), 1, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(201), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(203), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(211), 2, + ACTIONS(193), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(213), 4, + ACTIONS(271), 2, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [11981] = 3, + ACTIONS(269), 7, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACE, + anon_sym_else, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACK, + [7237] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(189), 6, + ACTIONS(275), 8, anon_sym_STAR, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(187), 18, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(273), 24, + ts_builtin_sym_end, anon_sym_DOT, anon_sym_COMMA, - anon_sym_RPAREN_GT, + anon_sym_RBRACE, anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, @@ -11927,34 +8001,36 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, + anon_sym_then, + anon_sym_else, + anon_sym_SEMI, anon_sym_LPAREN, - [12014] = 10, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - ACTIONS(377), 1, - anon_sym_STAR_STAR, - ACTIONS(379), 1, - anon_sym_STAR, - ACTIONS(381), 1, - anon_sym_SLASH, - STATE(90), 1, - sym_dictionary_construction, + anon_sym_RPAREN, + anon_sym_RBRACK, + [7278] = 5, + ACTIONS(277), 1, + anon_sym_COLON, + STATE(184), 1, + sym_declaration_type, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(167), 5, + ACTIONS(241), 7, + anon_sym_STAR, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(161), 12, + anon_sym_EQ, + ACTIONS(239), 18, + anon_sym_DOT, + anon_sym_COMMA, + anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_SLASH, anon_sym_LT_LT, anon_sym_GT_GT, anon_sym_GT_EQ, @@ -11964,31 +8040,30 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, - anon_sym_then, - [12061] = 8, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, anon_sym_LPAREN, - ACTIONS(377), 1, - anon_sym_STAR_STAR, - STATE(90), 1, - sym_dictionary_construction, + anon_sym_RPAREN, + [7318] = 4, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(167), 6, + ACTIONS(105), 2, + aux_sym_signed_integer_token1, + aux_sym_unsigned_integer_token1, + ACTIONS(103), 7, + sym_identifier, anon_sym_STAR, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(161), 13, + ACTIONS(101), 18, + sym_unit_quote, + anon_sym_DOT, + anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, + anon_sym_STAR_STAR, anon_sym_SLASH, anon_sym_LT_LT, anon_sym_GT_GT, @@ -12000,75 +8075,33 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, anon_sym_then, - [12104] = 11, - ACTIONS(163), 1, - anon_sym_DOT, - ACTIONS(165), 1, - anon_sym_COLON_COLON, - ACTIONS(169), 1, anon_sym_LPAREN, - ACTIONS(377), 1, - anon_sym_STAR_STAR, - ACTIONS(379), 1, - anon_sym_STAR, - ACTIONS(381), 1, - anon_sym_SLASH, - STATE(90), 1, - sym_dictionary_construction, + [7356] = 6, + ACTIONS(109), 1, + sym_identifier, + ACTIONS(111), 1, + sym_unit_quote, + STATE(63), 1, + sym__unit, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(375), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(167), 5, + ACTIONS(113), 6, + anon_sym_STAR, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(161), 10, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - [12153] = 12, - ACTIONS(163), 1, + ACTIONS(107), 17, anon_sym_DOT, - ACTIONS(165), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, - anon_sym_LPAREN, - ACTIONS(377), 1, - anon_sym_STAR_STAR, - ACTIONS(379), 1, - anon_sym_STAR, - ACTIONS(381), 1, - anon_sym_SLASH, - STATE(90), 1, - sym_dictionary_construction, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(375), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(383), 2, + anon_sym_STAR_STAR, + anon_sym_SLASH, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(167), 5, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - ACTIONS(161), 8, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, @@ -12077,276 +8110,315 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, anon_sym_then, - [12204] = 14, - ACTIONS(163), 1, + anon_sym_LPAREN, + [7397] = 20, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(377), 1, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(379), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(381), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(385), 1, + ACTIONS(187), 1, anon_sym_AMP, - ACTIONS(389), 1, + ACTIONS(189), 1, anon_sym_CARET, - STATE(90), 1, + ACTIONS(191), 1, + anon_sym_PIPE, + ACTIONS(197), 1, + anon_sym_AMP_AMP, + ACTIONS(199), 1, + anon_sym_PIPE_PIPE, + ACTIONS(203), 1, + anon_sym_CARET_CARET, + ACTIONS(281), 1, + anon_sym_EQ, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(375), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(383), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(167), 3, - anon_sym_PIPE, + ACTIONS(193), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(161), 8, + ACTIONS(279), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - [12259] = 13, - ACTIONS(163), 1, + [7466] = 21, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(377), 1, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(379), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(381), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(385), 1, + ACTIONS(187), 1, anon_sym_AMP, - STATE(90), 1, + ACTIONS(189), 1, + anon_sym_CARET, + ACTIONS(191), 1, + anon_sym_PIPE, + ACTIONS(197), 1, + anon_sym_AMP_AMP, + ACTIONS(199), 1, + anon_sym_PIPE_PIPE, + ACTIONS(203), 1, + anon_sym_CARET_CARET, + ACTIONS(279), 1, + anon_sym_COMMA, + ACTIONS(281), 1, + anon_sym_EQ, + ACTIONS(283), 1, + anon_sym_RPAREN, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(375), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(383), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(167), 4, - anon_sym_PIPE, - anon_sym_CARET, + ACTIONS(193), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(161), 8, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - [12312] = 15, - ACTIONS(163), 1, + [7537] = 20, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(377), 1, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(379), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(381), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(385), 1, + ACTIONS(187), 1, anon_sym_AMP, - ACTIONS(387), 1, - anon_sym_PIPE, - ACTIONS(389), 1, + ACTIONS(189), 1, anon_sym_CARET, - STATE(90), 1, + ACTIONS(191), 1, + anon_sym_PIPE, + ACTIONS(197), 1, + anon_sym_AMP_AMP, + ACTIONS(199), 1, + anon_sym_PIPE_PIPE, + ACTIONS(203), 1, + anon_sym_CARET_CARET, + ACTIONS(287), 1, + anon_sym_EQ, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(167), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(375), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(383), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(161), 8, + ACTIONS(193), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(285), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - [12369] = 16, - ACTIONS(163), 1, + [7606] = 20, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(377), 1, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(379), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(381), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(385), 1, + ACTIONS(187), 1, anon_sym_AMP, - ACTIONS(387), 1, - anon_sym_PIPE, - ACTIONS(389), 1, + ACTIONS(189), 1, anon_sym_CARET, - STATE(90), 1, + ACTIONS(191), 1, + anon_sym_PIPE, + ACTIONS(197), 1, + anon_sym_AMP_AMP, + ACTIONS(199), 1, + anon_sym_PIPE_PIPE, + ACTIONS(203), 1, + anon_sym_CARET_CARET, + ACTIONS(289), 1, + anon_sym_COMMA, + ACTIONS(291), 1, + anon_sym_RBRACK, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(375), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(383), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(391), 2, + ACTIONS(193), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(161), 4, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - ACTIONS(393), 4, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [12428] = 17, - ACTIONS(163), 1, + [7674] = 20, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(377), 1, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(379), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(381), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(385), 1, + ACTIONS(187), 1, anon_sym_AMP, - ACTIONS(387), 1, - anon_sym_PIPE, - ACTIONS(389), 1, + ACTIONS(189), 1, anon_sym_CARET, - ACTIONS(395), 1, + ACTIONS(191), 1, + anon_sym_PIPE, + ACTIONS(197), 1, anon_sym_AMP_AMP, - STATE(90), 1, + ACTIONS(199), 1, + anon_sym_PIPE_PIPE, + ACTIONS(203), 1, + anon_sym_CARET_CARET, + ACTIONS(293), 1, + anon_sym_COMMA, + ACTIONS(295), 1, + anon_sym_RBRACE, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(375), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(383), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(391), 2, + ACTIONS(193), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(161), 3, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - ACTIONS(393), 4, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [12489] = 18, - ACTIONS(163), 1, + [7742] = 20, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(377), 1, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(379), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(381), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(385), 1, + ACTIONS(187), 1, anon_sym_AMP, - ACTIONS(387), 1, - anon_sym_PIPE, - ACTIONS(389), 1, + ACTIONS(189), 1, anon_sym_CARET, - ACTIONS(395), 1, + ACTIONS(191), 1, + anon_sym_PIPE, + ACTIONS(197), 1, anon_sym_AMP_AMP, - ACTIONS(397), 1, + ACTIONS(199), 1, anon_sym_PIPE_PIPE, - STATE(90), 1, + ACTIONS(203), 1, + anon_sym_CARET_CARET, + ACTIONS(297), 1, + anon_sym_COMMA, + ACTIONS(299), 1, + anon_sym_RBRACE, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(161), 2, - anon_sym_CARET_CARET, - anon_sym_then, - ACTIONS(375), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(383), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(391), 2, + ACTIONS(193), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(393), 4, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [12552] = 3, + [7810] = 4, + ACTIONS(301), 1, + anon_sym_DOT, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(149), 6, + ACTIONS(121), 7, + sym_identifier, anon_sym_STAR, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(147), 18, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_RPAREN_GT, + ACTIONS(119), 17, + sym_unit_quote, anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, @@ -12361,144 +8433,118 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, + anon_sym_then, anon_sym_LPAREN, - [12585] = 19, - ACTIONS(163), 1, + [7846] = 19, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(219), 1, - anon_sym_then, - ACTIONS(377), 1, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(379), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(381), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(385), 1, + ACTIONS(187), 1, anon_sym_AMP, - ACTIONS(387), 1, - anon_sym_PIPE, - ACTIONS(389), 1, + ACTIONS(189), 1, anon_sym_CARET, - ACTIONS(395), 1, + ACTIONS(191), 1, + anon_sym_PIPE, + ACTIONS(197), 1, anon_sym_AMP_AMP, - ACTIONS(397), 1, + ACTIONS(199), 1, anon_sym_PIPE_PIPE, - ACTIONS(399), 1, + ACTIONS(203), 1, anon_sym_CARET_CARET, - STATE(90), 1, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(375), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(383), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(391), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(393), 4, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - [12650] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(227), 6, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, + ACTIONS(193), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(225), 18, - anon_sym_DOT, + ACTIONS(303), 2, anon_sym_COMMA, - anon_sym_RPAREN_GT, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, + anon_sym_RPAREN, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_LPAREN, - [12683] = 19, - ACTIONS(163), 1, + [7912] = 20, + ACTIONS(39), 1, + anon_sym_RBRACK, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(191), 1, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(193), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(195), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(205), 1, + ACTIONS(187), 1, anon_sym_AMP, - ACTIONS(207), 1, + ACTIONS(189), 1, anon_sym_CARET, - ACTIONS(209), 1, + ACTIONS(191), 1, anon_sym_PIPE, - ACTIONS(215), 1, + ACTIONS(197), 1, anon_sym_AMP_AMP, - ACTIONS(217), 1, + ACTIONS(199), 1, anon_sym_PIPE_PIPE, - ACTIONS(221), 1, + ACTIONS(203), 1, anon_sym_CARET_CARET, - ACTIONS(407), 1, - anon_sym_else, - STATE(90), 1, + ACTIONS(289), 1, + anon_sym_COMMA, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(201), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(203), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(211), 2, + ACTIONS(193), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(213), 4, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [12748] = 3, + [7980] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(235), 6, + ACTIONS(103), 7, + sym_identifier, anon_sym_STAR, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(233), 18, + ACTIONS(101), 18, + sym_unit_quote, anon_sym_DOT, - anon_sym_COMMA, - anon_sym_RPAREN_GT, anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, @@ -12513,22 +8559,23 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, + anon_sym_then, anon_sym_LPAREN, - [12781] = 3, + [8014] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(239), 6, + ACTIONS(117), 7, + sym_identifier, anon_sym_STAR, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(237), 18, + ACTIONS(115), 18, + sym_unit_quote, anon_sym_DOT, - anon_sym_COMMA, - anon_sym_RPAREN_GT, anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, @@ -12543,225 +8590,404 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, + anon_sym_then, + anon_sym_LPAREN, + [8048] = 19, + ACTIONS(127), 1, + anon_sym_DOT, + ACTIONS(129), 1, + anon_sym_COLON_COLON, + ACTIONS(133), 1, + anon_sym_LPAREN, + ACTIONS(173), 1, + anon_sym_STAR_STAR, + ACTIONS(175), 1, + anon_sym_STAR, + ACTIONS(177), 1, + anon_sym_SLASH, + ACTIONS(187), 1, + anon_sym_AMP, + ACTIONS(189), 1, + anon_sym_CARET, + ACTIONS(191), 1, + anon_sym_PIPE, + ACTIONS(197), 1, + anon_sym_AMP_AMP, + ACTIONS(199), 1, + anon_sym_PIPE_PIPE, + ACTIONS(203), 1, + anon_sym_CARET_CARET, + STATE(99), 1, + sym_dictionary_construction, + ACTIONS(3), 2, + sym_comment, + sym__whitespace, + ACTIONS(183), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(185), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(193), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(305), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + ACTIONS(195), 4, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_LT_EQ, + anon_sym_BANG_EQ, + [8114] = 19, + ACTIONS(127), 1, + anon_sym_DOT, + ACTIONS(129), 1, + anon_sym_COLON_COLON, + ACTIONS(133), 1, + anon_sym_LPAREN, + ACTIONS(173), 1, + anon_sym_STAR_STAR, + ACTIONS(175), 1, + anon_sym_STAR, + ACTIONS(177), 1, + anon_sym_SLASH, + ACTIONS(187), 1, + anon_sym_AMP, + ACTIONS(189), 1, + anon_sym_CARET, + ACTIONS(191), 1, + anon_sym_PIPE, + ACTIONS(197), 1, + anon_sym_AMP_AMP, + ACTIONS(199), 1, + anon_sym_PIPE_PIPE, + ACTIONS(203), 1, + anon_sym_CARET_CARET, + ACTIONS(307), 1, + anon_sym_COLON, + STATE(99), 1, + sym_dictionary_construction, + ACTIONS(3), 2, + sym_comment, + sym__whitespace, + ACTIONS(183), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(185), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(193), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(195), 4, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_LT_EQ, + anon_sym_BANG_EQ, + [8179] = 19, + ACTIONS(127), 1, + anon_sym_DOT, + ACTIONS(129), 1, + anon_sym_COLON_COLON, + ACTIONS(133), 1, anon_sym_LPAREN, - [12814] = 19, - ACTIONS(163), 1, + ACTIONS(173), 1, + anon_sym_STAR_STAR, + ACTIONS(175), 1, + anon_sym_STAR, + ACTIONS(177), 1, + anon_sym_SLASH, + ACTIONS(187), 1, + anon_sym_AMP, + ACTIONS(189), 1, + anon_sym_CARET, + ACTIONS(191), 1, + anon_sym_PIPE, + ACTIONS(197), 1, + anon_sym_AMP_AMP, + ACTIONS(199), 1, + anon_sym_PIPE_PIPE, + ACTIONS(203), 1, + anon_sym_CARET_CARET, + ACTIONS(289), 1, + anon_sym_COMMA, + STATE(99), 1, + sym_dictionary_construction, + ACTIONS(3), 2, + sym_comment, + sym__whitespace, + ACTIONS(183), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(185), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(193), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(195), 4, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_LT_EQ, + anon_sym_BANG_EQ, + [8244] = 19, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(191), 1, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(193), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(195), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(205), 1, + ACTIONS(187), 1, anon_sym_AMP, - ACTIONS(207), 1, + ACTIONS(189), 1, anon_sym_CARET, - ACTIONS(209), 1, + ACTIONS(191), 1, anon_sym_PIPE, - ACTIONS(215), 1, + ACTIONS(197), 1, anon_sym_AMP_AMP, - ACTIONS(217), 1, + ACTIONS(199), 1, anon_sym_PIPE_PIPE, - ACTIONS(221), 1, + ACTIONS(203), 1, anon_sym_CARET_CARET, - ACTIONS(409), 1, + ACTIONS(309), 1, anon_sym_SEMI, - STATE(90), 1, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(201), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(203), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(211), 2, + ACTIONS(193), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(213), 4, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [12879] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(251), 6, + [8309] = 19, + ACTIONS(127), 1, + anon_sym_DOT, + ACTIONS(129), 1, + anon_sym_COLON_COLON, + ACTIONS(133), 1, + anon_sym_LPAREN, + ACTIONS(261), 1, + anon_sym_then, + ACTIONS(313), 1, + anon_sym_STAR_STAR, + ACTIONS(315), 1, anon_sym_STAR, + ACTIONS(317), 1, + anon_sym_SLASH, + ACTIONS(321), 1, anon_sym_AMP, + ACTIONS(323), 1, anon_sym_PIPE, + ACTIONS(325), 1, anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - ACTIONS(249), 18, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_RPAREN_GT, - anon_sym_COLON_COLON, + ACTIONS(331), 1, + anon_sym_AMP_AMP, + ACTIONS(333), 1, + anon_sym_PIPE_PIPE, + ACTIONS(335), 1, + anon_sym_CARET_CARET, + STATE(99), 1, + sym_dictionary_construction, + ACTIONS(3), 2, + sym_comment, + sym__whitespace, + ACTIONS(311), 2, anon_sym_DASH, anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, + ACTIONS(319), 2, anon_sym_LT_LT, anon_sym_GT_GT, + ACTIONS(327), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(329), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, + [8374] = 19, + ACTIONS(127), 1, + anon_sym_DOT, + ACTIONS(129), 1, + anon_sym_COLON_COLON, + ACTIONS(133), 1, + anon_sym_LPAREN, + ACTIONS(173), 1, + anon_sym_STAR_STAR, + ACTIONS(175), 1, + anon_sym_STAR, + ACTIONS(177), 1, + anon_sym_SLASH, + ACTIONS(187), 1, + anon_sym_AMP, + ACTIONS(189), 1, + anon_sym_CARET, + ACTIONS(191), 1, + anon_sym_PIPE, + ACTIONS(197), 1, anon_sym_AMP_AMP, + ACTIONS(199), 1, anon_sym_PIPE_PIPE, + ACTIONS(203), 1, anon_sym_CARET_CARET, - anon_sym_LPAREN, - [12912] = 3, + ACTIONS(337), 1, + anon_sym_COMMA, + STATE(99), 1, + sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(257), 6, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - ACTIONS(255), 18, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_RPAREN_GT, - anon_sym_COLON_COLON, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, + ACTIONS(193), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_LPAREN, - [12945] = 19, - ACTIONS(163), 1, + [8439] = 19, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(259), 1, - anon_sym_then, - ACTIONS(377), 1, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(379), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(381), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(385), 1, + ACTIONS(187), 1, anon_sym_AMP, - ACTIONS(387), 1, - anon_sym_PIPE, - ACTIONS(389), 1, + ACTIONS(189), 1, anon_sym_CARET, - ACTIONS(395), 1, + ACTIONS(191), 1, + anon_sym_PIPE, + ACTIONS(197), 1, anon_sym_AMP_AMP, - ACTIONS(397), 1, + ACTIONS(199), 1, anon_sym_PIPE_PIPE, - ACTIONS(399), 1, + ACTIONS(203), 1, anon_sym_CARET_CARET, - STATE(90), 1, + ACTIONS(339), 1, + anon_sym_RBRACE, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(375), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(383), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(391), 2, + ACTIONS(193), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(393), 4, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [13010] = 19, - ACTIONS(163), 1, + [8504] = 19, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(263), 1, - anon_sym_then, - ACTIONS(377), 1, + ACTIONS(313), 1, anon_sym_STAR_STAR, - ACTIONS(379), 1, + ACTIONS(315), 1, anon_sym_STAR, - ACTIONS(381), 1, + ACTIONS(317), 1, anon_sym_SLASH, - ACTIONS(385), 1, + ACTIONS(321), 1, anon_sym_AMP, - ACTIONS(387), 1, + ACTIONS(323), 1, anon_sym_PIPE, - ACTIONS(389), 1, + ACTIONS(325), 1, anon_sym_CARET, - ACTIONS(395), 1, + ACTIONS(331), 1, anon_sym_AMP_AMP, - ACTIONS(397), 1, + ACTIONS(333), 1, anon_sym_PIPE_PIPE, - ACTIONS(399), 1, + ACTIONS(335), 1, anon_sym_CARET_CARET, - STATE(90), 1, + ACTIONS(341), 1, + anon_sym_then, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(375), 2, + ACTIONS(311), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(383), 2, + ACTIONS(319), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(391), 2, + ACTIONS(327), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(393), 4, + ACTIONS(329), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [13075] = 3, + [8569] = 10, + ACTIONS(127), 1, + anon_sym_DOT, + ACTIONS(129), 1, + anon_sym_COLON_COLON, + ACTIONS(133), 1, + anon_sym_LPAREN, + ACTIONS(313), 1, + anon_sym_STAR_STAR, + ACTIONS(315), 1, + anon_sym_STAR, + ACTIONS(317), 1, + anon_sym_SLASH, + STATE(99), 1, + sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(273), 6, - anon_sym_STAR, + ACTIONS(131), 5, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(271), 18, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_RPAREN_GT, - anon_sym_COLON_COLON, + ACTIONS(125), 12, anon_sym_DASH, anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, anon_sym_LT_LT, anon_sym_GT_GT, anon_sym_GT_EQ, @@ -12771,26 +8997,31 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, + anon_sym_then, + [8616] = 8, + ACTIONS(127), 1, + anon_sym_DOT, + ACTIONS(129), 1, + anon_sym_COLON_COLON, + ACTIONS(133), 1, anon_sym_LPAREN, - [13108] = 3, + ACTIONS(313), 1, + anon_sym_STAR_STAR, + STATE(99), 1, + sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(277), 6, + ACTIONS(131), 6, anon_sym_STAR, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(275), 18, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_RPAREN_GT, - anon_sym_COLON_COLON, + ACTIONS(125), 13, anon_sym_DASH, anon_sym_PLUS, - anon_sym_STAR_STAR, anon_sym_SLASH, anon_sym_LT_LT, anon_sym_GT_GT, @@ -12801,27 +9032,35 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, + anon_sym_then, + [8659] = 11, + ACTIONS(127), 1, + anon_sym_DOT, + ACTIONS(129), 1, + anon_sym_COLON_COLON, + ACTIONS(133), 1, anon_sym_LPAREN, - [13141] = 3, + ACTIONS(313), 1, + anon_sym_STAR_STAR, + ACTIONS(315), 1, + anon_sym_STAR, + ACTIONS(317), 1, + anon_sym_SLASH, + STATE(99), 1, + sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(281), 6, - anon_sym_STAR, + ACTIONS(311), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(131), 5, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(279), 18, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_RPAREN_GT, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, + ACTIONS(125), 10, anon_sym_LT_LT, anon_sym_GT_GT, anon_sym_GT_EQ, @@ -12831,29 +9070,79 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, + anon_sym_then, + [8708] = 12, + ACTIONS(127), 1, + anon_sym_DOT, + ACTIONS(129), 1, + anon_sym_COLON_COLON, + ACTIONS(133), 1, anon_sym_LPAREN, - [13174] = 3, + ACTIONS(313), 1, + anon_sym_STAR_STAR, + ACTIONS(315), 1, + anon_sym_STAR, + ACTIONS(317), 1, + anon_sym_SLASH, + STATE(99), 1, + sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(177), 6, - anon_sym_STAR, + ACTIONS(311), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(319), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(131), 5, anon_sym_AMP, anon_sym_PIPE, anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(175), 18, + ACTIONS(125), 8, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_LT_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_CARET_CARET, + anon_sym_then, + [8759] = 14, + ACTIONS(127), 1, anon_sym_DOT, - anon_sym_COMMA, - anon_sym_RPAREN_GT, + ACTIONS(129), 1, anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, + ACTIONS(133), 1, + anon_sym_LPAREN, + ACTIONS(313), 1, anon_sym_STAR_STAR, + ACTIONS(315), 1, + anon_sym_STAR, + ACTIONS(317), 1, anon_sym_SLASH, + ACTIONS(321), 1, + anon_sym_AMP, + ACTIONS(325), 1, + anon_sym_CARET, + STATE(99), 1, + sym_dictionary_construction, + ACTIONS(3), 2, + sym_comment, + sym__whitespace, + ACTIONS(311), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(319), 2, anon_sym_LT_LT, anon_sym_GT_GT, + ACTIONS(131), 3, + anon_sym_PIPE, + anon_sym_GT, + anon_sym_LT, + ACTIONS(125), 8, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, @@ -12861,701 +9150,671 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP_AMP, anon_sym_PIPE_PIPE, anon_sym_CARET_CARET, - anon_sym_LPAREN, - [13207] = 19, - ACTIONS(163), 1, + anon_sym_then, + [8814] = 13, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(191), 1, + ACTIONS(313), 1, anon_sym_STAR_STAR, - ACTIONS(193), 1, + ACTIONS(315), 1, anon_sym_STAR, - ACTIONS(195), 1, + ACTIONS(317), 1, anon_sym_SLASH, - ACTIONS(205), 1, + ACTIONS(321), 1, anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - ACTIONS(209), 1, - anon_sym_PIPE, - ACTIONS(215), 1, - anon_sym_AMP_AMP, - ACTIONS(217), 1, - anon_sym_PIPE_PIPE, - ACTIONS(221), 1, - anon_sym_CARET_CARET, - ACTIONS(347), 1, - anon_sym_COMMA, - STATE(90), 1, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(201), 2, + ACTIONS(311), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(203), 2, + ACTIONS(319), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(211), 2, + ACTIONS(131), 4, + anon_sym_PIPE, + anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(213), 4, + ACTIONS(125), 8, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [13272] = 19, - ACTIONS(163), 1, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_CARET_CARET, + anon_sym_then, + [8867] = 15, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(191), 1, + ACTIONS(313), 1, anon_sym_STAR_STAR, - ACTIONS(193), 1, + ACTIONS(315), 1, anon_sym_STAR, - ACTIONS(195), 1, + ACTIONS(317), 1, anon_sym_SLASH, - ACTIONS(205), 1, + ACTIONS(321), 1, anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - ACTIONS(209), 1, + ACTIONS(323), 1, anon_sym_PIPE, - ACTIONS(215), 1, - anon_sym_AMP_AMP, - ACTIONS(217), 1, - anon_sym_PIPE_PIPE, - ACTIONS(221), 1, - anon_sym_CARET_CARET, - ACTIONS(411), 1, - ts_builtin_sym_end, - STATE(90), 1, + ACTIONS(325), 1, + anon_sym_CARET, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(201), 2, + ACTIONS(131), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(311), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(203), 2, + ACTIONS(319), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(211), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(213), 4, + ACTIONS(125), 8, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [13337] = 19, - ACTIONS(163), 1, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_CARET_CARET, + anon_sym_then, + [8924] = 16, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(291), 1, - anon_sym_then, - ACTIONS(377), 1, + ACTIONS(313), 1, anon_sym_STAR_STAR, - ACTIONS(379), 1, + ACTIONS(315), 1, anon_sym_STAR, - ACTIONS(381), 1, + ACTIONS(317), 1, anon_sym_SLASH, - ACTIONS(385), 1, + ACTIONS(321), 1, anon_sym_AMP, - ACTIONS(387), 1, + ACTIONS(323), 1, anon_sym_PIPE, - ACTIONS(389), 1, + ACTIONS(325), 1, anon_sym_CARET, - ACTIONS(395), 1, - anon_sym_AMP_AMP, - ACTIONS(397), 1, - anon_sym_PIPE_PIPE, - ACTIONS(399), 1, - anon_sym_CARET_CARET, - STATE(90), 1, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(375), 2, + ACTIONS(311), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(383), 2, + ACTIONS(319), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(391), 2, + ACTIONS(327), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(393), 4, + ACTIONS(125), 4, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_CARET_CARET, + anon_sym_then, + ACTIONS(329), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [13402] = 19, - ACTIONS(163), 1, + [8983] = 17, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(191), 1, + ACTIONS(313), 1, anon_sym_STAR_STAR, - ACTIONS(193), 1, + ACTIONS(315), 1, anon_sym_STAR, - ACTIONS(195), 1, + ACTIONS(317), 1, anon_sym_SLASH, - ACTIONS(205), 1, + ACTIONS(321), 1, anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - ACTIONS(209), 1, + ACTIONS(323), 1, anon_sym_PIPE, - ACTIONS(215), 1, + ACTIONS(325), 1, + anon_sym_CARET, + ACTIONS(331), 1, anon_sym_AMP_AMP, - ACTIONS(217), 1, - anon_sym_PIPE_PIPE, - ACTIONS(221), 1, - anon_sym_CARET_CARET, - ACTIONS(413), 1, - anon_sym_RPAREN, - STATE(90), 1, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(201), 2, + ACTIONS(311), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(203), 2, + ACTIONS(319), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(211), 2, + ACTIONS(327), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(213), 4, + ACTIONS(125), 3, + anon_sym_PIPE_PIPE, + anon_sym_CARET_CARET, + anon_sym_then, + ACTIONS(329), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [13467] = 19, - ACTIONS(163), 1, + [9044] = 18, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(191), 1, + ACTIONS(313), 1, anon_sym_STAR_STAR, - ACTIONS(193), 1, + ACTIONS(315), 1, anon_sym_STAR, - ACTIONS(195), 1, + ACTIONS(317), 1, anon_sym_SLASH, - ACTIONS(205), 1, + ACTIONS(321), 1, anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - ACTIONS(209), 1, + ACTIONS(323), 1, anon_sym_PIPE, - ACTIONS(215), 1, + ACTIONS(325), 1, + anon_sym_CARET, + ACTIONS(331), 1, anon_sym_AMP_AMP, - ACTIONS(217), 1, + ACTIONS(333), 1, anon_sym_PIPE_PIPE, - ACTIONS(221), 1, - anon_sym_CARET_CARET, - ACTIONS(415), 1, - anon_sym_COLON, - STATE(90), 1, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(201), 2, + ACTIONS(125), 2, + anon_sym_CARET_CARET, + anon_sym_then, + ACTIONS(311), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(203), 2, + ACTIONS(319), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(211), 2, + ACTIONS(327), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(213), 4, + ACTIONS(329), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [13532] = 19, - ACTIONS(163), 1, + [9107] = 19, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(191), 1, + ACTIONS(201), 1, + anon_sym_then, + ACTIONS(313), 1, anon_sym_STAR_STAR, - ACTIONS(193), 1, + ACTIONS(315), 1, anon_sym_STAR, - ACTIONS(195), 1, + ACTIONS(317), 1, anon_sym_SLASH, - ACTIONS(205), 1, + ACTIONS(321), 1, anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - ACTIONS(209), 1, + ACTIONS(323), 1, anon_sym_PIPE, - ACTIONS(215), 1, + ACTIONS(325), 1, + anon_sym_CARET, + ACTIONS(331), 1, anon_sym_AMP_AMP, - ACTIONS(217), 1, + ACTIONS(333), 1, anon_sym_PIPE_PIPE, - ACTIONS(221), 1, + ACTIONS(335), 1, anon_sym_CARET_CARET, - ACTIONS(417), 1, - anon_sym_else, - STATE(90), 1, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(201), 2, + ACTIONS(311), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(203), 2, + ACTIONS(319), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(211), 2, + ACTIONS(327), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(213), 4, + ACTIONS(329), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [13597] = 19, - ACTIONS(311), 1, + [9172] = 19, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(317), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(321), 1, + ACTIONS(133), 1, + anon_sym_LPAREN, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(323), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(325), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(329), 1, + ACTIONS(187), 1, anon_sym_AMP, - ACTIONS(331), 1, - anon_sym_PIPE, - ACTIONS(333), 1, + ACTIONS(189), 1, anon_sym_CARET, - ACTIONS(339), 1, + ACTIONS(191), 1, + anon_sym_PIPE, + ACTIONS(197), 1, anon_sym_AMP_AMP, - ACTIONS(341), 1, + ACTIONS(199), 1, anon_sym_PIPE_PIPE, - ACTIONS(343), 1, + ACTIONS(203), 1, anon_sym_CARET_CARET, - ACTIONS(345), 1, - anon_sym_LPAREN, - ACTIONS(419), 1, - anon_sym_RPAREN_GT, - STATE(172), 1, + ACTIONS(343), 1, + anon_sym_else, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(319), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(327), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(335), 2, + ACTIONS(193), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(337), 4, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [13662] = 19, - ACTIONS(163), 1, + [9237] = 19, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(191), 1, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(193), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(195), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(205), 1, + ACTIONS(187), 1, anon_sym_AMP, - ACTIONS(207), 1, + ACTIONS(189), 1, anon_sym_CARET, - ACTIONS(209), 1, + ACTIONS(191), 1, anon_sym_PIPE, - ACTIONS(215), 1, + ACTIONS(197), 1, anon_sym_AMP_AMP, - ACTIONS(217), 1, + ACTIONS(199), 1, anon_sym_PIPE_PIPE, - ACTIONS(221), 1, + ACTIONS(203), 1, anon_sym_CARET_CARET, - ACTIONS(421), 1, - anon_sym_COLON, - STATE(90), 1, + ACTIONS(345), 1, + ts_builtin_sym_end, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(201), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(203), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(211), 2, + ACTIONS(193), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(213), 4, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [13727] = 19, - ACTIONS(311), 1, + [9302] = 19, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(317), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(321), 1, + ACTIONS(133), 1, + anon_sym_LPAREN, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(323), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(325), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(329), 1, + ACTIONS(187), 1, anon_sym_AMP, - ACTIONS(331), 1, - anon_sym_PIPE, - ACTIONS(333), 1, + ACTIONS(189), 1, anon_sym_CARET, - ACTIONS(339), 1, + ACTIONS(191), 1, + anon_sym_PIPE, + ACTIONS(197), 1, anon_sym_AMP_AMP, - ACTIONS(341), 1, + ACTIONS(199), 1, anon_sym_PIPE_PIPE, - ACTIONS(343), 1, + ACTIONS(203), 1, anon_sym_CARET_CARET, - ACTIONS(345), 1, - anon_sym_LPAREN, - ACTIONS(423), 1, - anon_sym_RPAREN_GT, - STATE(172), 1, + ACTIONS(347), 1, + anon_sym_COLON, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(319), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(327), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(335), 2, + ACTIONS(193), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(337), 4, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [13792] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(243), 6, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - ACTIONS(241), 18, + [9367] = 19, + ACTIONS(127), 1, anon_sym_DOT, - anon_sym_COMMA, - anon_sym_RPAREN_GT, + ACTIONS(129), 1, anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, + ACTIONS(133), 1, anon_sym_LPAREN, - [13825] = 3, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(231), 6, + ACTIONS(231), 1, + anon_sym_then, + ACTIONS(313), 1, + anon_sym_STAR_STAR, + ACTIONS(315), 1, anon_sym_STAR, + ACTIONS(317), 1, + anon_sym_SLASH, + ACTIONS(321), 1, anon_sym_AMP, + ACTIONS(323), 1, anon_sym_PIPE, + ACTIONS(325), 1, anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - ACTIONS(229), 18, - anon_sym_DOT, - anon_sym_COMMA, - anon_sym_RPAREN_GT, - anon_sym_COLON_COLON, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, + ACTIONS(331), 1, anon_sym_AMP_AMP, + ACTIONS(333), 1, anon_sym_PIPE_PIPE, + ACTIONS(335), 1, anon_sym_CARET_CARET, - anon_sym_LPAREN, - [13858] = 4, - ACTIONS(425), 1, - anon_sym_DASH_GT, + STATE(99), 1, + sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(243), 7, + ACTIONS(311), 2, anon_sym_DASH, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_GT, - anon_sym_LT, - ACTIONS(241), 16, - anon_sym_DOT, - anon_sym_COLON_COLON, anon_sym_PLUS, - anon_sym_STAR_STAR, - anon_sym_SLASH, + ACTIONS(319), 2, anon_sym_LT_LT, anon_sym_GT_GT, + ACTIONS(327), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(329), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - anon_sym_AMP_AMP, - anon_sym_PIPE_PIPE, - anon_sym_CARET_CARET, - anon_sym_then, - anon_sym_LPAREN, - [13893] = 19, - ACTIONS(163), 1, + [9432] = 19, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(191), 1, + ACTIONS(235), 1, + anon_sym_then, + ACTIONS(313), 1, anon_sym_STAR_STAR, - ACTIONS(193), 1, + ACTIONS(315), 1, anon_sym_STAR, - ACTIONS(195), 1, + ACTIONS(317), 1, anon_sym_SLASH, - ACTIONS(205), 1, + ACTIONS(321), 1, anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - ACTIONS(209), 1, + ACTIONS(323), 1, anon_sym_PIPE, - ACTIONS(215), 1, + ACTIONS(325), 1, + anon_sym_CARET, + ACTIONS(331), 1, anon_sym_AMP_AMP, - ACTIONS(217), 1, + ACTIONS(333), 1, anon_sym_PIPE_PIPE, - ACTIONS(221), 1, + ACTIONS(335), 1, anon_sym_CARET_CARET, - ACTIONS(427), 1, - anon_sym_COMMA, - STATE(90), 1, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(201), 2, + ACTIONS(311), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(203), 2, + ACTIONS(319), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(211), 2, + ACTIONS(327), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(213), 4, + ACTIONS(329), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [13958] = 19, - ACTIONS(163), 1, + [9497] = 19, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(377), 1, + ACTIONS(269), 1, + anon_sym_then, + ACTIONS(313), 1, anon_sym_STAR_STAR, - ACTIONS(379), 1, + ACTIONS(315), 1, anon_sym_STAR, - ACTIONS(381), 1, + ACTIONS(317), 1, anon_sym_SLASH, - ACTIONS(385), 1, + ACTIONS(321), 1, anon_sym_AMP, - ACTIONS(387), 1, + ACTIONS(323), 1, anon_sym_PIPE, - ACTIONS(389), 1, + ACTIONS(325), 1, anon_sym_CARET, - ACTIONS(395), 1, + ACTIONS(331), 1, anon_sym_AMP_AMP, - ACTIONS(397), 1, + ACTIONS(333), 1, anon_sym_PIPE_PIPE, - ACTIONS(399), 1, + ACTIONS(335), 1, anon_sym_CARET_CARET, - ACTIONS(429), 1, - anon_sym_then, - STATE(90), 1, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(375), 2, + ACTIONS(311), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(383), 2, + ACTIONS(319), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(391), 2, + ACTIONS(327), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(393), 4, + ACTIONS(329), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [14023] = 19, - ACTIONS(163), 1, + [9562] = 19, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(377), 1, + ACTIONS(173), 1, anon_sym_STAR_STAR, - ACTIONS(379), 1, + ACTIONS(175), 1, anon_sym_STAR, - ACTIONS(381), 1, + ACTIONS(177), 1, anon_sym_SLASH, - ACTIONS(385), 1, + ACTIONS(187), 1, anon_sym_AMP, - ACTIONS(387), 1, - anon_sym_PIPE, - ACTIONS(389), 1, + ACTIONS(189), 1, anon_sym_CARET, - ACTIONS(395), 1, + ACTIONS(191), 1, + anon_sym_PIPE, + ACTIONS(197), 1, anon_sym_AMP_AMP, - ACTIONS(397), 1, + ACTIONS(199), 1, anon_sym_PIPE_PIPE, - ACTIONS(399), 1, + ACTIONS(203), 1, anon_sym_CARET_CARET, - ACTIONS(431), 1, - anon_sym_then, - STATE(90), 1, + ACTIONS(349), 1, + anon_sym_else, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(375), 2, + ACTIONS(183), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(383), 2, + ACTIONS(185), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(391), 2, + ACTIONS(193), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(393), 4, + ACTIONS(195), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [14088] = 19, - ACTIONS(163), 1, + [9627] = 19, + ACTIONS(127), 1, anon_sym_DOT, - ACTIONS(165), 1, + ACTIONS(129), 1, anon_sym_COLON_COLON, - ACTIONS(169), 1, + ACTIONS(133), 1, anon_sym_LPAREN, - ACTIONS(191), 1, + ACTIONS(313), 1, anon_sym_STAR_STAR, - ACTIONS(193), 1, + ACTIONS(315), 1, anon_sym_STAR, - ACTIONS(195), 1, + ACTIONS(317), 1, anon_sym_SLASH, - ACTIONS(205), 1, + ACTIONS(321), 1, anon_sym_AMP, - ACTIONS(207), 1, - anon_sym_CARET, - ACTIONS(209), 1, + ACTIONS(323), 1, anon_sym_PIPE, - ACTIONS(215), 1, + ACTIONS(325), 1, + anon_sym_CARET, + ACTIONS(331), 1, anon_sym_AMP_AMP, - ACTIONS(217), 1, + ACTIONS(333), 1, anon_sym_PIPE_PIPE, - ACTIONS(221), 1, + ACTIONS(335), 1, anon_sym_CARET_CARET, - ACTIONS(433), 1, - anon_sym_COMMA, - STATE(90), 1, + ACTIONS(351), 1, + anon_sym_then, + STATE(99), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(201), 2, + ACTIONS(311), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(203), 2, + ACTIONS(319), 2, anon_sym_LT_LT, anon_sym_GT_GT, - ACTIONS(211), 2, + ACTIONS(327), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(329), 4, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_LT_EQ, + anon_sym_BANG_EQ, + [9692] = 4, + ACTIONS(353), 1, + anon_sym_DASH_GT, + ACTIONS(3), 2, + sym_comment, + sym__whitespace, + ACTIONS(241), 7, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_CARET, anon_sym_GT, anon_sym_LT, - ACTIONS(213), 4, + ACTIONS(239), 16, + anon_sym_DOT, + anon_sym_COLON_COLON, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_SLASH, + anon_sym_LT_LT, + anon_sym_GT_GT, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [14153] = 3, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_CARET_CARET, + anon_sym_then, + anon_sym_LPAREN, + [9727] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(435), 7, + ACTIONS(355), 7, sym_identifier, sym_self, aux_sym_base_ten_token1, @@ -13563,12 +9822,12 @@ static const uint16_t ts_small_parse_table[] = { sym_false, anon_sym_if, anon_sym_let, - ACTIONS(88), 12, + ACTIONS(86), 12, sym_string, aux_sym_octal_token1, aux_sym_hex_token1, aux_sym_binary_token1, - anon_sym_LT_LPAREN, + anon_sym_LBRACE, anon_sym_DASH, anon_sym_PLUS, anon_sym_BANG, @@ -13576,19 +9835,17 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, anon_sym_RBRACK, anon_sym_LT_LT_LT, - [14181] = 5, - STATE(245), 1, - sym__unit, + [9755] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(129), 2, + ACTIONS(103), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(437), 2, + ACTIONS(101), 12, sym_identifier, sym_unit_quote, - ACTIONS(123), 9, + anon_sym_DOT, anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, @@ -13598,16 +9855,16 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [14208] = 4, - ACTIONS(439), 1, + [9778] = 4, + ACTIONS(357), 1, anon_sym_DOT, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(139), 2, + ACTIONS(121), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(137), 11, + ACTIONS(119), 11, sym_identifier, sym_unit_quote, anon_sym_COLON_COLON, @@ -13619,17 +9876,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [14233] = 3, + [9803] = 5, + STATE(164), 1, + sym__unit, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(133), 2, + ACTIONS(113), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(131), 12, + ACTIONS(359), 2, sym_identifier, sym_unit_quote, - anon_sym_DOT, + ACTIONS(107), 9, anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, @@ -13639,64 +9898,39 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [14256] = 9, - ACTIONS(441), 1, - sym_identifier, - ACTIONS(443), 1, - aux_sym_base_ten_token1, - ACTIONS(447), 1, - anon_sym_LPAREN, - STATE(78), 1, - sym__float, - STATE(80), 1, - sym_number, - STATE(249), 1, - sym_constraint_set_expression, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(445), 2, - anon_sym_DASH, - anon_sym_PLUS, - STATE(233), 5, - sym_scalar, - sym_constraint_set_parenthesis, - sym_constraint_set_unary_expression, - sym_constraint_set_binary_expression, - sym_constraint_set_method_call, - [14290] = 9, - ACTIONS(441), 1, + [9830] = 9, + ACTIONS(361), 1, sym_identifier, - ACTIONS(443), 1, + ACTIONS(363), 1, aux_sym_base_ten_token1, - ACTIONS(447), 1, + ACTIONS(367), 1, anon_sym_LPAREN, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(254), 1, + STATE(168), 1, sym_constraint_set_expression, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(445), 2, + ACTIONS(365), 2, anon_sym_DASH, anon_sym_PLUS, - STATE(233), 5, + STATE(154), 5, sym_scalar, sym_constraint_set_parenthesis, sym_constraint_set_unary_expression, sym_constraint_set_binary_expression, sym_constraint_set_method_call, - [14324] = 3, + [9864] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(451), 2, + ACTIONS(371), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(449), 11, + ACTIONS(369), 11, anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, @@ -13708,91 +9942,85 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_BANG_EQ, anon_sym_RPAREN, anon_sym_GT_GT_GT, - [14346] = 9, - ACTIONS(441), 1, + [9886] = 9, + ACTIONS(361), 1, sym_identifier, - ACTIONS(447), 1, + ACTIONS(367), 1, anon_sym_LPAREN, - ACTIONS(453), 1, + ACTIONS(373), 1, aux_sym_base_ten_token1, - STATE(222), 1, - sym__float, - STATE(223), 1, + STATE(146), 1, sym_number, - STATE(244), 1, + STATE(147), 1, + sym__float, + STATE(166), 1, sym_constraint_set_expression, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(455), 2, + ACTIONS(375), 2, anon_sym_DASH, anon_sym_PLUS, - STATE(233), 5, + STATE(154), 5, sym_scalar, sym_constraint_set_parenthesis, sym_constraint_set_unary_expression, sym_constraint_set_binary_expression, sym_constraint_set_method_call, - [14380] = 9, - ACTIONS(441), 1, - sym_identifier, - ACTIONS(443), 1, - aux_sym_base_ten_token1, - ACTIONS(447), 1, - anon_sym_LPAREN, - STATE(78), 1, - sym__float, - STATE(80), 1, - sym_number, - STATE(231), 1, - sym_constraint_set_expression, + [9920] = 4, + ACTIONS(377), 1, + anon_sym_COLON_COLON, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(445), 2, + ACTIONS(381), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(379), 10, anon_sym_DASH, anon_sym_PLUS, - STATE(233), 5, - sym_scalar, - sym_constraint_set_parenthesis, - sym_constraint_set_unary_expression, - sym_constraint_set_binary_expression, - sym_constraint_set_method_call, - [14414] = 9, - ACTIONS(441), 1, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_LT_EQ, + anon_sym_BANG_EQ, + anon_sym_RPAREN, + anon_sym_GT_GT_GT, + [9944] = 9, + ACTIONS(361), 1, sym_identifier, - ACTIONS(447), 1, - anon_sym_LPAREN, - ACTIONS(453), 1, + ACTIONS(363), 1, aux_sym_base_ten_token1, - STATE(222), 1, + ACTIONS(367), 1, + anon_sym_LPAREN, + STATE(57), 1, sym__float, - STATE(223), 1, + STATE(59), 1, sym_number, - STATE(231), 1, + STATE(171), 1, sym_constraint_set_expression, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(455), 2, + ACTIONS(365), 2, anon_sym_DASH, anon_sym_PLUS, - STATE(233), 5, + STATE(154), 5, sym_scalar, sym_constraint_set_parenthesis, sym_constraint_set_unary_expression, sym_constraint_set_binary_expression, sym_constraint_set_method_call, - [14448] = 4, - ACTIONS(457), 1, - anon_sym_COLON_COLON, + [9978] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(461), 2, + ACTIONS(385), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(459), 10, + ACTIONS(383), 11, + anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, anon_sym_STAR, @@ -13803,39 +10031,14 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_BANG_EQ, anon_sym_RPAREN, anon_sym_GT_GT_GT, - [14472] = 9, - ACTIONS(441), 1, - sym_identifier, - ACTIONS(443), 1, - aux_sym_base_ten_token1, - ACTIONS(447), 1, - anon_sym_LPAREN, - STATE(78), 1, - sym__float, - STATE(80), 1, - sym_number, - STATE(247), 1, - sym_constraint_set_expression, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(445), 2, - anon_sym_DASH, - anon_sym_PLUS, - STATE(233), 5, - sym_scalar, - sym_constraint_set_parenthesis, - sym_constraint_set_unary_expression, - sym_constraint_set_binary_expression, - sym_constraint_set_method_call, - [14506] = 3, + [10000] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(465), 2, + ACTIONS(389), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(463), 11, + ACTIONS(387), 11, anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, @@ -13847,89 +10050,91 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_BANG_EQ, anon_sym_RPAREN, anon_sym_GT_GT_GT, - [14528] = 9, - ACTIONS(441), 1, + [10022] = 9, + ACTIONS(361), 1, sym_identifier, - ACTIONS(447), 1, - anon_sym_LPAREN, - ACTIONS(453), 1, + ACTIONS(363), 1, aux_sym_base_ten_token1, - STATE(222), 1, + ACTIONS(367), 1, + anon_sym_LPAREN, + STATE(57), 1, sym__float, - STATE(223), 1, + STATE(59), 1, sym_number, - STATE(243), 1, + STATE(170), 1, sym_constraint_set_expression, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(455), 2, + ACTIONS(365), 2, anon_sym_DASH, anon_sym_PLUS, - STATE(233), 5, + STATE(154), 5, sym_scalar, sym_constraint_set_parenthesis, sym_constraint_set_unary_expression, sym_constraint_set_binary_expression, sym_constraint_set_method_call, - [14562] = 9, - ACTIONS(441), 1, + [10056] = 9, + ACTIONS(361), 1, sym_identifier, - ACTIONS(443), 1, + ACTIONS(363), 1, aux_sym_base_ten_token1, - ACTIONS(447), 1, + ACTIONS(367), 1, anon_sym_LPAREN, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(251), 1, + STATE(167), 1, sym_constraint_set_expression, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(445), 2, + ACTIONS(365), 2, anon_sym_DASH, anon_sym_PLUS, - STATE(233), 5, + STATE(154), 5, sym_scalar, sym_constraint_set_parenthesis, sym_constraint_set_unary_expression, sym_constraint_set_binary_expression, sym_constraint_set_method_call, - [14596] = 9, - ACTIONS(441), 1, + [10090] = 9, + ACTIONS(361), 1, sym_identifier, - ACTIONS(447), 1, - anon_sym_LPAREN, - ACTIONS(453), 1, + ACTIONS(363), 1, aux_sym_base_ten_token1, - STATE(222), 1, + ACTIONS(367), 1, + anon_sym_LPAREN, + STATE(57), 1, sym__float, - STATE(223), 1, + STATE(59), 1, sym_number, - STATE(246), 1, + STATE(151), 1, sym_constraint_set_expression, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(455), 2, + ACTIONS(365), 2, anon_sym_DASH, anon_sym_PLUS, - STATE(233), 5, + STATE(154), 5, sym_scalar, sym_constraint_set_parenthesis, sym_constraint_set_unary_expression, sym_constraint_set_binary_expression, sym_constraint_set_method_call, - [14630] = 3, + [10124] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(469), 2, + ACTIONS(117), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(467), 11, + ACTIONS(115), 11, + sym_identifier, + sym_unit_quote, anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, @@ -13939,1497 +10144,1102 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - anon_sym_RPAREN, - anon_sym_GT_GT_GT, - [14652] = 3, + [10146] = 9, + ACTIONS(361), 1, + sym_identifier, + ACTIONS(367), 1, + anon_sym_LPAREN, + ACTIONS(373), 1, + aux_sym_base_ten_token1, + STATE(146), 1, + sym_number, + STATE(147), 1, + sym__float, + STATE(151), 1, + sym_constraint_set_expression, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(145), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(143), 11, - sym_identifier, - sym_unit_quote, - anon_sym_COLON_COLON, + ACTIONS(375), 2, anon_sym_DASH, anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - [14674] = 9, - ACTIONS(441), 1, + STATE(154), 5, + sym_scalar, + sym_constraint_set_parenthesis, + sym_constraint_set_unary_expression, + sym_constraint_set_binary_expression, + sym_constraint_set_method_call, + [10180] = 9, + ACTIONS(361), 1, sym_identifier, - ACTIONS(443), 1, - aux_sym_base_ten_token1, - ACTIONS(447), 1, + ACTIONS(367), 1, anon_sym_LPAREN, - STATE(78), 1, - sym__float, - STATE(80), 1, + ACTIONS(373), 1, + aux_sym_base_ten_token1, + STATE(146), 1, sym_number, - STATE(250), 1, + STATE(147), 1, + sym__float, + STATE(165), 1, sym_constraint_set_expression, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(445), 2, + ACTIONS(375), 2, anon_sym_DASH, anon_sym_PLUS, - STATE(233), 5, + STATE(154), 5, sym_scalar, sym_constraint_set_parenthesis, sym_constraint_set_unary_expression, sym_constraint_set_binary_expression, sym_constraint_set_method_call, - [14708] = 9, - ACTIONS(441), 1, + [10214] = 9, + ACTIONS(361), 1, sym_identifier, - ACTIONS(443), 1, + ACTIONS(363), 1, aux_sym_base_ten_token1, - ACTIONS(447), 1, + ACTIONS(367), 1, anon_sym_LPAREN, - STATE(78), 1, + STATE(57), 1, sym__float, - STATE(80), 1, + STATE(59), 1, sym_number, - STATE(248), 1, + STATE(169), 1, sym_constraint_set_expression, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(445), 2, + ACTIONS(365), 2, anon_sym_DASH, anon_sym_PLUS, - STATE(233), 5, + STATE(154), 5, sym_scalar, sym_constraint_set_parenthesis, sym_constraint_set_unary_expression, sym_constraint_set_binary_expression, sym_constraint_set_method_call, - [14742] = 9, - ACTIONS(441), 1, + [10248] = 9, + ACTIONS(361), 1, sym_identifier, - ACTIONS(447), 1, + ACTIONS(367), 1, anon_sym_LPAREN, - ACTIONS(453), 1, + ACTIONS(373), 1, aux_sym_base_ten_token1, - STATE(222), 1, - sym__float, - STATE(223), 1, + STATE(146), 1, sym_number, - STATE(242), 1, + STATE(147), 1, + sym__float, + STATE(163), 1, sym_constraint_set_expression, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(455), 2, + ACTIONS(375), 2, anon_sym_DASH, anon_sym_PLUS, - STATE(233), 5, + STATE(154), 5, sym_scalar, sym_constraint_set_parenthesis, sym_constraint_set_unary_expression, sym_constraint_set_binary_expression, sym_constraint_set_method_call, - [14776] = 7, - ACTIONS(457), 1, + [10282] = 7, + ACTIONS(377), 1, anon_sym_COLON_COLON, - STATE(226), 1, + STATE(161), 1, sym__constraint_set_relation, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(471), 2, + ACTIONS(391), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(473), 2, + ACTIONS(393), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(475), 2, + ACTIONS(395), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(477), 4, + ACTIONS(397), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [14805] = 7, - ACTIONS(457), 1, - anon_sym_COLON_COLON, - STATE(235), 1, - sym__constraint_set_relation, + [10311] = 3, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(471), 2, + ACTIONS(141), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(139), 9, + anon_sym_COLON_COLON, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(473), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(479), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(481), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [14834] = 5, - ACTIONS(457), 1, + [10331] = 5, + ACTIONS(377), 1, anon_sym_COLON_COLON, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(461), 2, + ACTIONS(381), 2, anon_sym_GT, anon_sym_LT, - ACTIONS(473), 2, + ACTIONS(393), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(459), 6, + ACTIONS(379), 6, anon_sym_DASH, anon_sym_PLUS, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [14858] = 3, + [10355] = 6, + ACTIONS(377), 1, + anon_sym_COLON_COLON, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(177), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(175), 9, - anon_sym_COLON_COLON, + ACTIONS(391), 2, anon_sym_DASH, anon_sym_PLUS, + ACTIONS(393), 2, anon_sym_STAR, anon_sym_SLASH, + ACTIONS(399), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(401), 4, anon_sym_GT_EQ, anon_sym_EQ_EQ, anon_sym_LT_EQ, anon_sym_BANG_EQ, - [14878] = 6, - ACTIONS(457), 1, + [10381] = 4, + ACTIONS(377), 1, anon_sym_COLON_COLON, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(471), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(473), 2, + ACTIONS(403), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(483), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(485), 4, - anon_sym_GT_EQ, - anon_sym_EQ_EQ, - anon_sym_LT_EQ, - anon_sym_BANG_EQ, - [14904] = 5, - ACTIONS(457), 1, + ACTIONS(379), 4, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_RPAREN, + anon_sym_GT_GT_GT, + [10399] = 5, + ACTIONS(377), 1, anon_sym_COLON_COLON, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(485), 2, + ACTIONS(401), 2, anon_sym_RPAREN, anon_sym_GT_GT_GT, - ACTIONS(487), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(489), 2, + ACTIONS(403), 2, anon_sym_STAR, anon_sym_SLASH, - [14924] = 4, - ACTIONS(457), 1, + ACTIONS(405), 2, + anon_sym_DASH, + anon_sym_PLUS, + [10419] = 5, + ACTIONS(377), 1, anon_sym_COLON_COLON, + ACTIONS(407), 1, + anon_sym_GT_GT_GT, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(489), 2, + ACTIONS(403), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(459), 4, + ACTIONS(405), 2, anon_sym_DASH, anon_sym_PLUS, - anon_sym_RPAREN, - anon_sym_GT_GT_GT, - [14942] = 5, - ACTIONS(457), 1, + [10438] = 5, + ACTIONS(377), 1, anon_sym_COLON_COLON, - ACTIONS(491), 1, + ACTIONS(409), 1, anon_sym_RPAREN, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(487), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(489), 2, + ACTIONS(403), 2, anon_sym_STAR, anon_sym_SLASH, - [14961] = 5, - ACTIONS(457), 1, + ACTIONS(405), 2, + anon_sym_DASH, + anon_sym_PLUS, + [10457] = 5, + ACTIONS(377), 1, anon_sym_COLON_COLON, - ACTIONS(493), 1, + ACTIONS(411), 1, anon_sym_RPAREN, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(487), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(489), 2, + ACTIONS(403), 2, anon_sym_STAR, anon_sym_SLASH, - [14980] = 5, - ACTIONS(457), 1, - anon_sym_COLON_COLON, - ACTIONS(495), 1, - anon_sym_GT_GT_GT, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(487), 2, + ACTIONS(405), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(489), 2, - anon_sym_STAR, - anon_sym_SLASH, - [14999] = 7, - ACTIONS(37), 1, - sym_varadic_dots, - ACTIONS(497), 1, - sym_identifier, - ACTIONS(499), 1, - anon_sym_RPAREN, - STATE(255), 1, - aux_sym_struct_definition_repeat1, - STATE(283), 1, - sym_struct_member, - STATE(300), 1, - sym__struct_final_element, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - [15022] = 7, + [10476] = 7, ACTIONS(37), 1, sym_varadic_dots, - ACTIONS(497), 1, + ACTIONS(413), 1, sym_identifier, - ACTIONS(501), 1, + ACTIONS(415), 1, anon_sym_RPAREN, - STATE(255), 1, + STATE(173), 1, aux_sym_struct_definition_repeat1, - STATE(283), 1, + STATE(187), 1, sym_struct_member, - STATE(315), 1, + STATE(208), 1, sym__struct_final_element, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15045] = 5, - ACTIONS(457), 1, - anon_sym_COLON_COLON, - ACTIONS(503), 1, - anon_sym_GT_GT_GT, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(487), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(489), 2, - anon_sym_STAR, - anon_sym_SLASH, - [15064] = 5, - ACTIONS(505), 1, + [10499] = 5, + ACTIONS(417), 1, sym_identifier, - STATE(255), 1, + STATE(173), 1, aux_sym_struct_definition_repeat1, - STATE(311), 1, + STATE(206), 1, sym_struct_member, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(508), 2, + ACTIONS(420), 2, anon_sym_RPAREN, sym_varadic_dots, - [15082] = 4, - ACTIONS(510), 1, - sym_identifier, - ACTIONS(512), 1, - anon_sym_in, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - STATE(259), 2, - sym_let_in_assignment, - aux_sym_let_in_repeat1, - [15097] = 4, - ACTIONS(510), 1, - sym_identifier, - ACTIONS(514), 1, - anon_sym_in, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - STATE(262), 2, - sym_let_in_assignment, - aux_sym_let_in_repeat1, - [15112] = 4, - ACTIONS(510), 1, + [10517] = 4, + ACTIONS(422), 1, sym_identifier, - ACTIONS(516), 1, + ACTIONS(425), 1, anon_sym_in, ACTIONS(3), 2, sym_comment, sym__whitespace, - STATE(257), 2, + STATE(174), 2, sym_let_in_assignment, aux_sym_let_in_repeat1, - [15127] = 4, - ACTIONS(510), 1, + [10532] = 4, + ACTIONS(427), 1, sym_identifier, - ACTIONS(518), 1, + ACTIONS(429), 1, anon_sym_in, ACTIONS(3), 2, sym_comment, sym__whitespace, - STATE(262), 2, + STATE(174), 2, sym_let_in_assignment, aux_sym_let_in_repeat1, - [15142] = 4, - ACTIONS(510), 1, + [10547] = 4, + ACTIONS(427), 1, sym_identifier, - ACTIONS(520), 1, + ACTIONS(431), 1, anon_sym_in, ACTIONS(3), 2, sym_comment, sym__whitespace, - STATE(262), 2, + STATE(175), 2, sym_let_in_assignment, aux_sym_let_in_repeat1, - [15157] = 4, - ACTIONS(510), 1, + [10562] = 4, + ACTIONS(427), 1, sym_identifier, - ACTIONS(522), 1, + ACTIONS(433), 1, anon_sym_in, ACTIONS(3), 2, sym_comment, sym__whitespace, - STATE(260), 2, + STATE(178), 2, sym_let_in_assignment, aux_sym_let_in_repeat1, - [15172] = 4, - ACTIONS(524), 1, + [10577] = 4, + ACTIONS(427), 1, sym_identifier, - ACTIONS(527), 1, + ACTIONS(435), 1, anon_sym_in, ACTIONS(3), 2, sym_comment, sym__whitespace, - STATE(262), 2, + STATE(174), 2, sym_let_in_assignment, aux_sym_let_in_repeat1, - [15187] = 2, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(508), 3, - sym_identifier, - anon_sym_RPAREN, - sym_varadic_dots, - [15197] = 4, - ACTIONS(529), 1, + [10592] = 4, + ACTIONS(437), 1, anon_sym_COMMA, - ACTIONS(532), 1, + ACTIONS(440), 1, anon_sym_RPAREN, - STATE(264), 1, + STATE(179), 1, aux_sym_dictionary_construction_repeat1, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15211] = 4, - ACTIONS(534), 1, + [10606] = 4, + ACTIONS(442), 1, sym_identifier, - ACTIONS(536), 1, - anon_sym_RPAREN, - STATE(286), 1, - sym_dictionary_member_assignment, + STATE(188), 1, + aux_sym_constraint_set_fields_repeat1, + STATE(205), 1, + sym_constraint_set_fields, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15225] = 4, - ACTIONS(538), 1, - anon_sym_COMMA, - ACTIONS(540), 1, + [10620] = 4, + ACTIONS(45), 1, anon_sym_RPAREN, - STATE(264), 1, + ACTIONS(444), 1, + anon_sym_COMMA, + STATE(179), 1, aux_sym_dictionary_construction_repeat1, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15239] = 4, - ACTIONS(534), 1, - sym_identifier, - ACTIONS(540), 1, - anon_sym_RPAREN, - STATE(286), 1, - sym_dictionary_member_assignment, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - [15253] = 4, - ACTIONS(534), 1, - sym_identifier, - ACTIONS(542), 1, - anon_sym_RPAREN, - STATE(286), 1, - sym_dictionary_member_assignment, + [10634] = 2, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15267] = 4, - ACTIONS(534), 1, + ACTIONS(420), 3, sym_identifier, - ACTIONS(544), 1, anon_sym_RPAREN, - STATE(275), 1, - sym_dictionary_member_assignment, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - [15281] = 4, - ACTIONS(546), 1, - sym_identifier, - STATE(280), 1, - aux_sym_constraint_set_fields_repeat1, - STATE(320), 1, - sym_constraint_set_fields, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - [15295] = 4, - ACTIONS(534), 1, - sym_identifier, - ACTIONS(548), 1, + sym_varadic_dots, + [10644] = 4, + ACTIONS(446), 1, + anon_sym_COMMA, + ACTIONS(448), 1, anon_sym_RPAREN, - STATE(273), 1, - sym_dictionary_member_assignment, + STATE(181), 1, + aux_sym_dictionary_construction_repeat1, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15309] = 4, - ACTIONS(542), 1, - anon_sym_RPAREN, - ACTIONS(550), 1, - anon_sym_COMMA, - STATE(264), 1, - aux_sym_dictionary_construction_repeat1, + [10658] = 3, + ACTIONS(452), 1, + anon_sym_EQ, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15323] = 4, - ACTIONS(552), 1, + ACTIONS(450), 2, anon_sym_COMMA, - ACTIONS(554), 1, anon_sym_RPAREN, - STATE(272), 1, - aux_sym_dictionary_construction_repeat1, + [10670] = 2, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15337] = 4, - ACTIONS(534), 1, + ACTIONS(454), 2, sym_identifier, - ACTIONS(556), 1, - anon_sym_RPAREN, - STATE(286), 1, - sym_dictionary_member_assignment, + anon_sym_in, + [10679] = 2, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15351] = 4, - ACTIONS(558), 1, + ACTIONS(456), 2, + aux_sym_signed_integer_token1, + aux_sym_unsigned_integer_token1, + [10688] = 3, + ACTIONS(458), 1, anon_sym_COMMA, - ACTIONS(560), 1, + ACTIONS(460), 1, anon_sym_RPAREN, - STATE(266), 1, - aux_sym_dictionary_construction_repeat1, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15365] = 4, - ACTIONS(546), 1, + [10699] = 3, + ACTIONS(462), 1, sym_identifier, - STATE(280), 1, + STATE(198), 1, aux_sym_constraint_set_fields_repeat1, - STATE(301), 1, - sym_constraint_set_fields, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15379] = 3, - ACTIONS(564), 1, - anon_sym_EQ, + [10710] = 2, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(562), 2, - anon_sym_COMMA, + ACTIONS(464), 2, + aux_sym_signed_integer_token1, + aux_sym_unsigned_integer_token1, + [10719] = 3, + ACTIONS(460), 1, anon_sym_RPAREN, - [15391] = 2, + ACTIONS(466), 1, + anon_sym_COMMA, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(566), 2, - aux_sym_signed_integer_token1, - aux_sym_unsigned_integer_token1, - [15400] = 3, - ACTIONS(568), 1, - aux_sym_base_ten_token1, - STATE(157), 1, - sym_number, + [10730] = 3, + ACTIONS(468), 1, + anon_sym_COMMA, + ACTIONS(470), 1, + anon_sym_COLON, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15411] = 3, - ACTIONS(570), 1, - sym_identifier, - STATE(299), 1, - aux_sym_constraint_set_fields_repeat1, + [10741] = 3, + ACTIONS(363), 1, + aux_sym_base_ten_token1, + STATE(58), 1, + sym_number, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15422] = 3, - ACTIONS(345), 1, + [10752] = 3, + ACTIONS(133), 1, anon_sym_LPAREN, - STATE(195), 1, + STATE(85), 1, sym_dictionary_construction, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15433] = 2, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(572), 2, - sym_identifier, - anon_sym_in, - [15442] = 3, - ACTIONS(574), 1, - anon_sym_COMMA, - ACTIONS(576), 1, - anon_sym_RPAREN, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - [15453] = 2, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(578), 2, - aux_sym_signed_integer_token1, - aux_sym_unsigned_integer_token1, - [15462] = 3, - ACTIONS(534), 1, - sym_identifier, - STATE(286), 1, - sym_dictionary_member_assignment, + [10763] = 3, + ACTIONS(472), 1, + anon_sym_COLON, + STATE(184), 1, + sym_declaration_type, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15473] = 2, + [10774] = 2, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(532), 2, + ACTIONS(440), 2, anon_sym_COMMA, anon_sym_RPAREN, - [15482] = 3, - ACTIONS(576), 1, - anon_sym_RPAREN, - ACTIONS(580), 1, - anon_sym_COMMA, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - [15493] = 3, - ACTIONS(582), 1, - aux_sym_base_ten_token1, - STATE(128), 1, - sym_number, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - [15504] = 3, - ACTIONS(584), 1, + [10783] = 3, + ACTIONS(468), 1, anon_sym_COMMA, - ACTIONS(586), 1, + ACTIONS(474), 1, anon_sym_COLON, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15515] = 3, - ACTIONS(588), 1, - anon_sym_COLON, - STATE(277), 1, - sym_declaration_type, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - [15526] = 3, - ACTIONS(453), 1, + [10794] = 3, + ACTIONS(476), 1, aux_sym_base_ten_token1, - STATE(238), 1, + STATE(115), 1, sym_number, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15537] = 3, - ACTIONS(443), 1, - aux_sym_base_ten_token1, - STATE(81), 1, - sym_number, + [10805] = 3, + ACTIONS(478), 1, + sym_identifier, + STATE(198), 1, + aux_sym_constraint_set_fields_repeat1, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15548] = 2, + [10816] = 2, ACTIONS(3), 2, sym_comment, sym__whitespace, - ACTIONS(590), 2, + ACTIONS(481), 2, aux_sym_signed_integer_token1, aux_sym_unsigned_integer_token1, - [15557] = 3, - ACTIONS(584), 1, - anon_sym_COMMA, - ACTIONS(592), 1, - anon_sym_COLON, + [10825] = 3, + ACTIONS(373), 1, + aux_sym_base_ten_token1, + STATE(158), 1, + sym_number, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15568] = 3, - ACTIONS(594), 1, + [10836] = 3, + ACTIONS(483), 1, aux_sym_signed_integer_token1, - ACTIONS(596), 1, + ACTIONS(485), 1, aux_sym_unsigned_integer_token1, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15579] = 2, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - ACTIONS(598), 2, - aux_sym_signed_integer_token1, - aux_sym_unsigned_integer_token1, - [15588] = 3, - ACTIONS(169), 1, - anon_sym_LPAREN, - STATE(108), 1, - sym_dictionary_construction, + [10847] = 2, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15599] = 3, - ACTIONS(600), 1, + ACTIONS(487), 2, aux_sym_signed_integer_token1, - ACTIONS(602), 1, aux_sym_unsigned_integer_token1, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - [15610] = 3, - ACTIONS(604), 1, - sym_identifier, - STATE(299), 1, - aux_sym_constraint_set_fields_repeat1, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - [15621] = 2, - ACTIONS(607), 1, - anon_sym_RPAREN, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - [15629] = 2, - ACTIONS(609), 1, - anon_sym_COLON, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - [15637] = 2, - ACTIONS(611), 1, + [10856] = 2, + ACTIONS(489), 1, sym_identifier, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15645] = 2, - ACTIONS(613), 1, - aux_sym_hex_token2, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - [15653] = 2, - ACTIONS(615), 1, + [10864] = 2, + ACTIONS(491), 1, aux_sym_binary_token2, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15661] = 2, - ACTIONS(617), 1, - aux_sym_base_ten_token1, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - [15669] = 2, - ACTIONS(619), 1, - sym_identifier, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - [15677] = 2, - ACTIONS(621), 1, - anon_sym_LPAREN, + [10872] = 2, + ACTIONS(493), 1, + anon_sym_COLON, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15685] = 2, - ACTIONS(623), 1, - anon_sym_EQ, + [10880] = 2, + ACTIONS(458), 1, + anon_sym_COMMA, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15693] = 2, - ACTIONS(625), 1, + [10888] = 2, + ACTIONS(495), 1, sym_identifier, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15701] = 2, - ACTIONS(627), 1, + [10896] = 2, + ACTIONS(497), 1, anon_sym_RPAREN, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15709] = 2, - ACTIONS(574), 1, + [10904] = 2, + ACTIONS(468), 1, anon_sym_COMMA, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15717] = 2, - ACTIONS(629), 1, - sym_identifier, - ACTIONS(3), 2, - sym_comment, - sym__whitespace, - [15725] = 2, - ACTIONS(584), 1, - anon_sym_COMMA, + [10912] = 2, + ACTIONS(499), 1, + anon_sym_RPAREN, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15733] = 2, - ACTIONS(631), 1, + [10920] = 2, + ACTIONS(501), 1, anon_sym_RPAREN, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15741] = 2, - ACTIONS(633), 1, - anon_sym_RPAREN, + [10928] = 2, + ACTIONS(503), 1, + anon_sym_LPAREN, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15749] = 2, - ACTIONS(635), 1, + [10936] = 2, + ACTIONS(505), 1, sym_identifier, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15757] = 2, - ACTIONS(637), 1, - sym_identifier, + [10944] = 2, + ACTIONS(507), 1, + aux_sym_base_ten_token1, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15765] = 2, - ACTIONS(639), 1, + [10952] = 2, + ACTIONS(509), 1, anon_sym_EQ, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15773] = 2, - ACTIONS(641), 1, + [10960] = 2, + ACTIONS(511), 1, ts_builtin_sym_end, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15781] = 2, - ACTIONS(643), 1, - anon_sym_COLON, + [10968] = 2, + ACTIONS(513), 1, + sym_identifier, ACTIONS(3), 2, sym_comment, sym__whitespace, - [15789] = 2, - ACTIONS(645), 1, - anon_sym_RPAREN, + [10976] = 2, + ACTIONS(515), 1, + aux_sym_hex_token2, ACTIONS(3), 2, sym_comment, sym__whitespace, }; static const uint32_t ts_small_parse_table_map[] = { - [SMALL_STATE(4)] = 0, - [SMALL_STATE(5)] = 99, - [SMALL_STATE(6)] = 198, - [SMALL_STATE(7)] = 297, - [SMALL_STATE(8)] = 396, - [SMALL_STATE(9)] = 495, - [SMALL_STATE(10)] = 588, - [SMALL_STATE(11)] = 681, - [SMALL_STATE(12)] = 774, - [SMALL_STATE(13)] = 867, - [SMALL_STATE(14)] = 960, - [SMALL_STATE(15)] = 1053, - [SMALL_STATE(16)] = 1146, - [SMALL_STATE(17)] = 1239, - [SMALL_STATE(18)] = 1332, - [SMALL_STATE(19)] = 1425, - [SMALL_STATE(20)] = 1518, - [SMALL_STATE(21)] = 1611, - [SMALL_STATE(22)] = 1704, - [SMALL_STATE(23)] = 1797, - [SMALL_STATE(24)] = 1890, - [SMALL_STATE(25)] = 1983, - [SMALL_STATE(26)] = 2076, - [SMALL_STATE(27)] = 2169, - [SMALL_STATE(28)] = 2262, - [SMALL_STATE(29)] = 2355, - [SMALL_STATE(30)] = 2448, - [SMALL_STATE(31)] = 2541, - [SMALL_STATE(32)] = 2634, - [SMALL_STATE(33)] = 2727, - [SMALL_STATE(34)] = 2820, - [SMALL_STATE(35)] = 2913, - [SMALL_STATE(36)] = 3006, - [SMALL_STATE(37)] = 3099, - [SMALL_STATE(38)] = 3192, - [SMALL_STATE(39)] = 3285, - [SMALL_STATE(40)] = 3378, - [SMALL_STATE(41)] = 3471, - [SMALL_STATE(42)] = 3564, - [SMALL_STATE(43)] = 3657, - [SMALL_STATE(44)] = 3750, - [SMALL_STATE(45)] = 3843, - [SMALL_STATE(46)] = 3936, - [SMALL_STATE(47)] = 4029, - [SMALL_STATE(48)] = 4122, - [SMALL_STATE(49)] = 4215, - [SMALL_STATE(50)] = 4308, - [SMALL_STATE(51)] = 4401, - [SMALL_STATE(52)] = 4494, - [SMALL_STATE(53)] = 4587, - [SMALL_STATE(54)] = 4680, - [SMALL_STATE(55)] = 4773, - [SMALL_STATE(56)] = 4866, - [SMALL_STATE(57)] = 4959, - [SMALL_STATE(58)] = 5052, - [SMALL_STATE(59)] = 5145, - [SMALL_STATE(60)] = 5238, - [SMALL_STATE(61)] = 5331, - [SMALL_STATE(62)] = 5424, - [SMALL_STATE(63)] = 5517, - [SMALL_STATE(64)] = 5610, - [SMALL_STATE(65)] = 5703, - [SMALL_STATE(66)] = 5796, - [SMALL_STATE(67)] = 5889, - [SMALL_STATE(68)] = 5982, - [SMALL_STATE(69)] = 6075, - [SMALL_STATE(70)] = 6168, - [SMALL_STATE(71)] = 6261, - [SMALL_STATE(72)] = 6354, - [SMALL_STATE(73)] = 6447, - [SMALL_STATE(74)] = 6540, - [SMALL_STATE(75)] = 6633, - [SMALL_STATE(76)] = 6726, - [SMALL_STATE(77)] = 6819, - [SMALL_STATE(78)] = 6912, - [SMALL_STATE(79)] = 6961, - [SMALL_STATE(80)] = 7006, - [SMALL_STATE(81)] = 7050, - [SMALL_STATE(82)] = 7092, - [SMALL_STATE(83)] = 7134, - [SMALL_STATE(84)] = 7177, - [SMALL_STATE(85)] = 7218, - [SMALL_STATE(86)] = 7259, - [SMALL_STATE(87)] = 7308, - [SMALL_STATE(88)] = 7349, - [SMALL_STATE(89)] = 7390, - [SMALL_STATE(90)] = 7430, - [SMALL_STATE(91)] = 7470, - [SMALL_STATE(92)] = 7510, - [SMALL_STATE(93)] = 7564, - [SMALL_STATE(94)] = 7604, - [SMALL_STATE(95)] = 7654, - [SMALL_STATE(96)] = 7710, - [SMALL_STATE(97)] = 7768, - [SMALL_STATE(98)] = 7830, - [SMALL_STATE(99)] = 7890, - [SMALL_STATE(100)] = 7954, - [SMALL_STATE(101)] = 8022, - [SMALL_STATE(102)] = 8092, - [SMALL_STATE(103)] = 8164, - [SMALL_STATE(104)] = 8204, - [SMALL_STATE(105)] = 8278, - [SMALL_STATE(106)] = 8318, - [SMALL_STATE(107)] = 8358, - [SMALL_STATE(108)] = 8398, - [SMALL_STATE(109)] = 8438, - [SMALL_STATE(110)] = 8478, - [SMALL_STATE(111)] = 8518, - [SMALL_STATE(112)] = 8558, - [SMALL_STATE(113)] = 8600, - [SMALL_STATE(114)] = 8640, - [SMALL_STATE(115)] = 8714, - [SMALL_STATE(116)] = 8788, - [SMALL_STATE(117)] = 8862, - [SMALL_STATE(118)] = 8902, - [SMALL_STATE(119)] = 8942, - [SMALL_STATE(120)] = 8982, - [SMALL_STATE(121)] = 9022, - [SMALL_STATE(122)] = 9062, - [SMALL_STATE(123)] = 9136, - [SMALL_STATE(124)] = 9176, - [SMALL_STATE(125)] = 9215, - [SMALL_STATE(126)] = 9255, - [SMALL_STATE(127)] = 9293, - [SMALL_STATE(128)] = 9362, - [SMALL_STATE(129)] = 9397, - [SMALL_STATE(130)] = 9434, - [SMALL_STATE(131)] = 9475, - [SMALL_STATE(132)] = 9516, - [SMALL_STATE(133)] = 9551, - [SMALL_STATE(134)] = 9619, - [SMALL_STATE(135)] = 9673, - [SMALL_STATE(136)] = 9731, - [SMALL_STATE(137)] = 9791, - [SMALL_STATE(138)] = 9853, - [SMALL_STATE(139)] = 9917, - [SMALL_STATE(140)] = 9983, - [SMALL_STATE(141)] = 10051, - [SMALL_STATE(142)] = 10087, - [SMALL_STATE(143)] = 10153, - [SMALL_STATE(144)] = 10219, - [SMALL_STATE(145)] = 10287, - [SMALL_STATE(146)] = 10323, - [SMALL_STATE(147)] = 10389, - [SMALL_STATE(148)] = 10455, - [SMALL_STATE(149)] = 10491, - [SMALL_STATE(150)] = 10547, - [SMALL_STATE(151)] = 10615, - [SMALL_STATE(152)] = 10681, - [SMALL_STATE(153)] = 10749, - [SMALL_STATE(154)] = 10783, - [SMALL_STATE(155)] = 10851, - [SMALL_STATE(156)] = 10885, - [SMALL_STATE(157)] = 10919, - [SMALL_STATE(158)] = 10953, - [SMALL_STATE(159)] = 10995, - [SMALL_STATE(160)] = 11029, - [SMALL_STATE(161)] = 11095, - [SMALL_STATE(162)] = 11163, - [SMALL_STATE(163)] = 11211, - [SMALL_STATE(164)] = 11255, - [SMALL_STATE(165)] = 11305, - [SMALL_STATE(166)] = 11357, - [SMALL_STATE(167)] = 11425, - [SMALL_STATE(168)] = 11490, - [SMALL_STATE(169)] = 11523, - [SMALL_STATE(170)] = 11556, - [SMALL_STATE(171)] = 11589, - [SMALL_STATE(172)] = 11654, - [SMALL_STATE(173)] = 11687, - [SMALL_STATE(174)] = 11752, - [SMALL_STATE(175)] = 11785, - [SMALL_STATE(176)] = 11850, - [SMALL_STATE(177)] = 11883, - [SMALL_STATE(178)] = 11916, - [SMALL_STATE(179)] = 11981, - [SMALL_STATE(180)] = 12014, - [SMALL_STATE(181)] = 12061, - [SMALL_STATE(182)] = 12104, - [SMALL_STATE(183)] = 12153, - [SMALL_STATE(184)] = 12204, - [SMALL_STATE(185)] = 12259, - [SMALL_STATE(186)] = 12312, - [SMALL_STATE(187)] = 12369, - [SMALL_STATE(188)] = 12428, - [SMALL_STATE(189)] = 12489, - [SMALL_STATE(190)] = 12552, - [SMALL_STATE(191)] = 12585, - [SMALL_STATE(192)] = 12650, - [SMALL_STATE(193)] = 12683, - [SMALL_STATE(194)] = 12748, - [SMALL_STATE(195)] = 12781, - [SMALL_STATE(196)] = 12814, - [SMALL_STATE(197)] = 12879, - [SMALL_STATE(198)] = 12912, - [SMALL_STATE(199)] = 12945, - [SMALL_STATE(200)] = 13010, - [SMALL_STATE(201)] = 13075, - [SMALL_STATE(202)] = 13108, - [SMALL_STATE(203)] = 13141, - [SMALL_STATE(204)] = 13174, - [SMALL_STATE(205)] = 13207, - [SMALL_STATE(206)] = 13272, - [SMALL_STATE(207)] = 13337, - [SMALL_STATE(208)] = 13402, - [SMALL_STATE(209)] = 13467, - [SMALL_STATE(210)] = 13532, - [SMALL_STATE(211)] = 13597, - [SMALL_STATE(212)] = 13662, - [SMALL_STATE(213)] = 13727, - [SMALL_STATE(214)] = 13792, - [SMALL_STATE(215)] = 13825, - [SMALL_STATE(216)] = 13858, - [SMALL_STATE(217)] = 13893, - [SMALL_STATE(218)] = 13958, - [SMALL_STATE(219)] = 14023, - [SMALL_STATE(220)] = 14088, - [SMALL_STATE(221)] = 14153, - [SMALL_STATE(222)] = 14181, - [SMALL_STATE(223)] = 14208, - [SMALL_STATE(224)] = 14233, - [SMALL_STATE(225)] = 14256, - [SMALL_STATE(226)] = 14290, - [SMALL_STATE(227)] = 14324, - [SMALL_STATE(228)] = 14346, - [SMALL_STATE(229)] = 14380, - [SMALL_STATE(230)] = 14414, - [SMALL_STATE(231)] = 14448, - [SMALL_STATE(232)] = 14472, - [SMALL_STATE(233)] = 14506, - [SMALL_STATE(234)] = 14528, - [SMALL_STATE(235)] = 14562, - [SMALL_STATE(236)] = 14596, - [SMALL_STATE(237)] = 14630, - [SMALL_STATE(238)] = 14652, - [SMALL_STATE(239)] = 14674, - [SMALL_STATE(240)] = 14708, - [SMALL_STATE(241)] = 14742, - [SMALL_STATE(242)] = 14776, - [SMALL_STATE(243)] = 14805, - [SMALL_STATE(244)] = 14834, - [SMALL_STATE(245)] = 14858, - [SMALL_STATE(246)] = 14878, - [SMALL_STATE(247)] = 14904, - [SMALL_STATE(248)] = 14924, - [SMALL_STATE(249)] = 14942, - [SMALL_STATE(250)] = 14961, - [SMALL_STATE(251)] = 14980, - [SMALL_STATE(252)] = 14999, - [SMALL_STATE(253)] = 15022, - [SMALL_STATE(254)] = 15045, - [SMALL_STATE(255)] = 15064, - [SMALL_STATE(256)] = 15082, - [SMALL_STATE(257)] = 15097, - [SMALL_STATE(258)] = 15112, - [SMALL_STATE(259)] = 15127, - [SMALL_STATE(260)] = 15142, - [SMALL_STATE(261)] = 15157, - [SMALL_STATE(262)] = 15172, - [SMALL_STATE(263)] = 15187, - [SMALL_STATE(264)] = 15197, - [SMALL_STATE(265)] = 15211, - [SMALL_STATE(266)] = 15225, - [SMALL_STATE(267)] = 15239, - [SMALL_STATE(268)] = 15253, - [SMALL_STATE(269)] = 15267, - [SMALL_STATE(270)] = 15281, - [SMALL_STATE(271)] = 15295, - [SMALL_STATE(272)] = 15309, - [SMALL_STATE(273)] = 15323, - [SMALL_STATE(274)] = 15337, - [SMALL_STATE(275)] = 15351, - [SMALL_STATE(276)] = 15365, - [SMALL_STATE(277)] = 15379, - [SMALL_STATE(278)] = 15391, - [SMALL_STATE(279)] = 15400, - [SMALL_STATE(280)] = 15411, - [SMALL_STATE(281)] = 15422, - [SMALL_STATE(282)] = 15433, - [SMALL_STATE(283)] = 15442, - [SMALL_STATE(284)] = 15453, - [SMALL_STATE(285)] = 15462, - [SMALL_STATE(286)] = 15473, - [SMALL_STATE(287)] = 15482, - [SMALL_STATE(288)] = 15493, - [SMALL_STATE(289)] = 15504, - [SMALL_STATE(290)] = 15515, - [SMALL_STATE(291)] = 15526, - [SMALL_STATE(292)] = 15537, - [SMALL_STATE(293)] = 15548, - [SMALL_STATE(294)] = 15557, - [SMALL_STATE(295)] = 15568, - [SMALL_STATE(296)] = 15579, - [SMALL_STATE(297)] = 15588, - [SMALL_STATE(298)] = 15599, - [SMALL_STATE(299)] = 15610, - [SMALL_STATE(300)] = 15621, - [SMALL_STATE(301)] = 15629, - [SMALL_STATE(302)] = 15637, - [SMALL_STATE(303)] = 15645, - [SMALL_STATE(304)] = 15653, - [SMALL_STATE(305)] = 15661, - [SMALL_STATE(306)] = 15669, - [SMALL_STATE(307)] = 15677, - [SMALL_STATE(308)] = 15685, - [SMALL_STATE(309)] = 15693, - [SMALL_STATE(310)] = 15701, - [SMALL_STATE(311)] = 15709, - [SMALL_STATE(312)] = 15717, - [SMALL_STATE(313)] = 15725, - [SMALL_STATE(314)] = 15733, - [SMALL_STATE(315)] = 15741, - [SMALL_STATE(316)] = 15749, - [SMALL_STATE(317)] = 15757, - [SMALL_STATE(318)] = 15765, - [SMALL_STATE(319)] = 15773, - [SMALL_STATE(320)] = 15781, - [SMALL_STATE(321)] = 15789, + [SMALL_STATE(3)] = 0, + [SMALL_STATE(4)] = 99, + [SMALL_STATE(5)] = 198, + [SMALL_STATE(6)] = 297, + [SMALL_STATE(7)] = 396, + [SMALL_STATE(8)] = 495, + [SMALL_STATE(9)] = 594, + [SMALL_STATE(10)] = 690, + [SMALL_STATE(11)] = 783, + [SMALL_STATE(12)] = 876, + [SMALL_STATE(13)] = 969, + [SMALL_STATE(14)] = 1062, + [SMALL_STATE(15)] = 1155, + [SMALL_STATE(16)] = 1248, + [SMALL_STATE(17)] = 1341, + [SMALL_STATE(18)] = 1434, + [SMALL_STATE(19)] = 1527, + [SMALL_STATE(20)] = 1620, + [SMALL_STATE(21)] = 1713, + [SMALL_STATE(22)] = 1806, + [SMALL_STATE(23)] = 1899, + [SMALL_STATE(24)] = 1992, + [SMALL_STATE(25)] = 2085, + [SMALL_STATE(26)] = 2178, + [SMALL_STATE(27)] = 2271, + [SMALL_STATE(28)] = 2364, + [SMALL_STATE(29)] = 2457, + [SMALL_STATE(30)] = 2550, + [SMALL_STATE(31)] = 2643, + [SMALL_STATE(32)] = 2736, + [SMALL_STATE(33)] = 2829, + [SMALL_STATE(34)] = 2922, + [SMALL_STATE(35)] = 3015, + [SMALL_STATE(36)] = 3108, + [SMALL_STATE(37)] = 3201, + [SMALL_STATE(38)] = 3294, + [SMALL_STATE(39)] = 3387, + [SMALL_STATE(40)] = 3480, + [SMALL_STATE(41)] = 3573, + [SMALL_STATE(42)] = 3666, + [SMALL_STATE(43)] = 3759, + [SMALL_STATE(44)] = 3852, + [SMALL_STATE(45)] = 3945, + [SMALL_STATE(46)] = 4038, + [SMALL_STATE(47)] = 4131, + [SMALL_STATE(48)] = 4224, + [SMALL_STATE(49)] = 4317, + [SMALL_STATE(50)] = 4410, + [SMALL_STATE(51)] = 4503, + [SMALL_STATE(52)] = 4596, + [SMALL_STATE(53)] = 4689, + [SMALL_STATE(54)] = 4782, + [SMALL_STATE(55)] = 4875, + [SMALL_STATE(56)] = 4968, + [SMALL_STATE(57)] = 5014, + [SMALL_STATE(58)] = 5064, + [SMALL_STATE(59)] = 5107, + [SMALL_STATE(60)] = 5152, + [SMALL_STATE(61)] = 5195, + [SMALL_STATE(62)] = 5245, + [SMALL_STATE(63)] = 5287, + [SMALL_STATE(64)] = 5329, + [SMALL_STATE(65)] = 5371, + [SMALL_STATE(66)] = 5415, + [SMALL_STATE(67)] = 5457, + [SMALL_STATE(68)] = 5498, + [SMALL_STATE(69)] = 5539, + [SMALL_STATE(70)] = 5580, + [SMALL_STATE(71)] = 5621, + [SMALL_STATE(72)] = 5662, + [SMALL_STATE(73)] = 5717, + [SMALL_STATE(74)] = 5758, + [SMALL_STATE(75)] = 5809, + [SMALL_STATE(76)] = 5866, + [SMALL_STATE(77)] = 5925, + [SMALL_STATE(78)] = 5988, + [SMALL_STATE(79)] = 6049, + [SMALL_STATE(80)] = 6114, + [SMALL_STATE(81)] = 6183, + [SMALL_STATE(82)] = 6254, + [SMALL_STATE(83)] = 6327, + [SMALL_STATE(84)] = 6402, + [SMALL_STATE(85)] = 6443, + [SMALL_STATE(86)] = 6484, + [SMALL_STATE(87)] = 6525, + [SMALL_STATE(88)] = 6566, + [SMALL_STATE(89)] = 6607, + [SMALL_STATE(90)] = 6648, + [SMALL_STATE(91)] = 6723, + [SMALL_STATE(92)] = 6798, + [SMALL_STATE(93)] = 6839, + [SMALL_STATE(94)] = 6880, + [SMALL_STATE(95)] = 6921, + [SMALL_STATE(96)] = 6962, + [SMALL_STATE(97)] = 7003, + [SMALL_STATE(98)] = 7046, + [SMALL_STATE(99)] = 7121, + [SMALL_STATE(100)] = 7162, + [SMALL_STATE(101)] = 7237, + [SMALL_STATE(102)] = 7278, + [SMALL_STATE(103)] = 7318, + [SMALL_STATE(104)] = 7356, + [SMALL_STATE(105)] = 7397, + [SMALL_STATE(106)] = 7466, + [SMALL_STATE(107)] = 7537, + [SMALL_STATE(108)] = 7606, + [SMALL_STATE(109)] = 7674, + [SMALL_STATE(110)] = 7742, + [SMALL_STATE(111)] = 7810, + [SMALL_STATE(112)] = 7846, + [SMALL_STATE(113)] = 7912, + [SMALL_STATE(114)] = 7980, + [SMALL_STATE(115)] = 8014, + [SMALL_STATE(116)] = 8048, + [SMALL_STATE(117)] = 8114, + [SMALL_STATE(118)] = 8179, + [SMALL_STATE(119)] = 8244, + [SMALL_STATE(120)] = 8309, + [SMALL_STATE(121)] = 8374, + [SMALL_STATE(122)] = 8439, + [SMALL_STATE(123)] = 8504, + [SMALL_STATE(124)] = 8569, + [SMALL_STATE(125)] = 8616, + [SMALL_STATE(126)] = 8659, + [SMALL_STATE(127)] = 8708, + [SMALL_STATE(128)] = 8759, + [SMALL_STATE(129)] = 8814, + [SMALL_STATE(130)] = 8867, + [SMALL_STATE(131)] = 8924, + [SMALL_STATE(132)] = 8983, + [SMALL_STATE(133)] = 9044, + [SMALL_STATE(134)] = 9107, + [SMALL_STATE(135)] = 9172, + [SMALL_STATE(136)] = 9237, + [SMALL_STATE(137)] = 9302, + [SMALL_STATE(138)] = 9367, + [SMALL_STATE(139)] = 9432, + [SMALL_STATE(140)] = 9497, + [SMALL_STATE(141)] = 9562, + [SMALL_STATE(142)] = 9627, + [SMALL_STATE(143)] = 9692, + [SMALL_STATE(144)] = 9727, + [SMALL_STATE(145)] = 9755, + [SMALL_STATE(146)] = 9778, + [SMALL_STATE(147)] = 9803, + [SMALL_STATE(148)] = 9830, + [SMALL_STATE(149)] = 9864, + [SMALL_STATE(150)] = 9886, + [SMALL_STATE(151)] = 9920, + [SMALL_STATE(152)] = 9944, + [SMALL_STATE(153)] = 9978, + [SMALL_STATE(154)] = 10000, + [SMALL_STATE(155)] = 10022, + [SMALL_STATE(156)] = 10056, + [SMALL_STATE(157)] = 10090, + [SMALL_STATE(158)] = 10124, + [SMALL_STATE(159)] = 10146, + [SMALL_STATE(160)] = 10180, + [SMALL_STATE(161)] = 10214, + [SMALL_STATE(162)] = 10248, + [SMALL_STATE(163)] = 10282, + [SMALL_STATE(164)] = 10311, + [SMALL_STATE(165)] = 10331, + [SMALL_STATE(166)] = 10355, + [SMALL_STATE(167)] = 10381, + [SMALL_STATE(168)] = 10399, + [SMALL_STATE(169)] = 10419, + [SMALL_STATE(170)] = 10438, + [SMALL_STATE(171)] = 10457, + [SMALL_STATE(172)] = 10476, + [SMALL_STATE(173)] = 10499, + [SMALL_STATE(174)] = 10517, + [SMALL_STATE(175)] = 10532, + [SMALL_STATE(176)] = 10547, + [SMALL_STATE(177)] = 10562, + [SMALL_STATE(178)] = 10577, + [SMALL_STATE(179)] = 10592, + [SMALL_STATE(180)] = 10606, + [SMALL_STATE(181)] = 10620, + [SMALL_STATE(182)] = 10634, + [SMALL_STATE(183)] = 10644, + [SMALL_STATE(184)] = 10658, + [SMALL_STATE(185)] = 10670, + [SMALL_STATE(186)] = 10679, + [SMALL_STATE(187)] = 10688, + [SMALL_STATE(188)] = 10699, + [SMALL_STATE(189)] = 10710, + [SMALL_STATE(190)] = 10719, + [SMALL_STATE(191)] = 10730, + [SMALL_STATE(192)] = 10741, + [SMALL_STATE(193)] = 10752, + [SMALL_STATE(194)] = 10763, + [SMALL_STATE(195)] = 10774, + [SMALL_STATE(196)] = 10783, + [SMALL_STATE(197)] = 10794, + [SMALL_STATE(198)] = 10805, + [SMALL_STATE(199)] = 10816, + [SMALL_STATE(200)] = 10825, + [SMALL_STATE(201)] = 10836, + [SMALL_STATE(202)] = 10847, + [SMALL_STATE(203)] = 10856, + [SMALL_STATE(204)] = 10864, + [SMALL_STATE(205)] = 10872, + [SMALL_STATE(206)] = 10880, + [SMALL_STATE(207)] = 10888, + [SMALL_STATE(208)] = 10896, + [SMALL_STATE(209)] = 10904, + [SMALL_STATE(210)] = 10912, + [SMALL_STATE(211)] = 10920, + [SMALL_STATE(212)] = 10928, + [SMALL_STATE(213)] = 10936, + [SMALL_STATE(214)] = 10944, + [SMALL_STATE(215)] = 10952, + [SMALL_STATE(216)] = 10960, + [SMALL_STATE(217)] = 10968, + [SMALL_STATE(218)] = 10976, }; static const TSParseActionEntry ts_parse_actions[] = { [0] = {.entry = {.count = 0, .reusable = false}}, [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT_EXTRA(), - [5] = {.entry = {.count = 1, .reusable = false}}, SHIFT(109), - [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(109), - [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(79), - [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(305), - [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(303), - [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(304), - [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), - [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(106), - [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), - [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(27), - [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(256), + [5] = {.entry = {.count = 1, .reusable = false}}, SHIFT(92), + [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(92), + [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(56), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(214), + [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(218), + [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(204), + [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(96), + [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), + [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(10), + [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(176), [27] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), - [29] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), - [31] = {.entry = {.count = 1, .reusable = true}}, SHIFT(276), - [33] = {.entry = {.count = 1, .reusable = false}}, SHIFT(131), - [35] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), - [37] = {.entry = {.count = 1, .reusable = true}}, SHIFT(287), - [39] = {.entry = {.count = 1, .reusable = true}}, SHIFT(148), - [41] = {.entry = {.count = 1, .reusable = true}}, SHIFT(123), - [43] = {.entry = {.count = 1, .reusable = true}}, SHIFT(110), - [45] = {.entry = {.count = 1, .reusable = true}}, SHIFT(170), - [47] = {.entry = {.count = 1, .reusable = true}}, SHIFT(177), - [49] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(109), - [52] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(109), - [55] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(79), - [58] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(305), - [61] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(303), - [64] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(304), - [67] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(46), - [70] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(106), - [73] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(65), - [76] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(27), - [79] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(256), - [82] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(2), - [85] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(5), - [88] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), - [90] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(276), - [93] = {.entry = {.count = 1, .reusable = false}}, SHIFT(126), - [95] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), - [97] = {.entry = {.count = 1, .reusable = false}}, SHIFT(75), - [99] = {.entry = {.count = 1, .reusable = false}}, SHIFT(261), - [101] = {.entry = {.count = 1, .reusable = false}}, SHIFT(214), - [103] = {.entry = {.count = 1, .reusable = true}}, SHIFT(214), - [105] = {.entry = {.count = 1, .reusable = false}}, SHIFT(124), - [107] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), - [109] = {.entry = {.count = 1, .reusable = false}}, SHIFT(215), - [111] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), - [113] = {.entry = {.count = 1, .reusable = false}}, SHIFT(76), - [115] = {.entry = {.count = 1, .reusable = false}}, SHIFT(258), - [117] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [119] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), - [121] = {.entry = {.count = 1, .reusable = true}}, SHIFT(270), - [123] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_scalar, 1, 0, 2), - [125] = {.entry = {.count = 1, .reusable = false}}, SHIFT(88), - [127] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), - [129] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_scalar, 1, 0, 2), - [131] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_number, 1, 0, 0), - [133] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_number, 1, 0, 0), - [135] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_base_ten, 1, 0, 0), - [137] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__float, 1, 0, 1), - [139] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__float, 1, 0, 1), - [141] = {.entry = {.count = 1, .reusable = true}}, SHIFT(292), - [143] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__float, 3, 0, 12), - [145] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__float, 3, 0, 12), + [29] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), + [31] = {.entry = {.count = 1, .reusable = true}}, SHIFT(180), + [33] = {.entry = {.count = 1, .reusable = false}}, SHIFT(102), + [35] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), + [37] = {.entry = {.count = 1, .reusable = true}}, SHIFT(190), + [39] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), + [41] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73), + [43] = {.entry = {.count = 1, .reusable = true}}, SHIFT(67), + [45] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), + [47] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(92), + [50] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(92), + [53] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(56), + [56] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(214), + [59] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(218), + [62] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(204), + [65] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(23), + [68] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(96), + [71] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(35), + [74] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(10), + [77] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(176), + [80] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(2), + [83] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(4), + [86] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), + [88] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), SHIFT_REPEAT(180), + [91] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), + [93] = {.entry = {.count = 1, .reusable = false}}, SHIFT(103), + [95] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), + [97] = {.entry = {.count = 1, .reusable = false}}, SHIFT(11), + [99] = {.entry = {.count = 1, .reusable = false}}, SHIFT(177), + [101] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_number, 1, 0, 0), + [103] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_number, 1, 0, 0), + [105] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_base_ten, 1, 0, 0), + [107] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_scalar, 1, 0, 2), + [109] = {.entry = {.count = 1, .reusable = false}}, SHIFT(63), + [111] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), + [113] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_scalar, 1, 0, 2), + [115] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__float, 3, 0, 13), + [117] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__float, 3, 0, 13), + [119] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__float, 1, 0, 1), + [121] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__float, 1, 0, 1), + [123] = {.entry = {.count = 1, .reusable = true}}, SHIFT(192), + [125] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, 0, 15), + [127] = {.entry = {.count = 1, .reusable = true}}, SHIFT(213), + [129] = {.entry = {.count = 1, .reusable = true}}, SHIFT(207), + [131] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, 0, 15), + [133] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), + [135] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_definition, 3, 0, 10), + [137] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_struct_definition, 3, 0, 10), + [139] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_scalar, 2, 0, 6), + [141] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_scalar, 2, 0, 6), + [143] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_definition, 4, 0, 19), + [145] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_struct_definition, 4, 0, 19), [147] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dictionary_construction, 2, 0, 0), [149] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_dictionary_construction, 2, 0, 0), [151] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_definition, 2, 0, 0), - [153] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_definition, 3, 0, 9), - [155] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_struct_definition, 3, 0, 9), - [157] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_definition, 3, 0, 11), - [159] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_struct_definition, 3, 0, 11), - [161] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, 0, 14), - [163] = {.entry = {.count = 1, .reusable = true}}, SHIFT(316), - [165] = {.entry = {.count = 1, .reusable = true}}, SHIFT(309), - [167] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, 0, 14), - [169] = {.entry = {.count = 1, .reusable = true}}, SHIFT(271), - [171] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_definition, 4, 0, 18), - [173] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_struct_definition, 4, 0, 18), - [175] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_scalar, 2, 0, 5), - [177] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_scalar, 2, 0, 5), - [179] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesis, 3, 0, 0), - [181] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesis, 3, 0, 0), - [183] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 2, 0, 6), - [185] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 2, 0, 6), - [187] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_member_access, 3, 0, 13), - [189] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_member_access, 3, 0, 13), - [191] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), - [193] = {.entry = {.count = 1, .reusable = false}}, SHIFT(11), - [195] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), - [197] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dictionary_construction, 3, 0, 10), - [199] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_dictionary_construction, 3, 0, 10), - [201] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), - [203] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), - [205] = {.entry = {.count = 1, .reusable = false}}, SHIFT(13), - [207] = {.entry = {.count = 1, .reusable = false}}, SHIFT(15), - [209] = {.entry = {.count = 1, .reusable = false}}, SHIFT(14), - [211] = {.entry = {.count = 1, .reusable = false}}, SHIFT(16), - [213] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), - [215] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), - [217] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), - [219] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_in, 4, 0, 15), - [221] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), - [223] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_in, 4, 0, 15), - [225] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dictionary_construction, 4, 0, 17), - [227] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_dictionary_construction, 4, 0, 17), - [229] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_boolean, 1, 0, 0), - [231] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_boolean, 1, 0, 0), - [233] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 4, 0, 0), - [235] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list, 4, 0, 0), - [237] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_method_call, 4, 0, 19), - [239] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_method_call, 4, 0, 19), - [241] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 1, 0, 0), - [243] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 1, 0, 0), - [245] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 2, 0, 0), - [247] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list, 2, 0, 0), - [249] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_vector2, 5, 0, 20), - [251] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_vector2, 5, 0, 20), - [253] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), - [255] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dictionary_construction, 5, 0, 23), - [257] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_dictionary_construction, 5, 0, 23), - [259] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_closure_definition, 5, 0, 24), - [261] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_closure_definition, 5, 0, 24), - [263] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if, 6, 0, 25), - [265] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if, 6, 0, 25), - [267] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_in, 3, 0, 7), - [269] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_in, 3, 0, 7), - [271] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_vector3, 7, 0, 26), - [273] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_vector3, 7, 0, 26), - [275] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constraint_set, 7, 0, 27), - [277] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_constraint_set, 7, 0, 27), - [279] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_vector4, 9, 0, 28), - [281] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_vector4, 9, 0, 28), - [283] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_signed_integer, 2, 0, 4), - [285] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_signed_integer, 2, 0, 4), - [287] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unsigned_integer, 2, 0, 4), - [289] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unsigned_integer, 2, 0, 4), - [291] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_expression, 2, 0, 3), - [293] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unary_expression, 2, 0, 3), - [295] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 3, 0, 0), - [297] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list, 3, 0, 0), - [299] = {.entry = {.count = 1, .reusable = true}}, SHIFT(204), - [301] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration_type, 2, 0, 0), - [303] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_declaration_type, 2, 0, 0), - [305] = {.entry = {.count = 1, .reusable = true}}, SHIFT(288), - [307] = {.entry = {.count = 1, .reusable = false}}, SHIFT(25), - [309] = {.entry = {.count = 1, .reusable = false}}, SHIFT(26), - [311] = {.entry = {.count = 1, .reusable = true}}, SHIFT(312), - [313] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), - [315] = {.entry = {.count = 1, .reusable = true}}, SHIFT(197), - [317] = {.entry = {.count = 1, .reusable = true}}, SHIFT(302), - [319] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), - [321] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), - [323] = {.entry = {.count = 1, .reusable = false}}, SHIFT(52), - [325] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), - [327] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), - [329] = {.entry = {.count = 1, .reusable = false}}, SHIFT(54), - [331] = {.entry = {.count = 1, .reusable = false}}, SHIFT(55), - [333] = {.entry = {.count = 1, .reusable = false}}, SHIFT(56), - [335] = {.entry = {.count = 1, .reusable = false}}, SHIFT(57), - [337] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), - [339] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), - [341] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), - [343] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), - [345] = {.entry = {.count = 1, .reusable = true}}, SHIFT(269), - [347] = {.entry = {.count = 1, .reusable = true}}, SHIFT(221), - [349] = {.entry = {.count = 1, .reusable = true}}, SHIFT(107), - [351] = {.entry = {.count = 1, .reusable = true}}, SHIFT(279), - [353] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), - [355] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), - [357] = {.entry = {.count = 1, .reusable = true}}, SHIFT(72), - [359] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_member, 4, 0, 22), - [361] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dictionary_member_assignment, 3, 0, 16), - [363] = {.entry = {.count = 1, .reusable = true}}, SHIFT(194), - [365] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), - [367] = {.entry = {.count = 1, .reusable = true}}, SHIFT(201), - [369] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), - [371] = {.entry = {.count = 1, .reusable = true}}, SHIFT(117), - [373] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), - [375] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), - [377] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), - [379] = {.entry = {.count = 1, .reusable = false}}, SHIFT(37), - [381] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), - [383] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), - [385] = {.entry = {.count = 1, .reusable = false}}, SHIFT(39), - [387] = {.entry = {.count = 1, .reusable = false}}, SHIFT(40), - [389] = {.entry = {.count = 1, .reusable = false}}, SHIFT(9), - [391] = {.entry = {.count = 1, .reusable = false}}, SHIFT(41), - [393] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), - [395] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), - [397] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), - [399] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), - [401] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), - [403] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), - [405] = {.entry = {.count = 1, .reusable = false}}, SHIFT(29), - [407] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), - [409] = {.entry = {.count = 1, .reusable = true}}, SHIFT(282), - [411] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0), - [413] = {.entry = {.count = 1, .reusable = true}}, SHIFT(174), - [415] = {.entry = {.count = 1, .reusable = false}}, SHIFT(77), - [417] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), - [419] = {.entry = {.count = 1, .reusable = true}}, SHIFT(203), - [421] = {.entry = {.count = 1, .reusable = false}}, SHIFT(62), - [423] = {.entry = {.count = 1, .reusable = true}}, SHIFT(119), - [425] = {.entry = {.count = 1, .reusable = true}}, SHIFT(67), - [427] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), - [429] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), - [431] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73), - [433] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), - [435] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), - [437] = {.entry = {.count = 1, .reusable = true}}, SHIFT(245), - [439] = {.entry = {.count = 1, .reusable = true}}, SHIFT(291), - [441] = {.entry = {.count = 1, .reusable = true}}, SHIFT(233), - [443] = {.entry = {.count = 1, .reusable = true}}, SHIFT(82), - [445] = {.entry = {.count = 1, .reusable = true}}, SHIFT(232), - [447] = {.entry = {.count = 1, .reusable = true}}, SHIFT(239), - [449] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constraint_set_parenthesis, 3, 0, 0), - [451] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_constraint_set_parenthesis, 3, 0, 0), - [453] = {.entry = {.count = 1, .reusable = true}}, SHIFT(224), - [455] = {.entry = {.count = 1, .reusable = true}}, SHIFT(236), - [457] = {.entry = {.count = 1, .reusable = true}}, SHIFT(306), - [459] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constraint_set_binary_expression, 3, 0, 14), - [461] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_constraint_set_binary_expression, 3, 0, 14), - [463] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constraint_set_expression, 1, 0, 0), - [465] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_constraint_set_expression, 1, 0, 0), - [467] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constraint_set_method_call, 6, 0, 29), - [469] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_constraint_set_method_call, 6, 0, 29), - [471] = {.entry = {.count = 1, .reusable = true}}, SHIFT(228), - [473] = {.entry = {.count = 1, .reusable = true}}, SHIFT(230), - [475] = {.entry = {.count = 1, .reusable = false}}, SHIFT(226), - [477] = {.entry = {.count = 1, .reusable = true}}, SHIFT(226), - [479] = {.entry = {.count = 1, .reusable = false}}, SHIFT(235), - [481] = {.entry = {.count = 1, .reusable = true}}, SHIFT(235), - [483] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_constraint_set_unary_expression, 2, 0, 3), - [485] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constraint_set_unary_expression, 2, 0, 3), - [487] = {.entry = {.count = 1, .reusable = true}}, SHIFT(240), - [489] = {.entry = {.count = 1, .reusable = true}}, SHIFT(229), - [491] = {.entry = {.count = 1, .reusable = true}}, SHIFT(237), - [493] = {.entry = {.count = 1, .reusable = true}}, SHIFT(227), - [495] = {.entry = {.count = 1, .reusable = true}}, SHIFT(202), - [497] = {.entry = {.count = 1, .reusable = true}}, SHIFT(290), - [499] = {.entry = {.count = 1, .reusable = true}}, SHIFT(85), - [501] = {.entry = {.count = 1, .reusable = true}}, SHIFT(155), - [503] = {.entry = {.count = 1, .reusable = true}}, SHIFT(118), - [505] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_struct_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(290), - [508] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_struct_definition_repeat1, 2, 0, 0), - [510] = {.entry = {.count = 1, .reusable = false}}, SHIFT(308), - [512] = {.entry = {.count = 1, .reusable = false}}, SHIFT(64), - [514] = {.entry = {.count = 1, .reusable = false}}, SHIFT(61), - [516] = {.entry = {.count = 1, .reusable = false}}, SHIFT(49), - [518] = {.entry = {.count = 1, .reusable = false}}, SHIFT(24), - [520] = {.entry = {.count = 1, .reusable = false}}, SHIFT(45), - [522] = {.entry = {.count = 1, .reusable = false}}, SHIFT(34), - [524] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_let_in_repeat1, 2, 0, 0), SHIFT_REPEAT(308), - [527] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_let_in_repeat1, 2, 0, 0), - [529] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_dictionary_construction_repeat1, 2, 0, 0), SHIFT_REPEAT(285), - [532] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_dictionary_construction_repeat1, 2, 0, 0), - [534] = {.entry = {.count = 1, .reusable = true}}, SHIFT(318), - [536] = {.entry = {.count = 1, .reusable = true}}, SHIFT(198), - [538] = {.entry = {.count = 1, .reusable = true}}, SHIFT(265), - [540] = {.entry = {.count = 1, .reusable = true}}, SHIFT(192), - [542] = {.entry = {.count = 1, .reusable = true}}, SHIFT(105), - [544] = {.entry = {.count = 1, .reusable = true}}, SHIFT(190), - [546] = {.entry = {.count = 1, .reusable = true}}, SHIFT(289), - [548] = {.entry = {.count = 1, .reusable = true}}, SHIFT(103), - [550] = {.entry = {.count = 1, .reusable = true}}, SHIFT(274), - [552] = {.entry = {.count = 1, .reusable = true}}, SHIFT(268), - [554] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), - [556] = {.entry = {.count = 1, .reusable = true}}, SHIFT(113), - [558] = {.entry = {.count = 1, .reusable = true}}, SHIFT(267), - [560] = {.entry = {.count = 1, .reusable = true}}, SHIFT(176), - [562] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_member, 2, 0, 8), - [564] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), - [566] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_octal, 2, 0, 0), - [568] = {.entry = {.count = 1, .reusable = true}}, SHIFT(156), - [570] = {.entry = {.count = 1, .reusable = true}}, SHIFT(294), - [572] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_in_assignment, 4, 0, 21), - [574] = {.entry = {.count = 1, .reusable = true}}, SHIFT(263), - [576] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__struct_final_element, 1, 0, 0), - [578] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_integer, 1, 0, 0), - [580] = {.entry = {.count = 1, .reusable = true}}, SHIFT(321), - [582] = {.entry = {.count = 1, .reusable = true}}, SHIFT(132), - [584] = {.entry = {.count = 1, .reusable = true}}, SHIFT(317), - [586] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constraint_set_fields, 1, 0, 0), - [588] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), - [590] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_hex, 2, 0, 0), - [592] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constraint_set_fields, 2, 0, 0), - [594] = {.entry = {.count = 1, .reusable = true}}, SHIFT(168), - [596] = {.entry = {.count = 1, .reusable = true}}, SHIFT(169), - [598] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary, 2, 0, 0), - [600] = {.entry = {.count = 1, .reusable = true}}, SHIFT(120), - [602] = {.entry = {.count = 1, .reusable = true}}, SHIFT(121), - [604] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_constraint_set_fields_repeat1, 2, 0, 0), SHIFT_REPEAT(313), - [607] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), - [609] = {.entry = {.count = 1, .reusable = true}}, SHIFT(241), - [611] = {.entry = {.count = 1, .reusable = true}}, SHIFT(281), - [613] = {.entry = {.count = 1, .reusable = true}}, SHIFT(293), - [615] = {.entry = {.count = 1, .reusable = true}}, SHIFT(296), - [617] = {.entry = {.count = 1, .reusable = true}}, SHIFT(278), - [619] = {.entry = {.count = 1, .reusable = true}}, SHIFT(307), - [621] = {.entry = {.count = 1, .reusable = true}}, SHIFT(225), - [623] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), - [625] = {.entry = {.count = 1, .reusable = true}}, SHIFT(297), - [627] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), - [629] = {.entry = {.count = 1, .reusable = true}}, SHIFT(179), - [631] = {.entry = {.count = 1, .reusable = true}}, SHIFT(153), - [633] = {.entry = {.count = 1, .reusable = true}}, SHIFT(159), - [635] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), - [637] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_constraint_set_fields_repeat1, 2, 0, 0), - [639] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), - [641] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [643] = {.entry = {.count = 1, .reusable = true}}, SHIFT(234), - [645] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__struct_final_element, 2, 0, 0), + [153] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_definition, 3, 0, 12), + [155] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_struct_definition, 3, 0, 12), + [157] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesis, 3, 0, 0), + [159] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesis, 3, 0, 0), + [161] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dictionary_construction, 3, 0, 11), + [163] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_dictionary_construction, 3, 0, 11), + [165] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 3, 0, 0), + [167] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list, 3, 0, 0), + [169] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_member_access, 3, 0, 14), + [171] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_member_access, 3, 0, 14), + [173] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), + [175] = {.entry = {.count = 1, .reusable = false}}, SHIFT(14), + [177] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), + [179] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 2, 0, 0), + [181] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list, 2, 0, 0), + [183] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), + [185] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), + [187] = {.entry = {.count = 1, .reusable = false}}, SHIFT(16), + [189] = {.entry = {.count = 1, .reusable = false}}, SHIFT(18), + [191] = {.entry = {.count = 1, .reusable = false}}, SHIFT(17), + [193] = {.entry = {.count = 1, .reusable = false}}, SHIFT(19), + [195] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), + [197] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), + [199] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [201] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_in, 4, 0, 16), + [203] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [205] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_in, 4, 0, 16), + [207] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 4, 0, 0), + [209] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list, 4, 0, 0), + [211] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_method_call, 4, 0, 20), + [213] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_method_call, 4, 0, 20), + [215] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_signed_integer, 2, 0, 5), + [217] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_signed_integer, 2, 0, 5), + [219] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_vector2, 5, 0, 21), + [221] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_vector2, 5, 0, 21), + [223] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unsigned_integer, 2, 0, 5), + [225] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unsigned_integer, 2, 0, 5), + [227] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dictionary_construction, 5, 0, 24), + [229] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_dictionary_construction, 5, 0, 24), + [231] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_closure_definition, 5, 0, 25), + [233] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_closure_definition, 5, 0, 25), + [235] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if, 6, 0, 26), + [237] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if, 6, 0, 26), + [239] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 1, 0, 0), + [241] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 1, 0, 0), + [243] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_vector3, 7, 0, 27), + [245] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_vector3, 7, 0, 27), + [247] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constraint_set, 7, 0, 28), + [249] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_constraint_set, 7, 0, 28), + [251] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_vector4, 9, 0, 29), + [253] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_vector4, 9, 0, 29), + [255] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_boolean, 1, 0, 0), + [257] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_boolean, 1, 0, 0), + [259] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [261] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_in, 3, 0, 8), + [263] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_in, 3, 0, 8), + [265] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 2, 0, 7), + [267] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 2, 0, 7), + [269] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_expression, 2, 0, 3), + [271] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unary_expression, 2, 0, 3), + [273] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dictionary_construction, 4, 0, 18), + [275] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_dictionary_construction, 4, 0, 18), + [277] = {.entry = {.count = 1, .reusable = false}}, SHIFT(29), + [279] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dictionary_argument, 1, 0, 4), + [281] = {.entry = {.count = 1, .reusable = false}}, SHIFT(30), + [283] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), + [285] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration_type, 2, 0, 0), + [287] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_declaration_type, 2, 0, 0), + [289] = {.entry = {.count = 1, .reusable = true}}, SHIFT(144), + [291] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), + [293] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), + [295] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), + [297] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), + [299] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), + [301] = {.entry = {.count = 1, .reusable = true}}, SHIFT(197), + [303] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_member, 4, 0, 23), + [305] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dictionary_argument, 3, 0, 17), + [307] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32), + [309] = {.entry = {.count = 1, .reusable = true}}, SHIFT(185), + [311] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), + [313] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), + [315] = {.entry = {.count = 1, .reusable = false}}, SHIFT(41), + [317] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), + [319] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), + [321] = {.entry = {.count = 1, .reusable = false}}, SHIFT(43), + [323] = {.entry = {.count = 1, .reusable = false}}, SHIFT(44), + [325] = {.entry = {.count = 1, .reusable = false}}, SHIFT(45), + [327] = {.entry = {.count = 1, .reusable = false}}, SHIFT(46), + [329] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), + [331] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), + [333] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), + [335] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), + [337] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), + [339] = {.entry = {.count = 1, .reusable = true}}, SHIFT(95), + [341] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [343] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), + [345] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0), + [347] = {.entry = {.count = 1, .reusable = false}}, SHIFT(51), + [349] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), + [351] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), + [353] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), + [355] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2, 0, 0), + [357] = {.entry = {.count = 1, .reusable = true}}, SHIFT(200), + [359] = {.entry = {.count = 1, .reusable = true}}, SHIFT(164), + [361] = {.entry = {.count = 1, .reusable = true}}, SHIFT(154), + [363] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), + [365] = {.entry = {.count = 1, .reusable = true}}, SHIFT(148), + [367] = {.entry = {.count = 1, .reusable = true}}, SHIFT(155), + [369] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constraint_set_parenthesis, 3, 0, 0), + [371] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_constraint_set_parenthesis, 3, 0, 0), + [373] = {.entry = {.count = 1, .reusable = true}}, SHIFT(145), + [375] = {.entry = {.count = 1, .reusable = true}}, SHIFT(150), + [377] = {.entry = {.count = 1, .reusable = true}}, SHIFT(217), + [379] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constraint_set_binary_expression, 3, 0, 15), + [381] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_constraint_set_binary_expression, 3, 0, 15), + [383] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constraint_set_method_call, 6, 0, 30), + [385] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_constraint_set_method_call, 6, 0, 30), + [387] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constraint_set_expression, 1, 0, 0), + [389] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_constraint_set_expression, 1, 0, 0), + [391] = {.entry = {.count = 1, .reusable = true}}, SHIFT(160), + [393] = {.entry = {.count = 1, .reusable = true}}, SHIFT(159), + [395] = {.entry = {.count = 1, .reusable = false}}, SHIFT(161), + [397] = {.entry = {.count = 1, .reusable = true}}, SHIFT(161), + [399] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_constraint_set_unary_expression, 2, 0, 3), + [401] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constraint_set_unary_expression, 2, 0, 3), + [403] = {.entry = {.count = 1, .reusable = true}}, SHIFT(157), + [405] = {.entry = {.count = 1, .reusable = true}}, SHIFT(156), + [407] = {.entry = {.count = 1, .reusable = true}}, SHIFT(94), + [409] = {.entry = {.count = 1, .reusable = true}}, SHIFT(149), + [411] = {.entry = {.count = 1, .reusable = true}}, SHIFT(153), + [413] = {.entry = {.count = 1, .reusable = true}}, SHIFT(194), + [415] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), + [417] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_struct_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(194), + [420] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_struct_definition_repeat1, 2, 0, 0), + [422] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_let_in_repeat1, 2, 0, 0), SHIFT_REPEAT(215), + [425] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_let_in_repeat1, 2, 0, 0), + [427] = {.entry = {.count = 1, .reusable = false}}, SHIFT(215), + [429] = {.entry = {.count = 1, .reusable = false}}, SHIFT(28), + [431] = {.entry = {.count = 1, .reusable = false}}, SHIFT(55), + [433] = {.entry = {.count = 1, .reusable = false}}, SHIFT(38), + [435] = {.entry = {.count = 1, .reusable = false}}, SHIFT(50), + [437] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_dictionary_construction_repeat1, 2, 0, 0), SHIFT_REPEAT(9), + [440] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_dictionary_construction_repeat1, 2, 0, 0), + [442] = {.entry = {.count = 1, .reusable = true}}, SHIFT(196), + [444] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), + [446] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), + [448] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), + [450] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_member, 2, 0, 9), + [452] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [454] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_in_assignment, 4, 0, 22), + [456] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_hex, 2, 0, 0), + [458] = {.entry = {.count = 1, .reusable = true}}, SHIFT(182), + [460] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__struct_final_element, 1, 0, 0), + [462] = {.entry = {.count = 1, .reusable = true}}, SHIFT(191), + [464] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary, 2, 0, 0), + [466] = {.entry = {.count = 1, .reusable = true}}, SHIFT(210), + [468] = {.entry = {.count = 1, .reusable = true}}, SHIFT(203), + [470] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constraint_set_fields, 2, 0, 0), + [472] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), + [474] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constraint_set_fields, 1, 0, 0), + [476] = {.entry = {.count = 1, .reusable = true}}, SHIFT(114), + [478] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_constraint_set_fields_repeat1, 2, 0, 0), SHIFT_REPEAT(209), + [481] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_octal, 2, 0, 0), + [483] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), + [485] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), + [487] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_integer, 1, 0, 0), + [489] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_constraint_set_fields_repeat1, 2, 0, 0), + [491] = {.entry = {.count = 1, .reusable = true}}, SHIFT(189), + [493] = {.entry = {.count = 1, .reusable = true}}, SHIFT(162), + [495] = {.entry = {.count = 1, .reusable = true}}, SHIFT(193), + [497] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), + [499] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__struct_final_element, 2, 0, 0), + [501] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), + [503] = {.entry = {.count = 1, .reusable = true}}, SHIFT(152), + [505] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), + [507] = {.entry = {.count = 1, .reusable = true}}, SHIFT(199), + [509] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), + [511] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [513] = {.entry = {.count = 1, .reusable = true}}, SHIFT(212), + [515] = {.entry = {.count = 1, .reusable = true}}, SHIFT(186), }; #ifdef __cplusplus diff --git a/tree-sitter-command-cad-model/test/corpus/closure.txt b/tree-sitter-command-cad-model/test/corpus/closure.txt index f3da4bf..99841b4 100644 --- a/tree-sitter-command-cad-model/test/corpus/closure.txt +++ b/tree-sitter-command-cad-model/test/corpus/closure.txt @@ -88,7 +88,7 @@ With Binary Expression Call function ================== -value(value=value) +value(a = b) --- @@ -98,8 +98,75 @@ value(value=value) (expression (identifier)) (dictionary_construction - (dictionary_member_assignment - (identifier) + (dictionary_argument + (expression + (identifier)) + (expression + (identifier))))))) + +================== +Call method deep in tree +================== + +value.value::method(a = b) + +--- + +(source_file + (expression + (method_call + (expression + (member_access + (expression + (identifier)) + (identifier))) + (identifier) + (dictionary_construction + (dictionary_argument + (expression + (identifier)) + (expression + (identifier))))))) + +================== +Call method +================== + +value::method(a = b) + +--- + +(source_file + (expression + (method_call + (expression + (identifier)) + (identifier) + (dictionary_construction + (dictionary_argument + (expression + (identifier)) + (expression + (identifier))))))) + +================== +Call method deep in tree +================== + +value::foo(a = b) + +--- + +(source_file + (expression + (method_call + (expression + (identifier)) + (identifier) + (dictionary_construction + (dictionary_argument + (expression + (identifier)) (expression (identifier))))))) @@ -119,10 +186,10 @@ value() (dictionary_construction)))) ================== -Call function deep in tree +Call function positional ================== -value.value(value=value) +value(a, b, c) --- @@ -130,41 +197,51 @@ value.value(value=value) (expression (function_call (expression - (member_access - (expression - (identifier)) - (identifier))) + (identifier)) (dictionary_construction - (dictionary_member_assignment - (identifier) + (dictionary_argument + (expression + (identifier))) + (dictionary_argument + (expression + (identifier))) + (dictionary_argument (expression (identifier))))))) ================== -Call method +Call function mixed ================== -value::value(value=value) +value(a, b = c, d = e) --- (source_file (expression - (method_call + (function_call (expression (identifier)) - (identifier) (dictionary_construction - (dictionary_member_assignment - (identifier) + (dictionary_argument + (expression + (identifier))) + (dictionary_argument + (expression + (identifier)) + (expression + (identifier))) + (dictionary_argument + (expression + (identifier)) (expression (identifier))))))) ================== -Call method no arguments +Call method positional ================== -value::value() +value::value(a, b) --- @@ -174,13 +251,19 @@ value::value() (expression (identifier)) (identifier) - (dictionary_construction)))) + (dictionary_construction + (dictionary_argument + (expression + (identifier))) + (dictionary_argument + (expression + (identifier))))))) ================== -Call method deep in tree +Call method mixed ================== -value.value::value(value=value) +value::value(a, b = c) --- @@ -188,32 +271,103 @@ value.value::value(value=value) (expression (method_call (expression - (member_access - (expression - (identifier)) - (identifier))) + (identifier)) (identifier) (dictionary_construction - (dictionary_member_assignment - (identifier) + (dictionary_argument + (expression + (identifier))) + (dictionary_argument + (expression + (identifier)) (expression (identifier))))))) ================== -Call method inside parenthasis +Call function complex expressions ================== -(value::value()) +value(a + b, c * d) --- (source_file (expression - (parenthesis + (function_call (expression - (method_call + (identifier)) + (dictionary_construction + (dictionary_argument + (expression + (binary_expression + (expression + (identifier)) + (expression + (identifier))))) + (dictionary_argument + (expression + (binary_expression + (expression + (identifier)) + (expression + (identifier))))))))) + +================== +Call method complex expressions +================== + +obj::method(a + b, c = d * e) + +--- + +(source_file + (expression + (method_call + (expression + (identifier)) + (identifier) + (dictionary_construction + (dictionary_argument + (expression + (binary_expression + (expression + (identifier)) + (expression + (identifier))))) + (dictionary_argument (expression (identifier)) - (identifier) - (dictionary_construction)))))) + (expression + (binary_expression + (expression + (identifier)) + (expression + (identifier))))))))) +================== +Call function nested dictionary positional +================== + +func((a = b, c = d)) + +--- + +(source_file + (expression + (function_call + (expression + (identifier)) + (dictionary_construction + (dictionary_argument + (expression + (dictionary_construction + (dictionary_argument + (expression + (identifier)) + (expression + (identifier))) + (dictionary_argument + (expression + (identifier)) + (expression + (identifier)))))))))) diff --git a/tree-sitter-command-cad-model/test/corpus/dictionary_construction.txt b/tree-sitter-command-cad-model/test/corpus/dictionary_construction.txt index 39085d4..e283e93 100644 --- a/tree-sitter-command-cad-model/test/corpus/dictionary_construction.txt +++ b/tree-sitter-command-cad-model/test/corpus/dictionary_construction.txt @@ -14,15 +14,16 @@ Empty One ================== -(one = a) +(a =b) --- (source_file (expression (dictionary_construction - (dictionary_member_assignment - (identifier) + (dictionary_argument + (expression + (identifier)) (expression (identifier)))))) @@ -30,15 +31,16 @@ One One, ================== -(one = a,) +(a =b,) --- (source_file (expression (dictionary_construction - (dictionary_member_assignment - (identifier) + (dictionary_argument + (expression + (identifier)) (expression (identifier)))))) @@ -46,19 +48,21 @@ One, One, two ================== -(one = a, two = b) +(a =b, c =d) --- (source_file (expression (dictionary_construction - (dictionary_member_assignment - (identifier) + (dictionary_argument + (expression + (identifier)) (expression (identifier))) - (dictionary_member_assignment - (identifier) + (dictionary_argument + (expression + (identifier)) (expression (identifier)))))) @@ -66,18 +70,124 @@ One, two One, two, ================== -(one = a, two = b,) +(a =b, c =d,) + +--- + +(source_file + (expression + (dictionary_construction + (dictionary_argument + (expression + (identifier)) + (expression + (identifier))) + (dictionary_argument + (expression + (identifier)) + (expression + (identifier)))))) + +================== +Positional Two +================== + +(a, b) + +--- + +(source_file + (expression + (dictionary_construction + (dictionary_argument + (expression + (identifier))) + (dictionary_argument + (expression + (identifier)))))) + +================== +Positional Trailing Comma +================== + +(a, b,) + +--- + +(source_file + (expression + (dictionary_construction + (dictionary_argument + (expression + (identifier))) + (dictionary_argument + (expression + (identifier)))))) + +================== +Mixed Positional and Named +================== + +(a, b =c) + +--- + +(source_file + (expression + (dictionary_construction + (dictionary_argument + (expression + (identifier))) + (dictionary_argument + (expression + (identifier)) + (expression + (identifier)))))) + +================== +Mixed Three Positional Two Named +================== + +(a, b, c =d, e =f) --- (source_file (expression (dictionary_construction - (dictionary_member_assignment - (identifier) + (dictionary_argument (expression (identifier))) - (dictionary_member_assignment - (identifier) + (dictionary_argument + (expression + (identifier))) + (dictionary_argument + (expression + (identifier)) + (expression + (identifier))) + (dictionary_argument + (expression + (identifier)) + (expression + (identifier)))))) + +================== +Mixed Trailing Comma +================== + +(a, b =c,) + +--- + +(source_file + (expression + (dictionary_construction + (dictionary_argument + (expression + (identifier))) + (dictionary_argument + (expression + (identifier)) (expression (identifier)))))) diff --git a/tree-sitter-command-cad-model/test/corpus/precedence.txt b/tree-sitter-command-cad-model/test/corpus/precedence.txt index 399ce79..55fdaa0 100644 --- a/tree-sitter-command-cad-model/test/corpus/precedence.txt +++ b/tree-sitter-command-cad-model/test/corpus/precedence.txt @@ -36,7 +36,7 @@ Precedence Vectors ================== -<(a, b)> + <(a, b)> == <(a, b)> +{a, b} + {a, b} == {a, b} --- diff --git a/tree-sitter-command-cad-model/test/corpus/primitives.txt b/tree-sitter-command-cad-model/test/corpus/primitives.txt index cdc74f3..bb2ac97 100644 --- a/tree-sitter-command-cad-model/test/corpus/primitives.txt +++ b/tree-sitter-command-cad-model/test/corpus/primitives.txt @@ -220,7 +220,7 @@ Scalar with quoted unit that would not work as an identifier Vector2 ================== -<(1m, 2m)> +{1m, 2m} --- @@ -240,7 +240,7 @@ Vector2 Vector3 ================== -<(1m, 2m, 3m)> +{1m, 2m, 3m} --- @@ -264,7 +264,7 @@ Vector3 Vector4 ================== -<(1m, 2m, 3m, 4m)> +{1m, 2m, 3m, 4m} --- diff --git a/units/src/units.csv b/units/src/units.csv index df68a1a..ff0ddfd 100644 --- a/units/src/units.csv +++ b/units/src/units.csv @@ -85,7 +85,7 @@ Angle,0,0,0,0,0,0,0,true,false,false,false,false,false,degree,degrees,°,deg,0.0 Angle,0,0,0,0,0,0,0,true,false,false,false,false,false,gon,gons,gon,gon,0.015707963267949,0 Angle,0,0,0,0,0,0,0,true,false,false,false,false,false,mil,mils,mil,mil,0.0009817477,0 Angle,0,0,0,0,0,0,0,true,false,false,false,false,false,minute,minutes,′,angle_minute,0.000290888208665722,0 -Angle,0,0,0,0,0,0,0,true,false,false,false,false,false,radian,radians,rad,rad,1,0 +Angle,0,0,0,0,0,0,0,true,false,false,false,false,false,radian,radians,rad,rad,3.14159265358979323846264338327950288,0 Angle,0,0,0,0,0,0,0,true,false,false,false,false,false,revolution,revolutions,r,r,6.28318530717959,0 Angle,0,0,0,0,0,0,0,true,false,false,false,false,false,second,seconds,″,angle_second,4.84813681109536E-06,0 AngularAbsement,0,0,1,0,0,0,0,true,false,false,false,false,false,degree second,degree seconds,° · s,deg*s,0.0174532925199433,0