Summary
The following builtins exist in the language spec (STANDARD.md §9.1, §3.1.11) but are missing from the LSP's BUILTINS array and/or DOCS object:
| Builtin |
Needs Completion |
Needs Hover Docs |
fields(instance) -> [string] |
Yes |
Yes |
system(command string) -> int |
Yes |
Yes |
raw(variable) -> ^T |
Yes |
Yes |
embed(path string) -> string |
No (already in BUILTINS) |
Yes (missing from DOCS) |
Details
fields() — Returns field names of a struct as [string] in declaration order. Accepts struct instances and pointers to structs.
system() — Runs a shell command and returns exit code. Returns -1 if killed by signal.
raw() — Like addr(), but returns an unsafe raw pointer with no nil-check or const-source write protection.
embed() — Already in the BUILTINS array for completion, but has no hover docs entry in the DOCS object.
Scope
- Add
fields, system, raw to the BUILTINS array in completion.ts
- Add hover doc entries for all four in the DOCS object in
hover.ts
Summary
The following builtins exist in the language spec (STANDARD.md §9.1, §3.1.11) but are missing from the LSP's BUILTINS array and/or DOCS object:
fields(instance) -> [string]system(command string) -> intraw(variable) -> ^Tembed(path string) -> stringDetails
fields()— Returns field names of a struct as[string]in declaration order. Accepts struct instances and pointers to structs.system()— Runs a shell command and returns exit code. Returns -1 if killed by signal.raw()— Likeaddr(), but returns an unsafe raw pointer with no nil-check or const-source write protection.embed()— Already in the BUILTINS array for completion, but has no hover docs entry in the DOCS object.Scope
fields,system,rawto the BUILTINS array incompletion.tshover.ts