diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d0e8672..6afd012 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -13,18 +13,19 @@ jobs: fail-fast: false matrix: os: - - ubuntu-20.04 + - ubuntu-22.04 - windows-2022 - - macos-11.0 + - macos-13 d: - - "ldc-1.28.1" - - "dmd-2.098.1" + - "ldc-1.38.0" + - "dmd-2.109.1" clang: - - 13.0.0 + # default setup-cpp version + - true cmake: - - 3.22.2 + - 3.28.3 ninja: - - 1.10.2 + - 1.11.1 exclude: # TODO ci job fails with object.Error@(0): Access Violation error - os: windows-2022 @@ -74,5 +75,7 @@ jobs: env: DUB_BUILD_TYPE: debug - - name: Lint - run: dub lint + # - name: Lint + # run: dub lint + # env: + # DUB_BUILD_TYPE: release diff --git a/dub.sdl b/dub.sdl index eec9903..ecd7394 100644 --- a/dub.sdl +++ b/dub.sdl @@ -16,15 +16,10 @@ sourceFiles "./src/d_tree_sitter/libc.d" // gen by dpp extraDependencyFiles "./src/tree-sitter-version.txt" "./package.json" "./src/meson.build" lflags "$PACKAGE_DIR/src/d_tree_sitter/build/libtree_sitter.a" -dependency "bc-string" version="1.2.2" +dependency "bc-string" version="1.4.0" // -------- Build Options and configurations -------- -// enables most of the dips -dflags "-preview=dip25" "-preview=dip1000" "-preview=dip1008" "-preview=fieldwise" "-preview=fixAliasThis" "-preview=intpromote" "-preview=rvaluerefparam" "-preview=in" -/* dflags "-preview=dip1021" */ // causes random crashes -/* dflags "-preview=inclusiveincontracts" platform="dmd" // only on dmd */ - buildType "release" { dflags "-vgc" "--flto=full" "--ffast-math" "--linkonce-templates" platform="ldc" buildOptions "releaseMode" "optimize" "inline" diff --git a/dub.selections.json b/dub.selections.json index 19a65e9..55bf261 100644 --- a/dub.selections.json +++ b/dub.selections.json @@ -1,6 +1,6 @@ { "fileVersion": 1, "versions": { - "bc-string": "1.2.2" + "bc-string": "1.4.0" } } diff --git a/src/d_tree_sitter/libc.dpp b/src/d_tree_sitter/libc.dpp index e61fa67..21ea240 100644 --- a/src/d_tree_sitter/libc.dpp +++ b/src/d_tree_sitter/libc.dpp @@ -1,3 +1,6 @@ module libc; +import core.stdc.stdint; + + #include "./gen/tree-sitter/lib/include/tree_sitter/api.h" diff --git a/src/d_tree_sitter/node.d b/src/d_tree_sitter/node.d index d0e62d0..cfed0c6 100644 --- a/src/d_tree_sitter/node.d +++ b/src/d_tree_sitter/node.d @@ -365,7 +365,7 @@ struct Node A node. If the given node doesn't have a parent, it returns the node itself. Note: the nth might not be reached if there are no more parents. */ - auto nth_parent(in uint max_nth = 2) @nogc nothrow @trusted const + auto nth_parent(uint max_nth = 2) @nogc nothrow @trusted const { auto maybeFirstParent = this.parent(); if (maybeFirstParent.isNull()) diff --git a/src/d_tree_sitter/parser.d b/src/d_tree_sitter/parser.d index 433a291..ef709c8 100644 --- a/src/d_tree_sitter/parser.d +++ b/src/d_tree_sitter/parser.d @@ -29,7 +29,7 @@ struct Parser Params: language = the language you want to create a parser for */ - this(in Language language) nothrow @nogc + this(Language language) nothrow @nogc { // Create a parser. this.tsparser = ts_parser_new(); @@ -54,7 +54,7 @@ struct Parser * NOTE it assumes that the language is compatible. Returns a boolean indicating whether or not the language was successfully * assigned. */ - auto set_language_nothrow(in Language language) nothrow + auto set_language_nothrow(Language language) nothrow { return ts_parser_set_language(tsparser, language.tslanguage); } @@ -69,7 +69,7 @@ struct Parser * and compare it to this library's `TREE_SITTER_LANGUAGE_VERSION` and * `TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION` constants. */ - auto set_language(in Language language) + auto set_language(Language language) { // TODO make set_language private? enforce_compatible_language(language);