Commit Graph

71 Commits

Author SHA1 Message Date
csh 7aa60e78f8 🐛 fix(tree_sitter): parse anonymous procedures and property accessors
accept anonymous procedure expressions, keyword-prefixed identifiers,

and read/write accessor nodes in the grammar and generated parsers.

sync ast tests, parser scripts, sample fixtures, and playbook

config with the updated parser behavior.
2026-05-24 11:07:30 +08:00
csh a9958f36fe 🔧 chore(repo): refresh local rules and ast defaults
add repository-local agent rules and refresh the architecture notes
for the current lsp layering.

register the AST self-test in CTest, initialize a few AST defaults,
and bump glaze to the newer conan package version.

verify: `cmake --build lsp-server/build/clang-linux/Release --target test_ast`
verify: `ctest --test-dir lsp-server/build/clang-linux/Release -R test_ast_unit --output-on-failure` passes
known issue: `ctest --test-dir lsp-server/build/clang-linux/Release -R test_ast_script --output-on-failure` still fails on `/home/csh/windows_share/tsf/funcext/Common/Tree/TTree.tsf` due to invalid TSF syntax (`FConfig &= v` missing trailing `;`).
2026-03-06 13:03:00 +08:00
csh 32e1eb09db 🐛 fix(ast): support single-variable for-in fallback
normalize single-variable for-in nodes in the deserializer and
rewrite legacy input in test_ast when the bundled parser cannot
generate updated parse tables.

skip known-invalid tsf fixtures in test.sh so batch runs can
continue past syntax errors that the grammar should not accept.
2026-03-06 11:45:53 +08:00
csh 20b7d439b1 🔧 lsp-server: update CMakeLists
lsp-server ci / build-and-test (push) Failing after 21s Details
2026-02-02 17:41:31 +08:00
csh e4e7d4d5ae 🔧 lsp-server: update cppm sources 2026-02-02 17:32:57 +08:00
csh b2a1bb6685 feat(lsp_server): add call snippets to completion resolve 2025-12-24 15:13:10 +08:00
csh baaf2ee688 🎨 style(bridge): drop unused std imports 2025-12-24 14:02:04 +08:00
csh 1a784c6452 🔧 chore(lsp_server): keep full provider/capability list commented 2025-12-24 13:52:22 +08:00
csh d13b24a5da 🐛 fix(lsp_server): disable diagnostics publishing by default 2025-12-24 13:45:35 +08:00
csh adec86a3aa 🐛 fix(symbol): index all system tsf files
Do not drop system-library .tsf units when the file stem differs from top-level symbols.

Add test_provider support for --interpreter=... and an interpreter integration test that validates full indexing plus completion+resolve snippet.
2025-12-24 12:02:30 +08:00
csh 02864dda89 🔧 chore(lsp_server): gate providers to completion/definition
Initialize now advertises only completion (resolve) and definition.

Verified: test_provider (clang-linux-server/Release)
2025-12-24 11:33:40 +08:00
csh 09e65224fe feat(lsp_server): implement missing providers and json coverage
Implement workspace configuration/folders and apply WorkspaceEdit.changes.

Strengthen provider JSON coverage (all methods require params, no errors).

Verified: Release test_provider
2025-12-24 10:42:13 +08:00
csh d2d3d9eb48 🎨 style(provider): restore trailing newlines 2025-12-21 22:23:42 +08:00
csh 2c1c1d8a88 feat(provider): add compile-time registry 2025-12-21 22:21:46 +08:00
csh f54050bad2 ♻️ refactor(semantic): split semantic partitions
move semantic declarations into focused partitions and add new type_system.types/graph.types modules.

