diff options
| author | 2026-10-14 07:55:08 +0000 | |
|---|---|---|
| committer | 2026-10-14 07:55:08 +0000 | |
| commit | d8da21a406f449d277c42b91d4c9bf8b20bd0dcc (patch) | |
| tree | 79a4dbf6839eaee19aa626f1aa3981d5b0c19377 /src/lsp | |
| parent | build: embed images with #embed, keep everything generated in build/ (diff) | |
embed: tests, editor support and docs; js vm file access; test fixes
embed declarations get accept and reject fixtures, a run-only image check
through zc0, an lsp keyword hover and the grammar keyword. errors point at
the declaration and still declare the name, so its uses are not reported
again. zc0 tracks byte-string globals and lays embedded arrays out one word
per element, the way its own indexing reads them.
the command-line javascript vm reaches node's file system for the file
syscalls, so include and embed work there; other embedders opt in.
the web build is self-contained in build/web with its examples. README,
BORROW and BOOTSTRAP-OWNERSHIP describe the new build and ownership rules,
and ONBOARD.md is a reading and verification order for the code.
the suite passes the map header to mklayout, the wasm fuzz program uses
the include format, and lsp drivers scale their deadlines on hosts
without the arm64 jit (ZC_TEST_TIMEOUT_SCALE). LLVM_CONFIG selects an
llvm with headers for the llvm section.
Diffstat (limited to 'src/lsp')
| -rw-r--r-- | src/lsp/server.zc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lsp/server.zc b/src/lsp/server.zc index 48fdf90..b578bd1 100644 --- a/src/lsp/server.zc +++ b/src/lsp/server.zc @@ -1676,6 +1676,7 @@ char* kwtext() { if (hname_is("struct")) return "struct name { fields };~a record type. struct name<T> { } makes it generic, one copy for each set of type arguments."; if (hname_is("type")) return "type name = T;~an alias for a type, such as type row = int[3]; for a pointer to an array."; if (hname_is("include")) return "include \"path\"; / include std;~compiles a file or the embedded standard library at that point, its signatures first."; + if (hname_is("embed")) return "embed \"path\" as [type] name;~declares name with the bytes of the file at path, read when the unit is compiled. with no type, or bstr, name is a byte string; char* holds one character per word; a number type reads the bytes little-endian; T[] and T[n] lay them out as array elements."; if (hname_is("memdebug")) return "memdebug on; / memdebug off; / memdebug scrub;~header checks, allocation sites and leak reports for the rest of the file. scrub also fills a freed payload with 0xDEAD."; if (hname_is("typecheck")) return "typecheck on; / typecheck off;~turns on type checks for the code that follows, enums included."; if (hname_is("hints")) return "hints on; / hints small; / hints off;~controls subsequent hint diagnostics: informational ranges by default, compact markers with small, or no hints with off."; |
