Summary
Three keywords from the language spec (STANDARD.md §2.5, §3.5) are missing from the LSP's keyword completion and hover docs:
| Keyword |
Purpose |
Spec Section |
alias |
Type aliases (alias Meters = float) |
§3.5 |
while |
Alias for as_long_as |
§6.3.3 |
else |
Alias for otherwise |
§6.2.1 |
Details
alias — Creates an interchangeable name for an existing type. File-scope only. Supports primitives, structs, enums, arrays, maps, and pointers. Can be prefixed with private.
while — Identical to as_long_as, both produce the same token. User's choice which to use.
else — Identical to otherwise, both produce the same token. User's choice which to use.
Scope
- Add all three to the KEYWORDS array in
completion.ts
- Add hover doc entries in the DOCS object in
hover.ts
alias should also be recognized by the symbol scanner in symbols.ts for go-to-definition
Summary
Three keywords from the language spec (STANDARD.md §2.5, §3.5) are missing from the LSP's keyword completion and hover docs:
aliasalias Meters = float)whileas_long_aselseotherwiseDetails
alias— Creates an interchangeable name for an existing type. File-scope only. Supports primitives, structs, enums, arrays, maps, and pointers. Can be prefixed withprivate.while— Identical toas_long_as, both produce the same token. User's choice which to use.else— Identical tootherwise, both produce the same token. User's choice which to use.Scope
completion.tshover.tsaliasshould also be recognized by the symbol scanner insymbols.tsfor go-to-definition