enso/engine
Kaz Wesley e5b85bf16e
Space-precedence does not apply to value-level operators (#10597)
In a sequence of value-level operators, whitespace does not affect relative precedence. Functional operators still follow the space-precedence rules.

The "functional" operators are: `>> << |> |>> <| <<| : .`, application, and any operator containing `<-` or `->`. All other operators are considered value-level operators.

Asymmetric whitespace can still be used to form *operator sections* of value-level operators, e.g. `+2 * 3` is still equivalent to `x -> (x+2) * 3`.

Precedence of application is unchanged, so `f x+y` is still equivalent to `f (x + y)` and `f x+y * z` is still equivalent to `(f (x + y)) * z`.

Any attempt to use spacing to override value-level operator precedence will be caught by the new enso linter. Mixed spacing (for clarity) in value-operator expressions is allowed, as long as it is consistent with the precedences of the operators.

Closes #10366.

# Important Notes
Precedence warnings:
- The parser emits a warning if the whitespace in an expression is inconsistent with its effective precedence.
- A new enso linter can be run with `./run libraries lint`. It parses all `.enso` files in `distribution/lib` and `test`, and reports any errors or warnings. It can also be run on individual files: `cargo run --release --bin check_syntax -- file1 file2...` (the result may be easier to read than the `./run` output).
- The linter is also run as part of `./run lint`, so it is checked in CI.

Additional language change:
- The exponentiation operator (`^`) now has higher precedence than the multiplication class (`*`, `/`, `%`). This change did not affect any current enso files.

Library changes:
- The libraries have been updated. The new warnings were used to identify all affected code; the changes themselves have not been programmatically verified (in many cases their equivalence relies on the commutativity of string concatenation).
2024-07-24 10:55:44 +00:00
..
common/src/main/java/org/enso/common Towards simplifying runtime-compiler dependencies (#8894) 2024-04-25 10:03:42 +02:00
interpreter-dsl-test/src/test/java/org/enso/interpreter/dsl/test ydoc-server is a separate module (#10156) 2024-06-07 12:56:42 +02:00
language-server Disable Graal-based Ydoc temporarily (#10627) 2024-07-23 12:29:26 +00:00
launcher/src Renaming launcher executable to ensoup (#10535) 2024-07-16 14:30:23 +00:00
polyglot-api/src TextEdit with custom IdMap (#10283) 2024-06-15 18:03:18 +00:00
polyglot-api-macros/src/main/scala/org/enso/polyglot/macros Replace Jackson serde (#10035) 2024-06-11 15:03:12 +00:00
runner System.exit does proper context hard exit. (#10363) 2024-07-18 18:10:36 +00:00
runner-common/src/main engine-runner shall not depend on language-server (#10536) 2024-07-12 17:17:07 +02:00
runtime Prevent re-entrant execution of finalizers (#10602) 2024-07-22 20:11:54 +00:00
runtime-benchmarks/src/main Add ExportImportResolutionBenchmark (#10043) 2024-07-15 10:38:05 +00:00
runtime-compiler/src Replace all from ... export all with explicit exports (#10369) 2024-07-11 19:34:25 +02:00
runtime-fat-jar/src/main/java ydoc-server is a separate module (#10156) 2024-06-07 12:56:42 +02:00
runtime-instrument-common/src System.exit does proper context hard exit. (#10363) 2024-07-18 18:10:36 +00:00
runtime-instrument-id-execution/src/main/java/org/enso/interpreter/instrument Instrumentation, visualization and autoscoped constructors (#9452) 2024-04-03 12:14:23 +00:00
runtime-instrument-repl-debugger/src/main/java/org/enso/interpreter/instrument Introducing engine/runtime-compiler project (#8197) 2023-11-01 12:42:34 +01:00
runtime-instrument-runtime-server/src/main/java/org/enso/interpreter/instrument Towards simplifying runtime-compiler dependencies (#8894) 2024-04-25 10:03:42 +02:00
runtime-integration-tests/src/test Space-precedence does not apply to value-level operators (#10597) 2024-07-24 10:55:44 +00:00
runtime-language-arrow/src Implement and benchmark ArrowOperationPlus node (#10150) 2024-06-11 12:50:59 +00:00
runtime-language-epb/src Atom constructors can be private (#9692) 2024-04-29 14:43:18 +02:00
runtime-parser/src Replace all from ... export all with explicit exports (#10369) 2024-07-11 19:34:25 +02:00
runtime-suggestions/src/main/scala/org/enso/compiler/suggestions Extension methods can be exported by name (#10274) 2024-06-25 12:08:22 +00:00
runtime-test-instruments/src/main/java Binary operator resolution based on that value (#8779) 2024-01-27 08:38:47 +01:00
README.md Add a markdown style guide (#1022) 2020-07-21 13:59:40 +01:00

The Enso Engine

The Enso engine is the codebase responsible for compiling and executing Enso code, as well as providing language server functionality to users of the language. It is subdivided into two major components:

  • Language Server: The Enso language service.
  • Polyglot API: The truffle-boundary safe API for communication between the language server and the runtime.
  • Runner: The command-line interface for Enso.
  • Runtime: The compiler and interpreter for Enso.