enso/lib/rust
Kaz Wesley 4d4a2990a0
Distinguish assignment/thunk by statement context (#11324)
Align `Assignment`/`Function` distinction in AST with compiler's implemented semantics:
- The ambiguous case `funcOrVar = expression` is now parsed as a `Function` when in a `Type` definition or in the top level of a module. I.e. it is an `Assignment` in contexts where the RHS is evaluated immediately when the binding is evaluated, and a `Function` in contexts where the RHS is evaluated each time the bound name is evaluated.
- `Assignment` statements now may only occur in function bodies.

Correcting this distinction lays the groundwork for #11302.

Other changes:
- Fixed incorrect source code locations for negative literals and negated expressions.

# Important Notes
New APIs:
- The parser now exposes a `parse_block` entry point, which allows parsing input lines as if in the body of a function. The previous entry point has been renamed to `parse_module`.
2024-10-18 17:54:55 +00:00
..
launcher-shims Bump Rust Toolchain (#9517) 2024-03-24 23:45:55 +00:00
macro-utils Rust bump, reduce dependencices (#10803) 2024-08-13 23:16:55 +00:00
metamodel Remove all usages of unstable rust features (#10813) 2024-08-22 14:09:17 +00:00
parser Distinguish assignment/thunk by statement context (#11324) 2024-10-18 17:54:55 +00:00
prelude Rust bump, reduce dependencices (#10803) 2024-08-13 23:16:55 +00:00
reflect Remove all usages of unstable rust features (#10813) 2024-08-22 14:09:17 +00:00
zst remove unused rust modules (#9540) 2024-03-27 12:19:38 +00:00