reorder lsp server members so async executor shuts down before manager hub to avoid exit crash.
2025-12-21 21:33:15 +08:00
csh 6dcbe0a1cd 🐛 fix: filter createobject completion prefix 2025-12-21 16:12:39 +08:00
csh f56cf960f1 🐛 fix: align trace value type 2025-12-21 16:12:28 +08:00
csh 53f4588c53 🐛 fix: align rename provider method names 2025-12-21 15:39:16 +08:00
csh 1de97aace5 🐛 fix: support LSP request id variants 2025-12-21 15:38:46 +08:00
csh 8e564fc8bb 🧹 remove empty extern C block 2025-12-20 11:33:09 +08:00
csh b27dafb657 sync tree-sitter grammar and AST 2025-12-20 11:25:33 +08:00
csh e75027b80a 🔧 chore(symbol): trace per-library file indexing
- Log each indexed .tsf file at trace level during LoadSystemLibrary.
- Include top-level symbol summary when a file is skipped for stem mismatch.
2025-12-14 14:06:24 +08:00
csh 9a12b1b194 🐛 fix(logging): support --log-stderr and clarify stdin wait
- Make logs go to stderr by default (keep LSP stdout clean).
- Add --log-stderr/--log-stdout flags and wire config.use_stderr into spdlog.
- Log an explicit message when waiting for LSP input on stdin.
2025-12-14 13:43:56 +08:00
csh 241de77152 🐛 fix(symbol): treat .tsl as script, not library
- LoadSystemLibrary now only scans .tsf files.
- LoadWorkspace still indexes .tsl scripts but skips the file-stem/top-level check for them.
2025-12-14 13:28:14 +08:00
csh 566830bdb8 🐛 fix(symbol): emit module symbols for unit
Fix Builder::CreateSymbol to handle SymbolKind::Module (Unit) so system/workspace loading can match file stems.
2025-12-14 13:13:54 +08:00
csh 2c9c0b2d8f 🐛 fix(server): load interpreter funcext symbols
- Wire `--interpreter=...` into server startup.
- Auto-load `<interpreter>/funcext` as a system library via Symbol::LoadSystemLibrary.
2025-12-14 13:08:50 +08:00
csh ab1dcc00bc 🐛 fix(uses): make file-level uses globally visible
- Preserve top-level `uses` imports and apply them to subsequent unit/class/function/method scopes.
- Extend semantic ResolveFromUses to consult file-level imports (and fall back from unit imports).
2025-12-14 11:10:50 +08:00
csh 171d5e2064 feat(lsp_completion): support unit-qualified constructors
- Support `new UnitA.ClassName` and `new unit(UnitA).ClassName` completion.
- Support `createobject("UnitA.ClassName"` and `createobject("unit(UnitA).ClassName"` completion.
- Apply `uses` ordering when resolving ambiguous ClassName (last wins).
- Improve `obj.` member completion using qualified type strings.
2025-12-14 10:33:12 +08:00
csh 3106ab9ce4 feat(lsp_completion): complete object creation and members
- Add class-name completion for `new` and `createobject("..."`.
- Generate constructor parameter snippets in completionItem/resolve.
- Support `obj.` instance member completion (methods/properties/fields).
- Infer `new`/`createobject` result types in SemanticModel TypeSystem.
2025-12-14 09:54:18 +08:00
csh 476e83beb8 feat(lsp_server): support rdo_expression and normalize call field
- rename tree-sitter fields for inherited/rdo to 'call'
- regenerate parser sources and sync into lsp-server
- add RdoExpression to AST + symbol/semantic visitors
2025-12-14 06:05:47 +08:00
csh e5782c76fa ♻️ refactor(lsp_server): move entrypoints out of named modules
- export Run() from launcher module and add non-module main TU
- apply same pattern to module-based test executables
- migrate utils/string implementation fully into string.cppm and drop string.cpp
- point clangd to linux build compilation database
2025-12-13 19:55:45 +08:00
csh f7d5a74615 ♻️ 使用`module`重构所有代码 2025-12-07 23:07:03 +08:00
csh 549f1d1b0a ♻️ 重构 2025-12-05 21:03:18 +08:00
csh 4c2e242920 新增语义模块
♻️ 重构符号表,职责更清晰单一

🐛 同步修复`test_symbol`
2025-11-18 23:11:40 +08:00
csh 3274af67d5 ♻️ 重构符号表的代码 2025-11-17 17:45:39 +08:00
csh 99f735f2df 🗑️ 删除`CMakeLists.txt`对`vcpkg`的支持
 新增`conan`包管理,并配置多平台`profile`

🔧 变更`CMakeLists`的设置
2025-11-17 17:41:43 +08:00
csh 41ef82b1aa 🐛 修复路径转换问题 2025-11-17 08:59:15 +08:00
csh cee6e614bf ♻️ 重构符号表相关内容
🚀 优化`ast`相关代码
2025-11-16 21:20:47 +08:00
csh 8f25f212a7 📦 更新`lsp`对`tree-sitter`的依赖
🚀 优化部分无关代码

🐛 修复`ast`的测试代码
2025-11-15 21:19:45 +08:00
csh 9714d8c9ac `grammar.js`支持`var`,`out`,`const`,`in`等语法参数
🚀 优化`grammar.js`的语法设计,合理重命名一些field

♻️ 重构ast的`struct`设计
2025-11-13 22:41:40 +08:00
csh 7dfbb713ac ♻️ 继续重构 2025-11-11 23:12:03 +08:00
csh 0ef01a2d1c ♻️ 重大重构 2025-11-11 18:58:21 +08:00
csh a81d9de71d ♻️ 重构优化LSPAny相关代码 2025-11-02 15:47:40 +08:00
csh e7a5274270 大量更新,不想写更新日志 2025-11-01 22:57:53 +08:00
csh 100e210ed1 add symbol table and test file 2025-10-26 22:52:31 +08:00
csh 7d9b966bc7 improve ast 2025-10-26 22:51:52 +08:00
csh dbccd5b605 improve tree-sitter 2025-10-26 22:51:27 +08:00
csh e0e8c7b26d fix ast 2025-10-25 23:52:33 +08:00
csh 6be3662226 update protocol 2025-10-25 14:05:35 +08:00
csh 0fedf40a25 update tree-sitter 2025-10-25 14:05:13 +08:00