diff options
| author | 2026-10-14 10:06:27 +0000 | |
|---|---|---|
| committer | 2026-10-14 10:06:27 +0000 | |
| commit | c2270cc944424579e4577e67ed17a66512d856b4 (patch) | |
| tree | 04fc1ede53e0cbf2c2562f724fd539836c450306 /tests/drivers/core_lsp_test.js | |
| parent | todo: tick the spec; list the bugs its appendix b found (diff) | |
| parent | split compiler.zc into files by phase (diff) | |
Merge the compiler split into phase files
also: ca_owners in the language server keeps the owner order in a fixed
array instead of a heap list the analyzer rejected.
Diffstat (limited to 'tests/drivers/core_lsp_test.js')
| -rw-r--r-- | tests/drivers/core_lsp_test.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/drivers/core_lsp_test.js b/tests/drivers/core_lsp_test.js index c3c01aa..5123537 100644 --- a/tests/drivers/core_lsp_test.js +++ b/tests/drivers/core_lsp_test.js @@ -6,6 +6,8 @@ const fs = require('fs'); const cp = require('child_process'); const path = require('path'); const target = process.argv[2]; +// the compiler is the files listed in src/compiler/parts; the server checks them as the one document they make +const compilerSource = () => fs.readFileSync('src/compiler/parts', 'utf8').split(/\r?\n/).filter(Boolean).map(n => fs.readFileSync(path.join('src/compiler', n), 'utf8')).join(''); const files = ['src/core/core.zc', 'src/runtime/rt.zc', 'src/compiler/compiler.zc', 'src/runtime/run.zc', 'src/lib/std.zc', 'src/lib/icon.zc', 'src/lsp/server.zc', 'src/tools/build.zc']; const frame = message => { const body = Buffer.from(JSON.stringify(message)); @@ -13,7 +15,7 @@ const frame = message => { }; for (const file of files) { const uri = 'file://' + path.resolve(file); - const text = fs.readFileSync(file, 'utf8'); + const text = file === 'src/compiler/compiler.zc' ? compilerSource() : fs.readFileSync(file, 'utf8'); const messages = [ { jsonrpc: '2.0', id: 1, method: 'initialize', params: {} }, { jsonrpc: '2.0', method: 'initialized', params: {} }, |
