winglang/wing

Compiler reserved words

Open

#1.964 geöffnet am 2. Apr. 2023

Auf GitHub ansehen
 (4 Kommentare) (1 Reaktion) (0 zugewiesene Personen)TypeScript (214 Forks)github user discovery
good first issue✨ enhancement🛠️ compiler

Repository-Metriken

Stars
 (5.385 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Community Note

Please vote by adding a 👍 reaction to the issue to help us prioritize. If you are interested to work on this issue, please leave a comment.

Feature Spec

The Wing compiler now detects reserved words, such as this, static, private, etc. It is not possible to use these words as variable names, etc.

  • Throw error when a reserved word is used out of place.
  • The full list of reserved words should also appear on the winglang spec.

Use Cases

Right now, this compiles:

let this = 1;

Instead I'd expect an error message:

let this = 1;
//   ^^^Cannot use reserved word

Implementation Notes

No response

Component

Compiler

Contributor Guide