Skip to content

Commit 4c638cc

Browse files
committed
refactor cli commands, support doxygen format docstrings, add preliminary logging system
1 parent be61ddb commit 4c638cc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2098
-2528
lines changed

.clangd

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# The empty compile_flags.txt in the root directory causes clangd to treat
2+
# relative paths in compile flags as relative to the root of the project when
3+
# compile_commands.json is not present.
4+
15
If:
26
PathMatch: .*\.in
37

@@ -17,4 +21,19 @@ CompileFlags:
1721
Add:
1822
- -Wall
1923
- -Wextra
20-
- -Wpedantic
24+
- -Wpedantic
25+
- -xc++ # Force .h files to be treated as C++
26+
- -std=gnu++17
27+
# - -std=c++20
28+
- --target=x86_64-pc-windows-msvc
29+
- -DUNICODE
30+
- -D_UNICODE
31+
- -D_DEBUG
32+
- -D_DLL
33+
- -D_MT
34+
- -Xclang
35+
- --dependent-lib=msvcrtd
36+
- -g
37+
- -Xclang
38+
- -gcodeview
39+
- -fno-char8_t

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@
1212
/.dep-cache/
1313
/tmp/
1414
/doc/
15+
/.cesium-doc/

.vscode/ltex.dictionary.en-US.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ Backlinks
55
bigz
66
buildtools
77
cesium-buildtools
8+
CesiumDocCLI
89
cesiumlang
10+
clangd
911
CPACK
1012
darkgray
1113
Darkmode
@@ -20,18 +22,23 @@ Fallthrough
2022
FETCHCONTENT
2123
filesystem
2224
frontmatter
25+
gcodeview
2326
Grotesk
2427
inlining
2528
Interop
2629
intrinsics
30+
IWYU
31+
JsonDoc
2732
katex
2833
lexer
2934
libtree
3035
lightgray
36+
LOGTQDM
3137
mac
3238
macdeployqt
3339
Monomorphization
3440
MSVC
41+
msvcrtd
3542
Namespacing
3643
nlohmann
3744
PYRANDYOS
@@ -40,8 +47,10 @@ qt
4047
RRGGBB
4148
Schibsted
4249
scrutinising
50+
sdeq
4351
shadowable
4452
shiki
53+
sstm
4554
subprocessing
4655
szenius
4756
unistd
@@ -56,6 +65,3 @@ windeployqt
5665
WINSYS
5766
yyjson
5867
Zig
59-
60-
CesiumDocCLI
61-
JsonDoc

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ include(qt)
2828
include(yyjson)
2929
include(tree-sitter-core)
3030
include(tree-sitter-cpp)
31+
# include(utf8)
3132

3233
# Add cesium subdirectory
3334
add_subdirectory(cesium)

CMakePresets.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
3030
"CMAKE_C_COMPILER": "$env{llvmBin}/clang.exe",
3131
"CMAKE_CXX_COMPILER": "$env{llvmBin}/clang++.exe",
32-
"CMAKE_RC_COMPILER": "$env{WinSdkDir}/rc.exe"
32+
"CMAKE_RC_COMPILER": "$env{WinSdkDir}/rc.exe",
33+
"CMAKE_C_COMPILER_TARGET": "x86_64-pc-windows-msvc",
34+
"CMAKE_CXX_COMPILER_TARGET": "x86_64-pc-windows-msvc"
3335
}
3436
},
3537
{

cesium-doc-config.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

cesium-doc-config.jsonc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"languages": {
3+
"cpp": {
4+
"library": "tree-sitter-cpp.so",
5+
"function": "tree_sitter_cpp",
6+
"extensions": [".cpp", ".hpp", ".cc", ".h", ".cxx", ".h.in"],
7+
"docstring_style": "/** */"
8+
}
9+
},
10+
"source_directories": ["cesium/src/", "cesium/include/"],
11+
"extract_directory": ".cesium-doc/",
12+
"output_directory": "doc/api/",
13+
"exclude_patterns": ["**/test/**", "**/*_test.*"],
14+
"logging": {
15+
"level": "debug",
16+
"console_level": "debug",
17+
"file_level": "debug",
18+
"log_file": ".cesium-doc/cesium-doc.log",
19+
"max_file_size_mb": 10,
20+
"backup_count": 5,
21+
"enable_colors": true,
22+
"enable_timestamps": true
23+
}
24+
}

cesium.code-workspace

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"buildtools/opt/**": true,
2020
"build/**": true,
2121
"doc/**": true,
22+
".cesium-doc/**": true,
2223
"tmp/**": true,
2324
"**/.zig-cache/**": true,
2425
"**/node_modules/**": true,
@@ -87,6 +88,8 @@
8788
"streetsidesoftware.code-spell-checker-scientific-terms",
8889
"streetsidesoftware.code-spell-checker-win32",
8990
"ltex-plus.vscode-ltex-plus",
91+
92+
"vadimcn.vscode-lldb",
9093
]
9194
},
9295
"launch": {

cesium/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ target_link_libraries(cesium
4242
yyjson
4343
tree-sitter-core
4444
tree-sitter-cpp
45+
# utf8
4546
)
4647

4748
# # Copy DLL dependencies to bin directory on Windows

cesium/include/CMakeLists.txt

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,19 @@ target_sources(cesium PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/version.h)
66

77
target_sources(cesium PRIVATE
88
json.h
9-
treesitter.h
109
dynlib.h
11-
javadoc.h
12-
ts_ast_parser.h
13-
markdowngen.h
14-
docgen.h
15-
doc_cli.h
10+
cli_utils.h
11+
debug_utils.h
12+
win32.h
13+
14+
# Documentation core headers
15+
doc/treesitter.h
16+
doc/markdowngen.h
17+
doc/docgen.h
18+
doc/doc_cli.h
19+
20+
# C++ language-specific headers
21+
doc/cpp/docstrings.h
22+
doc/cpp/ts_ast_parser.h
23+
doc/cpp/ast_extractor.h
1624
)

0 commit comments

Comments
 (0)