enso/app
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
..
.vscode Inline modules in app/ide-desktop/ (#10305) 2024-07-17 09:10:42 +00:00
dashboard Only allow creating single project at a time (#10586) 2024-07-24 10:04:02 +00:00
gui2 Space-precedence does not apply to value-level operators (#10597) 2024-07-24 10:55:44 +00:00
ide-desktop Check version (#10646) 2024-07-24 08:52:14 +00:00
.example.env Inline modules in app/ide-desktop/ (#10305) 2024-07-17 09:10:42 +00:00
.gitignore Inline modules in app/ide-desktop/ (#10305) 2024-07-17 09:10:42 +00:00
eslint.config.mjs Inline modules in app/ide-desktop/ (#10305) 2024-07-17 09:10:42 +00:00
modules.d.ts Inline modules in app/ide-desktop/ (#10305) 2024-07-17 09:10:42 +00:00
README.md Inline modules in app/ide-desktop/ (#10305) 2024-07-17 09:10:42 +00:00
tsconfig.json Inline modules in app/ide-desktop/ (#10305) 2024-07-17 09:10:42 +00:00

Desktop app

This folder contains projects related to the desktop app.

Folder structure

Refer to the README.md in each individual module (if it exists) for the internal folder structure of the module.

  • assets/: Icons and images used by other modules. Currently these are only used by dashboard/.
  • client/: The code for the Electron desktop app.
  • common/: Utility functions required by multiple other modules.
  • content/: The entry point for the GUI1 web app. This is the main page for the desktop app.
  • content-config/: The statically-typed configuration object for content/.
  • dashboard/: The dashboard, used to manage projects. It launches the GUI (located in content/ for GUI1, or /app/gui2/ for GUI2) when a project is opened.
  • icons/: Generates the logo for the app.
  • ts-plugin-namespace-auto-import/: (WIP) A TypeScript plugin to change auto-import to use import * as moduleName rather than import {}.
  • types/: Miscellaneous types used by multiple modules.