🔧 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 `;`).
This commit is contained in:
csh
2026-03-06 13:03:00 +08:00
parent 32e1eb09db
commit a9958f36fe
5 changed files with 150 additions and 7 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
[requires]
glaze/6.4.0
glaze/7.0.2
spdlog/1.17.0
fmt/12.1.0
taskflow/3.10.0
+3 -3
View File
@@ -1210,7 +1210,7 @@ export namespace lsp::language::ast
std::string name;
std::vector<std::unique_ptr<Parameter>> parameters;
std::optional<TypeAnnotation> return_type;
bool is_overload;
bool is_overload = false;
};
class FunctionDefinition : public Statement
@@ -1369,7 +1369,7 @@ export namespace lsp::language::ast
void Accept(ASTVisitor& visitor) override { visitor.VisitConditionalBlock(*this); }
public:
ConditionalCompilationType type;
ConditionalCompilationType type = ConditionalCompilationType::kIfDef;
std::string name;
Location location;
std::vector<StatementPtr> consequence;
@@ -1383,7 +1383,7 @@ export namespace lsp::language::ast
void Accept(ASTVisitor& visitor) override { visitor.VisitConditionalDirective(*this); }
public:
ConditionalCompilationType type;
ConditionalCompilationType type = ConditionalCompilationType::kDefine;
std::string name;
Location location;
};
+2
View File
@@ -66,6 +66,8 @@ target_compile_options(
$<$<CONFIG:Release>:-O3>)
if(BUILD_TESTS)
add_test(NAME test_ast_unit
COMMAND $<TARGET_FILE:test_ast> --self-test)
add_test(NAME test_ast_script
COMMAND ${CMAKE_COMMAND} -E env
TEST_AST_OVERRIDE=$<TARGET_FILE:test_ast>