diff --git a/.gitignore b/.gitignore index 0b4b183..8246c6e 100644 --- a/.gitignore +++ b/.gitignore @@ -12,11 +12,30 @@ CTestTestfile.cmake _deps -build +# build cmake-build-debug +# --- + .old .idea + +# --- + +# Xmake cache +.xmake +**/.xmake + .cache .ccls-cache +build + +**/.cache +**/.ccls-cache +**/build + +compile_commands.json + +# MacOS Cache +.DS_Store diff --git a/.gitmodules b/.gitmodules index 2f4e0f3..cb300af 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ [submodule "tree-sitter-lang"] path = deps/tree-sitter-lang 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 diff --git a/CMakeLists.txt b/_CMakeLists.txt similarity index 100% rename from CMakeLists.txt rename to _CMakeLists.txt diff --git a/deps/tree-sitter b/deps/tree-sitter deleted file mode 160000 index e1ea332..0000000 --- a/deps/tree-sitter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e1ea3328f4e07895c8ff04dc6da8cda8ed0a0f45 diff --git a/deps/tree-sitter-lang b/deps/tree-sitter-lang index 6a25194..c0377d1 160000 --- a/deps/tree-sitter-lang +++ b/deps/tree-sitter-lang @@ -1 +1 @@ -Subproject commit 6a251945e63587b97fb718b8a090b2da018cb32a +Subproject commit c0377d1a1bdc2a7da1917fc05c47841a0d3b8fd6 diff --git a/src/type_check_utils.cpp b/src/type_check_utils.cpp index 936e380..5c355bc 100644 --- a/src/type_check_utils.cpp +++ b/src/type_check_utils.cpp @@ -55,6 +55,15 @@ Result type_same_to_expected(nodes::TypeProxy type, const Arguments &arguments, 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 std::optional find_statement( const std::string &name, const nodes::Node &node, diff --git a/xmake.lua b/xmake.lua new file mode 100644 index 0000000..decb371 --- /dev/null +++ b/xmake.lua @@ -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)")