This commit is contained in:
programsnail 2024-07-20 10:42:03 +03:00
parent e27cc09b4d
commit beca0da53a
7 changed files with 55 additions and 6 deletions

21
.gitignore vendored
View file

@ -12,11 +12,30 @@ CTestTestfile.cmake
_deps _deps
build # build
cmake-build-debug cmake-build-debug
# ---
.old .old
.idea .idea
# ---
# Xmake cache
.xmake
**/.xmake
.cache .cache
.ccls-cache .ccls-cache
build
**/.cache
**/.ccls-cache
**/build
compile_commands.json
# MacOS Cache
.DS_Store

3
.gitmodules vendored
View file

@ -1,6 +1,3 @@
[submodule "tree-sitter-lang"] [submodule "tree-sitter-lang"]
path = deps/tree-sitter-lang path = deps/tree-sitter-lang
url = https://codeberg.org/ProgramSnail/tree-sitter-lang.git url = https://codeberg.org/ProgramSnail/tree-sitter-lang.git
[submodule "tree-sitter"]
path = deps/tree-sitter
url = https://github.com/tree-sitter/tree-sitter.git

1
deps/tree-sitter vendored

@ -1 +0,0 @@
Subproject commit e1ea3328f4e07895c8ff04dc6da8cda8ed0a0f45

@ -1 +1 @@
Subproject commit 6a251945e63587b97fb718b8a090b2da018cb32a Subproject commit c0377d1a1bdc2a7da1917fc05c47841a0d3b8fd6

View file

@ -55,6 +55,15 @@ Result type_same_to_expected(nodes::TypeProxy type, const Arguments &arguments,
return Result{expected.front()}; // any can be choosen return Result{expected.front()}; // any can be choosen
} }
Result type_check_from_arguments(nodes::TypeProxy type,
const Arguments &arguments,
const nodes::Node &node,
SourcesManager &sources_manager,
bool handle_errors) {
/* TODO */
throw std::exception();
}
template <typename T> template <typename T>
std::optional<const T *> find_statement( std::optional<const T *> find_statement(
const std::string &name, const nodes::Node &node, const std::string &name, const nodes::Node &node,

25
xmake.lua Normal file
View file

@ -0,0 +1,25 @@
includes("deps/**/xmake.lua")
add_requires("tree-sitter")
-- add_requires("toml++")
-- add_requires("nlohmann_json")
-- add_requires("cli11")
-- add_requires("catch2")
add_rules("mode.debug", "mode.release")
-- add_rules("c++.unity_build")
set_languages("c++20")
-- set_project("lang")
-- set_version("0.0.1")
target("lang")
set_kind("binary")
add_includedirs("include")
add_includedirs(os.dirs(path.join(os.scriptdir(), "include/**")))
add_files("src/**.cpp")
add_packages("tree-sitter")
add_deps("tree-sitter-lang")
-- set_warnings("allextra", "error")
set_rundir("$(projectdir)")