Skip to content

feat: add missing keywords — alias, while, else #4

Description

@SchoolyB

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions