tree-sitter 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +22 -0
- data/README.md +36 -0
- data/Rakefile +49 -0
- data/ext/tree-sitter/extconf.rb +34 -0
- data/ext/tree-sitter/tree-sitter.c +114 -0
- data/ext/tree-sitter/tree-sitter.h +15 -0
- data/ext/tree-sitter/tree-sitter/Makefile +360 -0
- data/ext/tree-sitter/tree-sitter/README.md +224 -0
- data/ext/tree-sitter/tree-sitter/compiler.target.mk +238 -0
- data/ext/tree-sitter/tree-sitter/doc/grammar-schema.json +249 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/CMakeLists.txt +57 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/LICENSE.md +21 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/README.md +64 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/appveyor.yml +12 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/adapters/adapter.h +12 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/adapters/adapters.h +16 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/adapters/snowhouse.h +22 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_exception.h +51 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeCloseTo.h +55 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeEmpty.h +32 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeFalsy.h +39 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeGTE.h +45 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeGreaterThan.h +39 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeLTE.h +45 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeLessThan.h +39 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeNull.h +29 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeTruthy.h +35 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/Contain.h +58 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/Equal.h +90 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/MatchProxy.h +43 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/Matcher.h +74 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/MatcherException.h +16 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/ThrowException.h +60 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/ValueProxy.h +26 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/matchers.h +19 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/must.h +36 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/CMakeLists.txt +49 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/LICENSE_1_0.txt +23 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/README.md +419 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/cross_compile.sh +50 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/basic_assertions.cpp +228 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/boolean_operators.cpp +48 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/container_spec.cpp +85 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/custom_matchers_test.cpp +69 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/exceptions_tests.cpp +97 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/expression_error_handling.cpp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/main.cpp +43 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/map_tests.cpp +38 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/operator_tests.cpp +137 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/sequence_container_tests.cpp +192 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/string_line_tests.cpp +179 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/string_tests.cpp +65 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/stringize_tests.cpp +111 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/tests.h +16 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/assert.h +126 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/assertionexception.h +58 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/assertmacro.h +22 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/constraints.h +23 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/containsconstraint.h +80 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/endswithconstraint.h +53 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/equalsconstraint.h +83 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/equalscontainerconstraint.h +80 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/equalswithdeltaconstraint.h +51 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/expressions/andexpression.h +46 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/expressions/expression.h +38 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/expressions/expression_fwd.h +15 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/expressions/notexpression.h +44 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/expressions/orexpression.h +46 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/fulfillsconstraint.h +51 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/haslengthconstraint.h +60 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/isgreaterthanconstraint.h +55 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/isgreaterthanorequaltoconstraint.h +55 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/islessthanconstraint.h +54 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/islessthanorequaltoconstraint.h +55 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/startswithconstraint.h +52 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/exceptions.h +120 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/constraintadapter.h +39 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/constraintlist.h +91 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/expressionbuilder.h +357 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/fluent.h +38 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/andoperator.h +54 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/collections/alloperator.h +35 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/collections/atleastoperator.h +41 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/collections/atmostoperator.h +39 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/collections/collectionconstraintevaluator.h +113 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/collections/collectionoperator.h +24 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/collections/exactlyoperator.h +39 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/collections/noneoperator.h +33 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/constraintoperator.h +70 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/invalidexpressionexception.h +28 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/notoperator.h +53 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/oroperator.h +55 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/snowhouse.h +33 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/stringize.h +104 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/stringizers.h +60 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/bandit.h +44 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/context.h +97 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/external/optionparser.h +2825 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/failure_formatters/default_failure_formatter.h +30 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/failure_formatters/failure_formatter.h +13 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/failure_formatters/failure_formatters.h +16 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/failure_formatters/visual_studio_failure_formatter.h +36 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/grammar.h +185 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/listener.h +27 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/options.h +117 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/registration/registrar.h +25 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/registration/registration.h +7 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/registration/spec_registry.h +17 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/colorizer.h +141 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/dots_reporter.h +76 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/info_reporter.h +319 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/progress_reporter.h +116 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/reporters.h +53 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/single_line_reporter.h +86 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/spec_reporter.h +126 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/test_run_summary.h +90 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/xunit_reporter.h +109 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/run_policies/always_run_policy.h +16 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/run_policies/bandit_run_policy.h +168 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/run_policies/never_run_policy.h +14 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/run_policies/run_policies.h +9 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/run_policies/run_policy.h +66 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/runner.h +103 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/test_run_error.h +12 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/CMake/cotire.cmake +3695 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/CMakeLists.txt +11 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/HISTORY.md +281 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/MANUAL.md +780 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/OpenCV-2.3.1.patch +299 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/README.md +24 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/bullet-2.80-rev2531.patch +389 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/clang-3.0.src.patch +35 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/clang-3.1.src.patch +35 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/clang-3.3.src.patch +46 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/clang-3.4.src.patch +48 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/clang-3.5.src.patch +39 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/clapack-3.2.1-CMAKE.patch +93 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/cmake-2.8.7.patch +218 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/cminpack-1.1.4.patch +18 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/fsedit-qt5.patch +74 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/fseditor-1.0.patch +68 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/hdf5-1.8.8.patch +118 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/libpng-1.5.9.patch +38 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/llvm-3.0.src.patch +69 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/llvm-3.1.src.patch +69 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/llvm-3.3.src.patch +128 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/llvm-3.4.src.patch +100 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/llvm-3.5.src.patch +99 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/yaml-cpp.patch +37 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/zlib-1.2.6.patch +23 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/README.md +137 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/license +22 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/src/CMakeLists.txt +33 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/src/example.cpp +24 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/src/example.h +10 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/src/log.cpp +17 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/src/log.h +10 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/src/main.cpp +12 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cross_compile.sh +43 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/before_each_after_each.spec.cpp +78 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/context.spec.cpp +44 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/describe.spec.cpp +117 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/failure_formatters/default_formatter.spec.cpp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/failure_formatters/visual_studio_failure_formatter.spec.cpp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/fakes/fake_context.h +69 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/fakes/fake_reporter.h +78 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/fakes/fakes.h +8 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/fakes/logging_fake.h +32 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/fuzzbox.spec.cpp +77 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/it.spec.cpp +355 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/main.cpp +6 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_close_to.cpp +112 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_empty.cpp +89 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_falsy.cpp +85 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_greater_than.cpp +105 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_gte.cpp +120 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_less_than.cpp +105 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_lte.cpp +119 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_null.cpp +43 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_truthy.cpp +85 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/contain.cpp +156 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/equal.cpp +218 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/throw_exception.cpp +105 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/options.spec.cpp +134 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/reporters/colorizer.spec.cpp +45 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/reporters/dots_reporter.spec.cpp +206 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/reporters/info_reporter.spec.cpp +377 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/reporters/single_line_reporter.spec.cpp +201 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/reporters/xunit_reporter.spec.cpp +161 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/run.spec.cpp +77 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/run_policies/bandit_run_policy.spec.cpp +247 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/specs.h +10 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/synopsis.spec.cpp +54 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/util/argv_helper.h +62 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/util/util.h +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/AUTHORS +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/DEPS +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/LICENSE +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/OWNERS +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/PRESUBMIT.py +120 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/buildbot/buildbot_run.py +190 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/codereview.settings +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/data/win/large-pdb-shim.cc +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/gyp +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/gyp.bat +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/gyp_main.py +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/gyptest.py +274 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSNew.py +340 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSProject.py +208 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSSettings.py +1076 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSSettings_test.py +1483 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSToolFile.py +58 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSUserFile.py +147 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSUtil.py +267 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSVersion.py +409 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/__init__.py +537 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/__init__.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/common.py +521 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/common.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/common_test.py +72 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/easy_xml.py +157 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/easy_xml_test.py +103 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/flock_tool.py +49 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/__init__.py +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/__init__.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/android.py +1072 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/cmake.py +1143 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/dump_dependency_json.py +81 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/eclipse.py +335 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/gypd.py +87 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/gypsh.py +56 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/make.py +2181 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/make.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/msvs.py +3342 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/msvs_test.py +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/ninja.py +2160 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/ninja_test.py +44 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/xcode.py +1224 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/xcode.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/xcode_test.py +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/input.py +2809 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/input.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/input_test.py +90 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/mac_tool.py +510 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/msvs_emulation.py +972 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/ninja_syntax.py +160 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/ordered_dict.py +289 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/win_tool.py +292 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/xcode_emulation.py +1499 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/xcode_emulation.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/xcodeproj_file.py +2889 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/xcodeproj_file.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/xml_fix.py +69 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylintrc +307 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/samples/samples +81 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/samples/samples.bat +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/setup.py +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-bare/gyptest-bare.py +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-bare/src/bare.gyp +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-bare/src/bare.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-multiple/gyptest-all.py +72 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-multiple/src/actions.gyp +226 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-multiple/src/copy.py +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-multiple/src/filter.py +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-multiple/src/foo.c +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-multiple/src/input.txt +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-multiple/src/main.c +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-none/gyptest-none.py +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-none/src/fake_cross.py +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-none/src/foo.cc +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-none/src/none_with_source_files.gyp +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-subdir/gyptest-action.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-subdir/src/make-file.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-subdir/src/none.gyp +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-subdir/src/subdir/make-subdir-file.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-subdir/src/subdir/subdir.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/generated-header/action.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/generated-header/main.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/generated-header/test.gyp +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/gyptest-all.py +102 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/gyptest-default.py +69 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/gyptest-errors.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/gyptest-generated-header.py +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/action_missing_name.gyp +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/actions.gyp +114 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/confirm-dep-files.py +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir1/counter.py +44 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir1/executable.gyp +74 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir1/make-prog1.py +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir1/make-prog2.py +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir1/program.c +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir2/make-file.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir2/none.gyp +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir3/generate_main.py +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir3/null_input.gyp +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/additional-targets/gyptest-additional.py +56 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/additional-targets/src/all.gyp +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/additional-targets/src/dir1/actions.gyp +56 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/additional-targets/src/dir1/emit.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/additional-targets/src/dir1/lib1.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/gyptest-assembly.py +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/gyptest-override.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/as.bat +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/assembly.gyp +62 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/lib1.S +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/lib1.c +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/override.gyp +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/override_asm.asm +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/program.c +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/build-option/gyptest-build.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/build-option/hello.c +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/build-option/hello.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/gyptest-all.py +85 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/gyptest-default.py +85 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/builddir.gypi +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/func1.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/func2.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/func3.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/func4.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/func5.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/prog1.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/prog1.gyp +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/prog2.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/prog2.gyp +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/subdir3/prog3.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/subdir3/prog3.gyp +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.gyp +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.gyp +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/cflags/cflags.c +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/cflags/cflags.gyp +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/cflags/gyptest-cflags.py +104 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compilable/gyptest-headers.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compilable/src/headers.gyp +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compilable/src/lib1.cpp +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compilable/src/lib1.hpp +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compilable/src/program.cpp +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/compiler-global-settings.gyp.in +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/compiler-host.gyp +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/compiler.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/cxxtest.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/gyptest-compiler-env.py +112 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/gyptest-compiler-global-settings.py +73 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/my_cc.py +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/my_cxx.py +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/my_ld.py +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/test.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/basics/configurations.c +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/basics/configurations.gyp +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/basics/gyptest-configurations.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/inheritance/configurations.c +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/inheritance/configurations.gyp +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/inheritance/gyptest-inheritance.py +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/actions.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/all_dependent_settings.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/configurations.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/dependencies.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/direct_dependent_settings.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/gyptest-configurations.py +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/libraries.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/link_settings.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/sources.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/standalone_static_library.gyp +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/target_name.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/type.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/target_platform/configurations.gyp +58 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/target_platform/front.c +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/target_platform/gyptest-target_platform.py +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/target_platform/left.c +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/target_platform/right.c +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/x64/configurations.c +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/x64/configurations.gyp +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/x64/gyptest-x86.py +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-all.py +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-attribs.py +41 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-default.py +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-samedir.py +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-slash.py +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-updir.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/copies-attribs.gyp +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/copies-samedir.gyp +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/copies-slash.gyp +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/copies-updir.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/copies.gyp +70 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/directory/file3 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/directory/file4 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/directory/subdir/file5 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/executable-file.sh +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/file1 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/file2 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/parentdir/subdir/file6 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/custom-generator/gyptest-custom-generator.py +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/custom-generator/mygenerator.py +14 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/custom-generator/test.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/cxxflags/cxxflags.cc +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/cxxflags/cxxflags.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/cxxflags/gyptest-cxxflags.py +65 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines-escaping/defines-escaping.c +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines-escaping/defines-escaping.gyp +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines-escaping/gyptest-defines-escaping.py +184 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/defines-env.gyp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/defines.c +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/defines.gyp +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/gyptest-define-override.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/gyptest-defines-env-regyp.py +51 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/gyptest-defines-env.py +85 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/gyptest-defines.py +39 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/a.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/b/b.c +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/b/b.gyp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/b/b3.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/c/c.c +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/c/c.gyp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/c/d.c +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/double_dependency.gyp +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/double_dependent.gyp +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/extra_targets.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/gyptest-double-dependency.py +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/gyptest-extra-targets.py +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/gyptest-lib-only.py +39 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/gyptest-none-traversal.py +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/gyptest-sharedlib-linksettings.py +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/lib_only.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/main.c +14 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/none_traversal.gyp +46 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/sharedlib-linksettings/program.c +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/sharedlib-linksettings/sharedlib.c +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/sharedlib-linksettings/staticlib.c +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/sharedlib-linksettings/test.gyp +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependency-copy/gyptest-copy.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependency-copy/src/copies.gyp +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependency-copy/src/file1.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependency-copy/src/file2.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/duplicate_basenames.gyp +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/duplicate_node.gyp +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/duplicate_rule.gyp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/duplicate_targets.gyp +14 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/gyptest-errors.py +47 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/missing_dep.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/missing_targets.gyp +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/escaping/colon/test.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/escaping/gyptest-colon.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/exclusion/exclusion.gyp +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/exclusion/gyptest-exclusion.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/exclusion/hello.c +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/gyptest-cross.py +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/bogus1.cc +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/bogus2.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/cross.gyp +83 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/cross_compile.gypi +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/fake_cross.py +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/program.cc +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/test1.cc +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/test2.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/test3.cc +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/test4.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/tochar.py +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/actions.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir1/actions-out/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir1/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir1/executable.gyp +44 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir1/make-prog1.py +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir1/make-prog2.py +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir1/program.c +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir2/actions-out/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir2/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir2/make-file.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir2/none.gyp +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/copies-out/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/copies.gyp +50 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/file1 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/file2 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/subdir/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/subdir/copies-out/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/subdir/file3 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/subdir/file4 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/subdir/subdir.gyp +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-actions.py +58 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-copies.py +59 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-depth.py +58 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-mac-bundle.py +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-relocate.py +60 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-rules.py +59 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-subdir2-deep.py +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-symlink.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-top-all.py +54 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/mac-bundle/Info.plist +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/mac-bundle/app.order +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/mac-bundle/header.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/mac-bundle/main.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/mac-bundle/resource.sb +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/mac-bundle/test.gyp +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/copy-file.py +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/rules.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/define3.in0 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/define4.in0 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/executable.gyp +59 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/function1.in1 +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/function2.in1 +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/program.c +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir2/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir2/file1.in0 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir2/file2.in0 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir2/file3.in1 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir2/file4.in1 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir2/none.gyp +49 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir2/rules-out/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/inc.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/inc1/include1.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/prog1.c +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/prog1.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/deeper/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/deeper/deeper.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/deeper/deeper.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/deeper/deeper.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/inc2/include2.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/prog2.c +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/prog2.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir3/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir3/inc3/include3.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir3/prog3.c +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir3/prog3.gyp +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/symroot.gypi +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/gyp-defines/defines.gyp +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/gyp-defines/echo.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/gyp-defines/gyptest-multiple-values.py +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/gyp-defines/gyptest-regyp.py +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/gyptest-exported-hard-dependency.py +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/gyptest-no-exported-hard-dependency.py +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/a.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/a.h +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/b.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/b.h +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/c.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/c.h +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/d.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/emit.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/hard_dependency.gyp +78 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/gyptest-all.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/gyptest-default.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/gyptest-disable-regyp.py +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/gyptest-regyp-output.py +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/gyptest-regyp.py +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/gyptest-target.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/hello.c +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/hello.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/hello2.c +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/hello2.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/home_dot_gyp/gyptest-home-includes-config-arg.py +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/home_dot_gyp/gyptest-home-includes-config-env.py +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/home_dot_gyp/gyptest-home-includes-regyp.py +44 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/home_dot_gyp/gyptest-home-includes.py +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/home_dot_gyp/src/all.gyp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/home_dot_gyp/src/printfoo.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/gyptest-all.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/gyptest-default.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/inc.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/inc1/include1.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/includes.c +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/includes.gyp +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/shadow1/shadow.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/shadow2/shadow.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/subdir/inc.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/subdir/inc2/include2.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/subdir/subdir_includes.c +14 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/subdir/subdir_includes.gyp +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/intermediate_dir/gyptest-intermediate-dir.py +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/intermediate_dir/src/script.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/intermediate_dir/src/shared_infile.txt +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/intermediate_dir/src/test.gyp +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/intermediate_dir/src/test2.gyp +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/English.lproj/InfoPlist-error.strings +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/English.lproj/InfoPlist.strings +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/English.lproj/MainMenu.xib +4119 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/English.lproj/Main_iPhone.storyboard +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/TestApp-Info.plist +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/check_no_signature.py +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/main.m +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/only-compile-in-32-bits.m +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/only-compile-in-64-bits.m +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/test-archs.gyp +110 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/test-device.gyp +79 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/test.gyp +45 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/deployment-target/check-version-min.c +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/deployment-target/deployment-target.gyp +58 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/gyptest-app-ios.py +46 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/gyptest-archs.py +106 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/gyptest-deployment-target.py +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/gyptest-per-config-settings.py +147 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/lib/README.txt +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/lib/TestCmd.py +1597 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/lib/TestCommon.py +570 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/lib/TestGyp.py +1117 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/gyptest-shared-obj-install-path.py +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/gyptest-shared.py +84 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/gyptest-static.py +84 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/lib1.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/lib1_moveable.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/lib2.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/lib2_moveable.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/library.gyp +58 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/program.c +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/shared_dependency.gyp +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library_dirs/gyptest-library-dirs.py +50 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library_dirs/subdir/README.txt +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library_dirs/subdir/hello.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library_dirs/subdir/mylib.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library_dirs/subdir/mylib.h +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library_dirs/subdir/test-win.gyp +60 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library_dirs/subdir/test.gyp +68 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/link-objects/base.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/link-objects/extra.c +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/link-objects/gyptest-all.py +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/link-objects/link-objects.gyp +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/linux/gyptest-implicit-rpath.py +48 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/linux/implicit-rpath/file.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/linux/implicit-rpath/main.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/linux/implicit-rpath/test.gyp +47 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/action-envvars/action/action.gyp +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/action-envvars/action/action.sh +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/English.lproj/InfoPlist-error.strings +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/English.lproj/InfoPlist.strings +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/English.lproj/MainMenu.xib +4119 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/English.lproj/utf-16be.strings +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/English.lproj/utf-16le.strings +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/TestApp-Info.plist +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/TestAppAppDelegate.h +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/TestAppAppDelegate.m +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/main.m +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/empty.c +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/test-error.gyp +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/test.gyp +41 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/empty_main.cc +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/file.mm +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/header.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/my_file.cc +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/my_main_file.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/test-archs-multiarch.gyp +72 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/test-archs-x86_64.gyp +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/test-no-archs.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/bundle-resources/change.sh +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/bundle-resources/executable-file.sh +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/bundle-resources/secret.txt +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/bundle-resources/test.gyp +59 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/ccfile.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/ccfile_withcflags.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/cfile.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/cppfile.cpp +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/cppfile_withcflags.cpp +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/cxxfile.cxx +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/cxxfile_withcflags.cxx +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/mfile.m +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/mmfile.mm +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/mmfile_withcflags.mm +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/test.gyp +132 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/clang-cxx-language-standard/c++11.cc +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/clang-cxx-language-standard/c++98.cc +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/clang-cxx-language-standard/clang-cxx-language-standard.gyp +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/clang-cxx-library/clang-cxx-library.gyp +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/clang-cxx-library/libc++.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/clang-cxx-library/libstdc++.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/copy-dylib/empty.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/copy-dylib/test.gyp +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/debuginfo/file.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/debuginfo/test.gyp +82 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/depend-on-bundle/English.lproj/InfoPlist.strings +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/depend-on-bundle/Info.plist +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/depend-on-bundle/bundle.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/depend-on-bundle/executable.c +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/depend-on-bundle/test.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/deployment-target/check-version-min.c +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/deployment-target/deployment-target.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework-dirs/calculate.c +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework-dirs/framework-dirs.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework-headers/myframework.h +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework-headers/myframework.m +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework-headers/test.gyp +44 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/TestFramework/English.lproj/InfoPlist.strings +2 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/TestFramework/Info.plist +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/TestFramework/ObjCVector.h +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/TestFramework/ObjCVector.mm +63 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/TestFramework/ObjCVectorInternal.h +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/TestFramework/TestFramework_Prefix.pch +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/empty.c +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/framework.gyp +71 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/global-settings/src/dir1/dir1.gyp +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/global-settings/src/dir2/dir2.gyp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/global-settings/src/dir2/file.txt +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-action-envvars.py +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-app-error.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-app.py +119 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-archs.py +89 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-bundle-resources.py +58 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-cflags.py +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-clang-cxx-language-standard.py +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-clang-cxx-library.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-copies.py +49 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-copy-dylib.py +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-debuginfo.py +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-depend-on-bundle.py +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-deployment-target.py +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-framework-dirs.py +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-framework-headers.py +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-framework.py +74 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-global-settings.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-infoplist-process.py +51 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-installname.py +79 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-ldflags-passed-to-libtool.py +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-ldflags.py +68 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-libraries.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-loadable-module.py +48 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-missing-cfbundlesignature.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-non-strs-flattened-to-env.py +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-objc-arc.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-objc-gc.py +45 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-postbuild-copy-bundle.py +75 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-postbuild-defaults.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-postbuild-fail.py +67 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-postbuild-multiple-configurations.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-postbuild-static-library.py +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-postbuild.py +53 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-prefixheader.py +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-rebuild.py +41 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-rpath.py +49 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-sdkroot.py +50 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-sourceless-module.py +72 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-strip-default.py +95 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-strip.py +53 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-type-envvars.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-unicode-settings.py +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-xcode-env-order.py +94 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-xcode-gcc-clang.py +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-xcode-gcc.py +56 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-xctest.py +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/infoplist-process/Info.plist +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/infoplist-process/main.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/infoplist-process/test1.gyp +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/infoplist-process/test2.gyp +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/infoplist-process/test3.gyp +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/installname/Info.plist +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/installname/file.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/installname/main.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/installname/test.gyp +93 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/ldflags-libtool/file.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/ldflags-libtool/test.gyp +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/ldflags/subdirectory/Info.plist +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/ldflags/subdirectory/file.c +2 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/ldflags/subdirectory/symbol_list.def +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/ldflags/subdirectory/test.gyp +66 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/libraries/subdir/README.txt +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/libraries/subdir/hello.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/libraries/subdir/mylib.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/libraries/subdir/test.gyp +65 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/loadable-module/Info.plist +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/loadable-module/module.c +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/loadable-module/test.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/missing-cfbundlesignature/Info.plist +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/missing-cfbundlesignature/Other-Info.plist +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/missing-cfbundlesignature/Third-Info.plist +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/missing-cfbundlesignature/file.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/missing-cfbundlesignature/test.gyp +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/non-strs-flattened-to-env/Info.plist +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/non-strs-flattened-to-env/main.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/non-strs-flattened-to-env/test.gyp +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-arc/c-file.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-arc/cc-file.cc +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-arc/m-file-no-arc.m +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-arc/m-file.m +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-arc/mm-file-no-arc.mm +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-arc/mm-file.mm +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-arc/test.gyp +45 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-gc/c-file.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-gc/cc-file.cc +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-gc/main.m +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-gc/needs-gc-mm.mm +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-gc/needs-gc.m +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-gc/test.gyp +102 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/Framework-Info.plist +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/TestApp-Info.plist +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/copied.txt +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/empty.c +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/main.c +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/postbuild-copy-framework.sh +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/resource_file.sb +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/test.gyp +49 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-defaults/Info.plist +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-defaults/main.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-defaults/postbuild-defaults.sh +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-defaults/test.gyp +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-fail/file.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-fail/postbuild-fail.sh +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-fail/test.gyp +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-fail/touch-dynamic.sh +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-fail/touch-static.sh +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-multiple-configurations/main.c +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-multiple-configurations/postbuild-touch-file.sh +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-multiple-configurations/test.gyp +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-static-library/empty.c +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-static-library/postbuild-touch-file.sh +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-static-library/test.gyp +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/copy.sh +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/file.c +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/file_g.c +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/file_h.c +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/script/shared_library_postbuild.sh +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/script/static_library_postbuild.sh +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/subdirectory/copied_file.txt +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/subdirectory/nested_target.gyp +53 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/test.gyp +93 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/prefixheader/file.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/prefixheader/file.cc +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/prefixheader/file.m +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/prefixheader/file.mm +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/prefixheader/header.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/prefixheader/test.gyp +82 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rebuild/TestApp-Info.plist +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rebuild/delay-touch.sh +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rebuild/empty.c +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rebuild/main.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rebuild/test.gyp +56 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rpath/file.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rpath/main.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rpath/test.gyp +48 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/sdkroot/file.cc +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/sdkroot/test.gyp +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/sdkroot/test_shorthand.sh +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/sourceless-module/empty.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/sourceless-module/empty.txt +2 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/sourceless-module/fun.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/sourceless-module/test.gyp +96 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/file.c +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/main.c +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/strip.saves +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/subdirectory/nested_file.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/subdirectory/nested_strip.saves +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/subdirectory/subdirectory.gyp +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/subdirectory/test_reading_save_file_from_postbuild.sh +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/test-defaults.gyp +51 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/test.gyp +119 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/file.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test.gyp +100 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_bundle_executable.sh +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_bundle_loadable_module.sh +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_bundle_shared_library.sh +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_nonbundle_executable.sh +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_nonbundle_loadable_module.sh +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_nonbundle_none.sh +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_nonbundle_shared_library.sh +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_nonbundle_static_library.sh +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/unicode-settings/file.cc +2 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/unicode-settings/test.gyp +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/unicode-settings/test_bundle_display_name.sh +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-env-order/Info.plist +56 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-env-order/file.ext1 +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-env-order/file.ext2 +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-env-order/file.ext3 +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-env-order/main.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-env-order/test.gyp +121 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/aliasing.cc +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/test-clang.gyp +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/test.gyp +60 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/valid_c.c +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/valid_cc.cc +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/valid_m.m +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/valid_mm.mm +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/warn_about_invalid_offsetof_macro.cc +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/warn_about_missing_newline.c +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xctest/MyClass.h +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xctest/MyClass.m +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xctest/TestCase.m +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xctest/resource.txt +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xctest/test.gyp +47 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xctest/test.xcodeproj/xcshareddata/xcschemes/classes.xcscheme +69 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/dependencies.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/gyptest-dependencies.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/gyptest-noload.py +57 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/main.cc +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/main.h +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/noload/all.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/noload/lib/shared.c +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/noload/lib/shared.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/noload/lib/shared.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/noload/main.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/basics/gyptest-make_global_settings.py +46 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/basics/make_global_settings.gyp +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/env-wrapper/gyptest-wrapper.py +46 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/env-wrapper/wrapper.gyp +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/wrapper/gyptest-wrapper.py +47 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/wrapper/wrapper.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/file0 +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/file1 +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/file2 +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/file3 +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/file4 +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/gyptest-many-actions-unsorted.py +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/gyptest-many-actions.py +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/many-actions-unsorted.gyp +154 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/many-actions.gyp +1817 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/module/gyptest-default.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/module/src/lib1.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/module/src/lib2.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/module/src/module.gyp +53 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/module/src/program.c +111 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/buildevents/buildevents.gyp +14 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/buildevents/gyptest-msbuild-supports-prepostbuild.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/buildevents/gyptest-ninja-warnings.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/buildevents/main.cc +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/config_attrs/gyptest-config_attrs.py +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/config_attrs/hello.c +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/config_attrs/hello.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/express/base/base.gyp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/express/express.gyp +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/express/gyptest-express.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/external.gyp +68 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/external_builder.py +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/gyptest-all.py +59 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/hello.cpp +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/hello.z +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/msbuild_action.py +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/msbuild_rule.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/filters/filters.gyp +47 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/filters/gyptest-filters-2008.py +68 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/filters/gyptest-filters-2010.py +57 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/list_excluded/gyptest-all.py +51 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/list_excluded/hello.cpp +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/list_excluded/hello_exclude.gyp +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/list_excluded/hello_mac.cpp +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/missing_sources/gyptest-missing.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/missing_sources/hello_missing.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/props/AppName.props +14 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/props/AppName.vsprops +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/props/gyptest-props.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/props/hello.c +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/props/hello.gyp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/shared_output/common.gypi +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/shared_output/gyptest-shared_output.py +41 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/shared_output/hello.c +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/shared_output/hello.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/shared_output/there/there.c +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/shared_output/there/there.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/uldi2010/gyptest-all.py +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/uldi2010/hello.c +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/uldi2010/hello.gyp +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/uldi2010/hello2.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/gyptest-all.py +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/gyptest-default.py +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/src/common.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/src/multiple.gyp +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/src/prog1.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/src/prog2.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/gyptest-action-dependencies.py +53 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/a.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/a.h +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/action_dependencies.gyp +88 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/b.c +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/b.h +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/c.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/c.h +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/emit.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/chained-dependency/chained-dependency.gyp +53 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/chained-dependency/chained.c +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/chained-dependency/gyptest-chained-dependency.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/normalize-paths-win/gyptest-normalize-paths.py +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/normalize-paths-win/hello.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/normalize-paths-win/normalize-paths.gyp +56 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/s-needs-no-depfiles/empty.s +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/s-needs-no-depfiles/s-needs-no-depfiles.gyp +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/solibs_avoid_relinking/gyptest-solibs-avoid-relinking.py +41 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/solibs_avoid_relinking/main.cc +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/solibs_avoid_relinking/solib.cc +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/solibs_avoid_relinking/solibs_avoid_relinking.gyp +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/use-custom-environment-files/gyptest-use-custom-environment-files.py +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/use-custom-environment-files/use-custom-environment-files.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/use-custom-environment-files/use-custom-environment-files.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-cpp/gyptest-no-cpp.py +50 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-cpp/src/call-f-main.c +2 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-cpp/src/empty-main.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-cpp/src/f.cc +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-cpp/src/test.gyp +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-output/gyptest-no-output.py +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-output/src/nooutput.gyp +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/product/gyptest-product.py +44 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/product/hello.c +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/product/product.gyp +128 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/gyptest-prune-targets.py +64 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/lib1.cc +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/lib2.cc +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/lib3.cc +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/lib_indirect.cc +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/program.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/test1.gyp +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/test2.gyp +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/relative/foo/a/a.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/relative/foo/a/a.gyp +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/relative/foo/a/c/c.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/relative/foo/a/c/c.gyp +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/relative/foo/b/b.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/relative/foo/b/b.gyp +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/relative/gyptest-default.py +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rename/filecase/file.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rename/filecase/test-casesensitive.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rename/filecase/test.gyp +14 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rename/gyptest-filecase.py +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/restat/gyptest-restat.py +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/restat/src/create_intermediate.py +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/restat/src/restat.gyp +50 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/restat/src/touch.py +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/gyptest-dirname.py +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/actions.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/copy-file.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/a/b/c.gencc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/a/b/c.printvars +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/foo/bar/baz.gencc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/foo/bar/baz.printvars +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/input-rule-dirname.gyp +92 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/main.cc +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/printvars.py +14 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/gyptest-all.py +70 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/gyptest-default.py +91 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/src/main.c +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/src/make-sources.py +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/src/prog1.in +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/src/prog2.in +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/src/same_target.gyp +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-use-built-dependencies/gyptest-use-built-dependencies.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-use-built-dependencies/src/main.cc +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-use-built-dependencies/src/use-built-dependencies-rule.gyp +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/gyptest-rules-variables.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/src/input_ext.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/src/input_name/test.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/src/input_path/subdir/test.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/src/subdir/input_dirname.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/src/subdir/test.c +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/src/test.input_root.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/src/variables.gyp +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/gyptest-all.py +69 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/gyptest-default.py +55 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/gyptest-input-root.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/gyptest-special-variables.py +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/actions.gyp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/an_asm.S +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/as.bat +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/copy-file.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/external/external.gyp +66 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/external/file1.in +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/external/file2.in +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/input-root.gyp +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/noaction/file1.in +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/noaction/no_action_with_rules_fails.gyp +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/rule.py +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/somefile.ext +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/special-variables.gyp +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir1/executable.gyp +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir1/function1.in +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir1/function2.in +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir1/program.c +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir2/file1.in +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir2/file2.in +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir2/never_used.gyp +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir2/no_action.gyp +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir2/no_inputs.gyp +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir2/none.gyp +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir3/executable2.gyp +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir3/function3.in +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir3/program.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir4/asm-function.assem +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir4/build-asm.gyp +49 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir4/program.c +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/gyptest-all.py +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/gyptest-default.py +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/gyptest-library.py +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/library/one/sub.gyp +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/library/test.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/library/two/sub.gyp +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/src/all.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/src/subdir1/executable.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/src/subdir1/main1.cc +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/src/subdir2/executable.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/src/subdir2/main2.cc +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-rule-output-file-name/gyptest-all.py +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-rule-output-file-name/src/subdir1/subdir1.gyp +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-rule-output-file-name/src/subdir2/subdir2.gyp +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-rule-output-file-name/src/subdirs.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-rule-output-file-name/src/touch.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/gyptest-all.py +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/gyptest-default.py +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/gyptest-fail-shared.py +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/gyptest-fail-static.py +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/gyptest-pass-executable.py +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/all.gyp +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/double-executable.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/double-shared.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/double-static.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/func.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/prog1.c +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/prog2.c +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/prog3.c +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/subdir1/func.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/subdir2/func.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name-different-directory/gyptest-all.py +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name-different-directory/src/subdir1/subdir1.gyp +66 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name-different-directory/src/subdir2/subdir2.gyp +66 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name-different-directory/src/subdirs.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name-different-directory/src/touch.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name/gyptest-same-target-name.py +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name/src/all.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name/src/executable1.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name/src/executable2.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sanitize-rule-names/blah.S +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sanitize-rule-names/gyptest-sanitize-rule-names.py +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sanitize-rule-names/hello.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sanitize-rule-names/sanitize-rule-names.gyp +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sanitize-rule-names/script.py +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/self-dependency/common.gypi +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/self-dependency/dep.gyp +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/self-dependency/gyptest-self-dependency.py +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/self-dependency/self_dependency.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/gyptest-all.py +39 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/gyptest-relocate.py +41 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/src/build/all.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/src/prog1/prog1.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/src/prog1/prog1.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/src/prog2/prog2.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/src/prog2/prog2.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/small/gyptest-small.py +55 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone-static-library/gyptest-standalone-static-library.py +52 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone-static-library/invalid.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone-static-library/mylib.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone-static-library/mylib.gyp +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone-static-library/prog.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone/gyptest-standalone.py +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone/standalone.gyp +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-SYMROOT-all.py +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-SYMROOT-default.py +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-subdir-all.py +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-subdir-default.py +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-subdir2-deep.py +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-top-all.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-top-default.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/prog1.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/prog1.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/subdir/prog2.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/subdir/prog2.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/subdir/subdir2/prog3.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/subdir/subdir2/prog3.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/symroot.gypi +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/target/gyptest-target.py +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/target/hello.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/target/target.gyp +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toolsets/gyptest-toolsets.py +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toolsets/main.cc +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toolsets/toolsets.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toolsets/toolsets.gyp +62 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toolsets/toolsets_shared.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toplevel-dir/gyptest-toplevel-dir.py +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toplevel-dir/src/sub1/main.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toplevel-dir/src/sub1/prog1.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toplevel-dir/src/sub2/prog2.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toplevel-dir/src/sub2/prog2.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands-repeated.gyp +128 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands-repeated.gyp.stdout +136 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands-repeated.gypd.golden +77 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands.gyp +91 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands.gyp.ignore-env.stdout +96 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands.gyp.stdout +96 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands.gypd.golden +66 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands.gypi +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/gyptest-commands-ignore-env.py +46 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/gyptest-commands-repeated.py +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/gyptest-commands.py +39 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/test.py +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/update_golden +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/filelist.gyp.stdout +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/filelist.gypd.golden +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/gyptest-filelist-golden.py +51 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/gyptest-filelist.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/src/dummy.py +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/src/filelist.gyp +93 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/src/filelist2.gyp +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/update_golden +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/latelate/gyptest-latelate.py +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/latelate/src/latelate.gyp +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/latelate/src/program.cc +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/variable-in-path/C1/hello.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/variable-in-path/gyptest-variable-in-path.py +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/variable-in-path/variable-in-path.gyp +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/asm-files/asm-files.gyp +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/asm-files/b.s +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/asm-files/c.S +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/asm-files/hello.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/batch-file-action/batch-file-action.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/batch-file-action/infile +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/batch-file-action/somecmd.bat +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/command-quote/a.S +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/command-quote/bat with spaces.bat +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/command-quote/command-quote.gyp +84 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/command-quote/go.bat +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/command-quote/subdir/and/another/in-subdir.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/additional-include-dirs.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/additional-include-dirs.gyp +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/additional-options.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/additional-options.gyp +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/analysis.gyp +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/buffer-security-check.gyp +51 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/buffer-security.cc +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/character-set-mbcs.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/character-set-unicode.cc +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/character-set.gyp +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/debug-format.gyp +48 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/default-char-is-unsigned.cc +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/default-char-is-unsigned.gyp +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/disable-specific-warnings.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/disable-specific-warnings.gyp +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/exception-handling-on.cc +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/exception-handling.gyp +46 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/force-include-files-with-precompiled.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/force-include-files.cc +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/force-include-files.gyp +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/function-level-linking.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/function-level-linking.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/hello.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/optimizations.gyp +207 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/pdbname-override.gyp +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/pdbname.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/pdbname.gyp +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/precomp.cc +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/rtti-on.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/rtti.gyp +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/runtime-checks.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/runtime-checks.gyp +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/runtime-library-md.cc +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/runtime-library-mdd.cc +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/runtime-library-mt.cc +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/runtime-library-mtd.cc +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/runtime-library.gyp +48 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/subdir/header.h +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/treat-wchar-t-as-built-in-type.gyp +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/treat-wchar-t-as-built-in-type1.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/treat-wchar-t-as-built-in-type2.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/uninit.cc +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/warning-as-error.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/warning-as-error.gyp +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/warning-level.gyp +115 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/warning-level1.cc +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/warning-level2.cc +14 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/warning-level3.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/warning-level4.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/generator-output-different-drive/gyptest-generator-output-different-drive.py +44 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/generator-output-different-drive/prog.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/generator-output-different-drive/prog.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-asm-files.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-additional-include-dirs.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-additional-options.py +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-analysis.py +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-buffer-security-check.py +53 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-character-set.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-debug-format.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-default-char-is-unsigned.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-disable-specific-warnings.py +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-exception-handling.py +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-force-include-files.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-function-level-linking.py +52 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-optimizations.py +105 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-pdbname-override.py +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-pdbname.py +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-rtti.py +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-runtime-checks.py +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-runtime-library.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-treat-wchar-t-as-built-in-type.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-warning-as-error.py +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-warning-level.py +41 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-command-quote.py +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-lib-ltcg.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-additional-deps.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-additional-options.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-aslr.py +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-base-address.py +62 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-debug-info.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-default-libs.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-deffile.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-defrelink.py +51 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-delay-load-dlls.py +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-embed-manifest.py +99 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-enable-uac.py +95 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-entrypointsymbol.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-fixed-base.py +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-force-symbol-reference.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-generate-manifest.py +127 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-incremental.py +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-large-address-aware.py +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-large-pdb.py +70 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-library-adjust.py +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-library-directories.py +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-ltcg.py +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-mapfile.py +44 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-nodefaultlib.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-nxcompat.py +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-opt-icf.py +41 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-opt-ref.py +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-ordering.py +101 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-outputfile.py +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-pdb-output.py +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-pdb.py +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-pgo.py +75 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-profile.py +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-restat-importlib.py +39 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-shard.py +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-subsystem.py +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-target-machine.py +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-tsaware.py +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-uldi.py +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-unsupported-manifest.py +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-update-manifest.py +103 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-warnings-as-errors.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-long-command-line.py +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-macro-projectname.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-macro-targetname.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-macro-vcinstalldir.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-macros-containing-gyp.py +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-macros-in-inputs-and-outputs.py +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-midl-rules.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-quoting-commands.py +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-rc-build.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/idl-rules/basic-idl.gyp +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/idl-rules/history_indexer.idl +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/idl-rules/history_indexer_user.cc +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/importlib/has-exports.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/importlib/hello.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/importlib/importlib.gyp +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/large-pdb/dllmain.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/large-pdb/large-pdb.gyp +98 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/large-pdb/main.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/lib-flags/answer.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/lib-flags/answer.h +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/lib-flags/ltcg.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/a/x.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/a/z.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/additional-deps.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/additional-deps.gyp +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/additional-options.gyp +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/aslr.gyp +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/b/y.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/base-address.gyp +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/debug-info.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/deffile-multiple.gyp +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/deffile.cc +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/deffile.def +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/deffile.gyp +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/delay-load-dlls.gyp +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/delay-load.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/embed-manifest.gyp +109 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/enable-uac.gyp +45 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/entrypointsymbol.cc +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/entrypointsymbol.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/extra.manifest +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/extra2.manifest +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/fixed-base.gyp +52 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/force-symbol-reference.gyp +39 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/generate-manifest.gyp +166 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/hello.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/incremental.gyp +65 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/inline_test.cc +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/inline_test.h +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/inline_test_main.cc +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/large-address-aware.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/library-adjust.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/library-adjust.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/library-directories-define.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/library-directories-reference.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/library-directories.gyp +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/link-ordering.gyp +95 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/link-warning.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/ltcg.gyp +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/main-crt.c +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/manifest-in-comment.cc +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/mapfile.cc +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/mapfile.gyp +45 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/no-default-libs.cc +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/no-default-libs.gyp +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/nodefaultlib.cc +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/nodefaultlib.gyp +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/nxcompat.gyp +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/opt-icf.cc +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/opt-icf.gyp +63 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/opt-ref.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/opt-ref.gyp +56 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/outputfile.gyp +58 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/pdb-output.gyp +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/pgo.gyp +143 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/profile.gyp +50 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/program-database.gyp +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/subdir/library.gyp +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/subsystem-windows.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/subsystem.gyp +70 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/target-machine.gyp +48 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/tsaware.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/unsupported-manifest.gyp +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/update_pgd.py +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/warn-as-error.gyp +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/x.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/y.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/z.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/long-command-line/function.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/long-command-line/hello.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/long-command-line/long-command-line.gyp +54 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/precompiled/gyptest-all.py +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/precompiled/hello.c +14 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/precompiled/hello.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/precompiled/hello2.c +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/precompiled/precomp.c +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/Resource.h +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/hello.cpp +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/hello.gyp +92 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/hello.h +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/hello.ico +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/hello.rc +86 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/hello3.rc +87 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/small.ico +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/subdir/hello2.rc +87 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/subdir/include.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/targetver.h +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/shard/hello1.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/shard/hello2.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/shard/hello3.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/shard/hello4.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/shard/shard.gyp +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/uldi/a.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/uldi/b.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/uldi/main.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/uldi/uldi.gyp +45 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/as.py +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/containing-gyp.gyp +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/do_stuff.py +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/hello.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/input-output-macros.gyp +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/input.S +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/projectname.gyp +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/stuff.blah +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/targetname.gyp +52 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/test_exists.py +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/vcinstalldir.gyp +41 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/README +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/Xcode/README +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/Xcode/Specifications/gyp.pbfilespec +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/Xcode/Specifications/gyp.xclangspec +226 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/emacs/README +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/emacs/gyp-tests.el +63 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/emacs/gyp.el +252 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/emacs/run-unit-tests.sh +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/emacs/testdata/media.gyp +1105 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/emacs/testdata/media.gyp.fontified +1107 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/graphviz.py +100 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/pretty_gyp.py +155 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/pretty_sln.py +168 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/pretty_vcproj.py +329 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/AUTHORS +20 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/LICENSE +26 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/Makefile.in +68 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/README.md +97 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/bindings/python/example/test.json +88 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/bindings/python/example/test.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/bindings/python/jsonparser.pyx +9 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/bindings/python/setup.py +14 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/bindings/python/wrap_json.c +95 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/configure +3796 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/configure.ac +30 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/examples/test_json.c +180 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/json-parser.pc.in +10 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/json.c +1011 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/json.h +283 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/ext-invalid-0001.json +3 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/ext-invalid-0002.json +1 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/ext-valid-0001.json +9 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/ext-valid-0002.json +4 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/ext-valid-0003.json +3 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0000.json +0 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0001.json +2 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0002.json +2 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0003.json +88 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0004.json +2 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0005.json +2 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0006.json +3 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0007.json +1 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0008.json +1 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0009.json +1 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0010.json +1 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/test.py +70 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0000.json +88 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0001.json +2 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0002.json +2 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0003.json +3 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0004.json +1 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0005.json +15 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0006.json +1 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0007.json +2 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0008.json +8 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0009.json +1 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0010.json +1 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0011.json +1 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0012.json +5 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/CMakeLists.txt +31 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/Doxyfile +1528 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/LICENSE.md +93 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/MANIFEST +7 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/Makefile +145 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/NEWS.md +234 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/README.md +67 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/appveyor.yml +42 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/bench/Makefile +39 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/bench/bench.c +56 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/bench/icu.c +61 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/bench/unistring.c +60 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/bench/util.c +39 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/bench/util.h +22 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/data/Makefile +63 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/data/charwidths.jl +190 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/data/data_generator.rb +328 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/lump.md +27 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/case.c +50 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/charwidth.c +71 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/graphemetest.c +74 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/iterate.c +160 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/normtest.c +64 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/printproperty.c +51 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/tests.c +46 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/tests.h +23 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/valid.c +41 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/utf8proc.c +644 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/utf8proc.h +601 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/utf8proc_data.c +16752 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/utils.cmake +20 -0
- data/ext/tree-sitter/tree-sitter/gyp-mac-tool +511 -0
- data/ext/tree-sitter/tree-sitter/include/tree_sitter/compiler.h +32 -0
- data/ext/tree-sitter/tree-sitter/include/tree_sitter/parser.h +188 -0
- data/ext/tree-sitter/tree-sitter/include/tree_sitter/runtime.h +126 -0
- data/ext/tree-sitter/tree-sitter/out/Release/libcompiler.a +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/libruntime.a +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/linker.lock +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/externals/json-parser/json.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/externals/utf8proc/utf8proc.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/build_lex_table.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/build_parse_table.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/build_tables.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/lex_conflict_manager.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/lex_item.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/lex_item_transitions.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/lookahead_set.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/parse_item.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/parse_item_set_builder.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/recovery_tokens.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/rule_can_be_blank.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/compile.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/generate_code/c_code.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/lex_table.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/parse_grammar.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/parse_table.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/precedence_range.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/expand_repeats.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/expand_tokens.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/extract_choices.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/extract_tokens.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/flatten_grammar.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/intern_symbols.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/is_token.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/normalize_rules.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/parse_regex.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/prepare_grammar.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/token_description.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rule.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/blank.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/built_in_symbols.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/character_range.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/character_set.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/choice.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/metadata.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/named_symbol.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/pattern.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/repeat.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/rules.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/seq.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/string.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/symbol.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/visitor.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/syntax_grammar.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/util/string_helpers.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/variable.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/externals/utf8proc/utf8proc.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/document.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/error_costs.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/language.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/lexer.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/node.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/parser.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/stack.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/string_input.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/tree.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/utf16.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/build_tables/distinctive_tokens_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/build_tables/lex_conflict_manager_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/build_tables/lex_item_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/build_tables/parse_item_set_builder_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/build_tables/rule_can_be_blank_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/expand_repeats_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/expand_tokens_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/extract_choices_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/extract_tokens_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/flatten_grammar_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/intern_symbols_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/parse_regex_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/rules/character_set_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/rules/choice_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/rules/repeat_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/util/string_helpers_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/encoding_helpers.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/load_language.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/point_helpers.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/random_helpers.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/read_test_entries.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/record_alloc.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/rule_helpers.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/scope_sequence.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/spy_input.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/spy_logger.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/stderr_logger.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/stream_methods.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/tree_helpers.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/integration/compile_grammar_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/integration/corpus_specs.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/runtime/document_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/runtime/node_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/runtime/parser_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/runtime/stack_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/runtime/tree_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/specs.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/tests +0 -0
- data/ext/tree-sitter/tree-sitter/project.Makefile +6 -0
- data/ext/tree-sitter/tree-sitter/project.gyp +175 -0
- data/ext/tree-sitter/tree-sitter/runtime.target.mk +174 -0
- data/ext/tree-sitter/tree-sitter/script/check-mallocs +20 -0
- data/ext/tree-sitter/tree-sitter/script/ci +7 -0
- data/ext/tree-sitter/tree-sitter/script/clean +7 -0
- data/ext/tree-sitter/tree-sitter/script/configure +7 -0
- data/ext/tree-sitter/tree-sitter/script/fetch-fixtures +28 -0
- data/ext/tree-sitter/tree-sitter/script/format +7 -0
- data/ext/tree-sitter/tree-sitter/script/lint +14 -0
- data/ext/tree-sitter/tree-sitter/script/test +122 -0
- data/ext/tree-sitter/tree-sitter/script/trim-whitespace +3 -0
- data/ext/tree-sitter/tree-sitter/script/util/valgrind.supp +256 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/build_tables/distinctive_tokens_spec.cc +34 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/build_tables/lex_conflict_manager_spec.cc +88 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/build_tables/lex_item_spec.cc +517 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/build_tables/parse_item_set_builder_spec.cc +133 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/build_tables/rule_can_be_blank_spec.cc +60 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/expand_repeats_spec.cc +152 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/expand_tokens_spec.cc +109 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/extract_choices_spec.cc +106 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/extract_tokens_spec.cc +251 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/flatten_grammar_spec.cc +89 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/intern_symbols_spec.cc +89 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/parse_regex_spec.cc +245 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/rules/character_set_spec.cc +337 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/rules/choice_spec.cc +53 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/rules/repeat_spec.cc +22 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/util/string_helpers_spec.cc +26 -0
- data/ext/tree-sitter/tree-sitter/spec/fixtures/error_corpus/c_errors.txt +130 -0
- data/ext/tree-sitter/tree-sitter/spec/fixtures/error_corpus/javascript_errors.txt +157 -0
- data/ext/tree-sitter/tree-sitter/spec/fixtures/error_corpus/json_errors.txt +56 -0
- data/ext/tree-sitter/tree-sitter/spec/fixtures/error_corpus/python_errors.txt +29 -0
- data/ext/tree-sitter/tree-sitter/spec/fixtures/external_scanners/extra_external_tokens.c +42 -0
- data/ext/tree-sitter/tree-sitter/spec/fixtures/external_scanners/percent_strings.c +118 -0
- data/ext/tree-sitter/tree-sitter/spec/fixtures/external_scanners/shared_external_tokens.c +63 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/dedent.h +12 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/encoding_helpers.cc +58 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/encoding_helpers.h +15 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/equals_pointer.h +37 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/load_language.cc +206 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/load_language.h +12 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/point_helpers.cc +45 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/point_helpers.h +23 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/random_helpers.cc +35 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/random_helpers.h +8 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/read_test_entries.cc +105 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/read_test_entries.h +15 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/record_alloc.cc +84 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/record_alloc.h +16 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/rule_helpers.cc +55 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/rule_helpers.h +21 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/scope_sequence.cc +106 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/scope_sequence.h +16 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/spy_input.cc +133 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/spy_input.h +39 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/spy_logger.cc +22 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/spy_logger.h +15 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/stderr_logger.cc +22 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/stderr_logger.h +8 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/stream_methods.cc +140 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/stream_methods.h +136 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/tree_helpers.cc +50 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/tree_helpers.h +16 -0
- data/ext/tree-sitter/tree-sitter/spec/integration/compile_grammar_spec.cc +847 -0
- data/ext/tree-sitter/tree-sitter/spec/integration/corpus_specs.cc +185 -0
- data/ext/tree-sitter/tree-sitter/spec/runtime/document_spec.cc +372 -0
- data/ext/tree-sitter/tree-sitter/spec/runtime/node_spec.cc +436 -0
- data/ext/tree-sitter/tree-sitter/spec/runtime/parser_spec.cc +479 -0
- data/ext/tree-sitter/tree-sitter/spec/runtime/stack_spec.cc +571 -0
- data/ext/tree-sitter/tree-sitter/spec/runtime/tree_spec.cc +439 -0
- data/ext/tree-sitter/tree-sitter/spec/spec_helper.h +19 -0
- data/ext/tree-sitter/tree-sitter/spec/specs.cc +16 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_lex_table.cc +195 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_lex_table.h +18 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_parse_table.cc +604 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_parse_table.h +22 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_tables.cc +27 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_tables.h +24 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/conflict_type.h +16 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_conflict_manager.cc +55 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_conflict_manager.h +31 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_item.cc +118 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_item.h +82 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_item_transitions.cc +188 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_item_transitions.h +17 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lookahead_set.cc +47 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lookahead_set.h +28 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/parse_item.cc +148 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/parse_item.h +65 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/parse_item_set_builder.cc +167 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/parse_item_set_builder.h +35 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/recovery_tokens.cc +89 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/recovery_tokens.h +19 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/remove_duplicate_states.h +65 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/rule_can_be_blank.cc +44 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/rule_can_be_blank.h +14 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/compile.cc +72 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/compile.h +16 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/compile_error.h +28 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/generate_code/c_code.cc +691 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/generate_code/c_code.h +21 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/grammar.h +20 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/lex_table.cc +78 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/lex_table.h +75 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/lexical_grammar.h +19 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/parse_grammar.cc +335 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/parse_grammar.h +20 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/parse_table.cc +258 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/parse_table.h +106 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/precedence_range.cc +45 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/precedence_range.h +23 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/expand_repeats.cc +80 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/expand_repeats.h +16 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/expand_tokens.cc +88 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/expand_tokens.h +18 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/extract_choices.cc +55 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/extract_choices.h +15 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/extract_tokens.cc +213 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/extract_tokens.h +19 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/flatten_grammar.cc +124 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/flatten_grammar.h +20 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/initial_syntax_grammar.h +24 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/intern_symbols.cc +110 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/intern_symbols.h +20 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/interned_grammar.h +24 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/is_token.cc +30 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/is_token.h +14 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/normalize_rules.cc +19 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/normalize_rules.h +14 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/parse_regex.cc +252 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/parse_regex.h +17 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/prepare_grammar.cc +69 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/prepare_grammar.h +21 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/token_description.cc +69 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/token_description.h +15 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rule.cc +15 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rule.h +45 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules.h +28 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/blank.cc +36 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/blank.h +25 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/built_in_symbols.cc +19 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/built_in_symbols.h +16 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/character_range.cc +36 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/character_range.h +25 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/character_set.cc +220 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/character_set.h +59 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/choice.cc +78 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/choice.h +28 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/metadata.cc +98 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/metadata.h +51 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/named_symbol.cc +35 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/named_symbol.h +26 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/pattern.cc +36 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/pattern.h +26 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/repeat.cc +44 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/repeat.h +27 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/rules.cc +108 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/seq.cc +57 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/seq.h +29 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/string.cc +35 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/string.h +26 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/symbol.cc +82 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/symbol.h +55 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/visitor.cc +44 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/visitor.h +234 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/syntax_grammar.cc +34 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/syntax_grammar.h +52 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/util/hash_combine.h +24 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/util/string_helpers.cc +54 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/util/string_helpers.h +19 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/variable.cc +11 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/variable.h +27 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/alloc.h +85 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/array.h +137 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/document.c +152 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/document.h +17 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/error_costs.c +28 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/error_costs.h +25 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/language.c +56 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/language.h +70 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/length.h +59 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/lexer.c +131 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/lexer.h +40 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/node.c +393 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/node.h +8 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/parser.c +1227 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/parser.h +41 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/point.h +46 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/reduce_action.h +32 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/reusable_node.h +50 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/stack.c +658 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/stack.h +130 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/string_input.c +50 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/string_input.h +17 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/tree.c +551 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/tree.h +117 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/tree_path.h +217 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/utf16.c +24 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/utf16.h +20 -0
- data/ext/tree-sitter/tree-sitter/tests.Makefile +6 -0
- data/ext/tree-sitter/tree-sitter/tests.gyp +58 -0
- data/ext/tree-sitter/tree-sitter/tests.target.mk +176 -0
- data/lib/tree-sitter.rb +11 -0
- data/lib/tree-sitter/version.rb +3 -0
- data/test/test_helper.rb +9 -0
- data/test/tree-sitter/fixtures/arithmetic/grammar.json +67 -0
- data/test/tree-sitter/fixtures/ruby/grammar.json +4803 -0
- data/test/tree-sitter/test_basic.rb +7 -0
- data/test/tree-sitter/test_document.rb +7 -0
- data/test/tree-sitter/test_grammar.rb +34 -0
- data/tree-sitter.gemspec +33 -0
- metadata +2018 -0
@@ -0,0 +1,106 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
|
3
|
+
# Copyright (c) 2013 Google Inc. All rights reserved.
|
4
|
+
# Use of this source code is governed by a BSD-style license that can be
|
5
|
+
# found in the LICENSE file.
|
6
|
+
|
7
|
+
"""
|
8
|
+
Verifies that device and simulator bundles are built correctly.
|
9
|
+
"""
|
10
|
+
|
11
|
+
import collections
|
12
|
+
import plistlib
|
13
|
+
import TestGyp
|
14
|
+
import os
|
15
|
+
import re
|
16
|
+
import struct
|
17
|
+
import subprocess
|
18
|
+
import sys
|
19
|
+
import tempfile
|
20
|
+
|
21
|
+
|
22
|
+
def BuildExpected(file, archs):
|
23
|
+
if len(archs) == 1:
|
24
|
+
return 'Non-fat file: %s is architecture: %s' % (file, archs[0])
|
25
|
+
return 'Architectures in the fat file: %s are: %s' % (file, ' '.join(archs))
|
26
|
+
|
27
|
+
|
28
|
+
def CheckFileType(test, file, archs):
|
29
|
+
proc = subprocess.Popen(['lipo', '-info', file], stdout=subprocess.PIPE)
|
30
|
+
o = proc.communicate()[0].strip()
|
31
|
+
assert not proc.returncode
|
32
|
+
if len(archs) == 1:
|
33
|
+
pattern = re.compile('^Non-fat file: (.*) is architecture: (.*)$')
|
34
|
+
else:
|
35
|
+
pattern = re.compile('^Architectures in the fat file: (.*) are: (.*)$')
|
36
|
+
match = pattern.match(o)
|
37
|
+
if match is None:
|
38
|
+
print 'Ouput does not match expected pattern: %s' % (pattern.pattern)
|
39
|
+
test.fail_test()
|
40
|
+
else:
|
41
|
+
found_file, found_archs = match.groups()
|
42
|
+
if found_file != file or set(found_archs.split()) != set(archs):
|
43
|
+
print 'Expected file %s with arch %s, got %s with arch %s' % (
|
44
|
+
file, ' '.join(archs), found_file, ' '.join(found_archs))
|
45
|
+
test.fail_test()
|
46
|
+
|
47
|
+
|
48
|
+
def XcodeVersion():
|
49
|
+
xcode, build = GetStdout(['xcodebuild', '-version']).splitlines()
|
50
|
+
xcode = xcode.split()[-1].replace('.', '')
|
51
|
+
xcode = (xcode + '0' * (3 - len(xcode))).zfill(4)
|
52
|
+
return xcode
|
53
|
+
|
54
|
+
|
55
|
+
def GetStdout(cmdlist):
|
56
|
+
proc = subprocess.Popen(cmdlist, stdout=subprocess.PIPE)
|
57
|
+
o = proc.communicate()[0].strip()
|
58
|
+
assert not proc.returncode
|
59
|
+
return o
|
60
|
+
|
61
|
+
|
62
|
+
if sys.platform == 'darwin':
|
63
|
+
test = TestGyp.TestGyp(formats=['ninja', 'xcode'])
|
64
|
+
|
65
|
+
test_cases = [
|
66
|
+
('Default', 'TestNoArchs', ['i386']),
|
67
|
+
('Default', 'TestArch32Bits', ['i386']),
|
68
|
+
('Default', 'TestArch64Bits', ['x86_64']),
|
69
|
+
('Default', 'TestMultiArchs', ['i386', 'x86_64']),
|
70
|
+
('Default-iphoneos', 'TestNoArchs', ['armv7']),
|
71
|
+
('Default-iphoneos', 'TestArch32Bits', ['armv7']),
|
72
|
+
('Default-iphoneos', 'TestArch64Bits', ['arm64']),
|
73
|
+
('Default-iphoneos', 'TestMultiArchs', ['armv7', 'arm64']),
|
74
|
+
]
|
75
|
+
|
76
|
+
xcode_version = XcodeVersion()
|
77
|
+
test.run_gyp('test-archs.gyp', chdir='app-bundle')
|
78
|
+
for configuration, target, archs in test_cases:
|
79
|
+
is_64_bit_build = ('arm64' in archs or 'x86_64' in archs)
|
80
|
+
is_device_build = configuration.endswith('-iphoneos')
|
81
|
+
|
82
|
+
kwds = collections.defaultdict(list)
|
83
|
+
if test.format == 'xcode' and is_device_build:
|
84
|
+
configuration, sdk = configuration.split('-')
|
85
|
+
kwds['arguments'].extend(['-sdk', sdk])
|
86
|
+
|
87
|
+
# TODO(sdefresne): remove those special-cases once the bots have been
|
88
|
+
# updated to use a more recent version of Xcode.
|
89
|
+
if xcode_version < '0500':
|
90
|
+
if is_64_bit_build:
|
91
|
+
continue
|
92
|
+
if test.format == 'xcode':
|
93
|
+
arch = 'i386'
|
94
|
+
if is_device_build:
|
95
|
+
arch = 'armv7'
|
96
|
+
kwds['arguments'].extend(['-arch', arch])
|
97
|
+
|
98
|
+
test.set_configuration(configuration)
|
99
|
+
filename = '%s.bundle/%s' % (target, target)
|
100
|
+
test.build('test-archs.gyp', target, chdir='app-bundle', **kwds)
|
101
|
+
result_file = test.built_file_path(filename, chdir='app-bundle')
|
102
|
+
|
103
|
+
test.must_exist(result_file)
|
104
|
+
CheckFileType(test, result_file, archs)
|
105
|
+
|
106
|
+
test.pass_test()
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
|
3
|
+
# Copyright (c) 2013 Google Inc. All rights reserved.
|
4
|
+
# Use of this source code is governed by a BSD-style license that can be
|
5
|
+
# found in the LICENSE file.
|
6
|
+
|
7
|
+
"""
|
8
|
+
Verifies that IPHONEOS_DEPLOYMENT_TARGET works.
|
9
|
+
"""
|
10
|
+
|
11
|
+
import TestGyp
|
12
|
+
|
13
|
+
import sys
|
14
|
+
|
15
|
+
if sys.platform == 'darwin':
|
16
|
+
test = TestGyp.TestGyp(formats=['make', 'ninja', 'xcode'])
|
17
|
+
|
18
|
+
test.run_gyp('deployment-target.gyp', chdir='deployment-target')
|
19
|
+
|
20
|
+
test.build('deployment-target.gyp', test.ALL, chdir='deployment-target')
|
21
|
+
|
22
|
+
test.pass_test()
|
23
|
+
|
@@ -0,0 +1,147 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
|
3
|
+
# Copyright (c) 2012 Google Inc. All rights reserved.
|
4
|
+
# Use of this source code is governed by a BSD-style license that can be
|
5
|
+
# found in the LICENSE file.
|
6
|
+
|
7
|
+
"""
|
8
|
+
Verifies that device and simulator bundles are built correctly.
|
9
|
+
"""
|
10
|
+
|
11
|
+
import plistlib
|
12
|
+
import TestGyp
|
13
|
+
import os
|
14
|
+
import struct
|
15
|
+
import subprocess
|
16
|
+
import sys
|
17
|
+
import tempfile
|
18
|
+
|
19
|
+
|
20
|
+
def CheckFileType(file, expected):
|
21
|
+
proc = subprocess.Popen(['lipo', '-info', file], stdout=subprocess.PIPE)
|
22
|
+
o = proc.communicate()[0].strip()
|
23
|
+
assert not proc.returncode
|
24
|
+
if not expected in o:
|
25
|
+
print 'File: Expected %s, got %s' % (expected, o)
|
26
|
+
test.fail_test()
|
27
|
+
|
28
|
+
def HasCerts():
|
29
|
+
# Because the bots do not have certs, don't check them if there are no
|
30
|
+
# certs available.
|
31
|
+
proc = subprocess.Popen(['security','find-identity','-p', 'codesigning',
|
32
|
+
'-v'], stdout=subprocess.PIPE)
|
33
|
+
return "0 valid identities found" not in proc.communicate()[0].strip()
|
34
|
+
|
35
|
+
def CheckSignature(file):
|
36
|
+
proc = subprocess.Popen(['codesign', '-v', file], stdout=subprocess.PIPE)
|
37
|
+
o = proc.communicate()[0].strip()
|
38
|
+
assert not proc.returncode
|
39
|
+
if "code object is not signed at all" in o:
|
40
|
+
print 'File %s not properly signed.' % (file)
|
41
|
+
test.fail_test()
|
42
|
+
|
43
|
+
def CheckEntitlements(file, expected_entitlements):
|
44
|
+
with tempfile.NamedTemporaryFile() as temp:
|
45
|
+
proc = subprocess.Popen(['codesign', '--display', '--entitlements',
|
46
|
+
temp.name, file], stdout=subprocess.PIPE)
|
47
|
+
o = proc.communicate()[0].strip()
|
48
|
+
assert not proc.returncode
|
49
|
+
data = temp.read()
|
50
|
+
entitlements = ParseEntitlements(data)
|
51
|
+
if not entitlements:
|
52
|
+
print 'No valid entitlements found in %s.' % (file)
|
53
|
+
test.fail_test()
|
54
|
+
if entitlements != expected_entitlements:
|
55
|
+
print 'Unexpected entitlements found in %s.' % (file)
|
56
|
+
test.fail_test()
|
57
|
+
|
58
|
+
def ParseEntitlements(data):
|
59
|
+
if len(data) < 8:
|
60
|
+
return None
|
61
|
+
magic, length = struct.unpack('>II', data[:8])
|
62
|
+
if magic != 0xfade7171 or length != len(data):
|
63
|
+
return None
|
64
|
+
return data[8:]
|
65
|
+
|
66
|
+
def GetProductVersion():
|
67
|
+
args = ['xcodebuild','-version','-sdk','iphoneos','ProductVersion']
|
68
|
+
job = subprocess.Popen(args, stdout=subprocess.PIPE)
|
69
|
+
return job.communicate()[0].strip()
|
70
|
+
|
71
|
+
def CheckPlistvalue(plist, key, expected):
|
72
|
+
if key not in plist:
|
73
|
+
print '%s not set in plist' % key
|
74
|
+
test.fail_test()
|
75
|
+
return
|
76
|
+
actual = plist[key]
|
77
|
+
if actual != expected:
|
78
|
+
print 'File: Expected %s, got %s for %s' % (expected, actual, key)
|
79
|
+
test.fail_test()
|
80
|
+
|
81
|
+
def CheckPlistNotSet(plist, key):
|
82
|
+
if key in plist:
|
83
|
+
print '%s should not be set in plist' % key
|
84
|
+
test.fail_test()
|
85
|
+
return
|
86
|
+
|
87
|
+
def ConvertBinaryPlistToXML(path):
|
88
|
+
proc = subprocess.call(['plutil', '-convert', 'xml1', path],
|
89
|
+
stdout=subprocess.PIPE)
|
90
|
+
|
91
|
+
if sys.platform == 'darwin':
|
92
|
+
test = TestGyp.TestGyp(formats=['ninja', 'xcode'])
|
93
|
+
|
94
|
+
test.run_gyp('test-device.gyp', chdir='app-bundle')
|
95
|
+
|
96
|
+
test_configs = ['Default-iphoneos', 'Default']
|
97
|
+
# TODO(justincohen): Disabling 'Default-iphoneos' for xcode until bots are
|
98
|
+
# configured with signing certs.
|
99
|
+
if test.format == 'xcode':
|
100
|
+
test_configs.remove('Default-iphoneos')
|
101
|
+
|
102
|
+
for configuration in test_configs:
|
103
|
+
test.set_configuration(configuration)
|
104
|
+
test.build('test-device.gyp', 'test_app', chdir='app-bundle')
|
105
|
+
result_file = test.built_file_path('Test App Gyp.bundle/Test App Gyp',
|
106
|
+
chdir='app-bundle')
|
107
|
+
test.must_exist(result_file)
|
108
|
+
|
109
|
+
info_plist = test.built_file_path('Test App Gyp.bundle/Info.plist',
|
110
|
+
chdir='app-bundle')
|
111
|
+
|
112
|
+
# plistlib doesn't support binary plists, but that's what Xcode creates.
|
113
|
+
if test.format == 'xcode':
|
114
|
+
ConvertBinaryPlistToXML(info_plist)
|
115
|
+
plist = plistlib.readPlist(info_plist)
|
116
|
+
|
117
|
+
CheckPlistvalue(plist, 'UIDeviceFamily', [1, 2])
|
118
|
+
|
119
|
+
if configuration == 'Default-iphoneos':
|
120
|
+
CheckFileType(result_file, 'armv7')
|
121
|
+
CheckPlistvalue(plist, 'DTPlatformVersion', GetProductVersion())
|
122
|
+
CheckPlistvalue(plist, 'CFBundleSupportedPlatforms', ['iPhoneOS'])
|
123
|
+
CheckPlistvalue(plist, 'DTPlatformName', 'iphoneos')
|
124
|
+
else:
|
125
|
+
CheckFileType(result_file, 'i386')
|
126
|
+
CheckPlistNotSet(plist, 'DTPlatformVersion')
|
127
|
+
CheckPlistvalue(plist, 'CFBundleSupportedPlatforms', ['iPhoneSimulator'])
|
128
|
+
CheckPlistvalue(plist, 'DTPlatformName', 'iphonesimulator')
|
129
|
+
|
130
|
+
if HasCerts() and configuration == 'Default-iphoneos':
|
131
|
+
test.build('test-device.gyp', 'sig_test', chdir='app-bundle')
|
132
|
+
result_file = test.built_file_path('sig_test.bundle/sig_test',
|
133
|
+
chdir='app-bundle')
|
134
|
+
CheckSignature(result_file)
|
135
|
+
info_plist = test.built_file_path('sig_test.bundle/Info.plist',
|
136
|
+
chdir='app-bundle')
|
137
|
+
|
138
|
+
plist = plistlib.readPlist(info_plist)
|
139
|
+
CheckPlistvalue(plist, 'UIDeviceFamily', [1])
|
140
|
+
|
141
|
+
entitlements_file = test.built_file_path('sig_test.xcent',
|
142
|
+
chdir='app-bundle')
|
143
|
+
if os.path.isfile(entitlements_file):
|
144
|
+
expected_entitlements = open(entitlements_file).read()
|
145
|
+
CheckEntitlements(result_file, expected_entitlements)
|
146
|
+
|
147
|
+
test.pass_test()
|
@@ -0,0 +1,17 @@
|
|
1
|
+
Supporting modules for GYP testing.
|
2
|
+
|
3
|
+
TestCmd.py
|
4
|
+
TestCommon.py
|
5
|
+
|
6
|
+
Modules for generic testing of command-line utilities,
|
7
|
+
specifically including the ability to copy a test configuration
|
8
|
+
to temporary directories (with default cleanup on exit) as part
|
9
|
+
of running test scripts that invoke commands, compare actual
|
10
|
+
against expected output, etc.
|
11
|
+
|
12
|
+
Our copies of these come from the SCons project,
|
13
|
+
http://www.scons.org/.
|
14
|
+
|
15
|
+
TestGyp.py
|
16
|
+
|
17
|
+
Modules for GYP-specific tests, of course.
|
@@ -0,0 +1,1597 @@
|
|
1
|
+
"""
|
2
|
+
TestCmd.py: a testing framework for commands and scripts.
|
3
|
+
|
4
|
+
The TestCmd module provides a framework for portable automated testing
|
5
|
+
of executable commands and scripts (in any language, not just Python),
|
6
|
+
especially commands and scripts that require file system interaction.
|
7
|
+
|
8
|
+
In addition to running tests and evaluating conditions, the TestCmd
|
9
|
+
module manages and cleans up one or more temporary workspace
|
10
|
+
directories, and provides methods for creating files and directories in
|
11
|
+
those workspace directories from in-line data, here-documents), allowing
|
12
|
+
tests to be completely self-contained.
|
13
|
+
|
14
|
+
A TestCmd environment object is created via the usual invocation:
|
15
|
+
|
16
|
+
import TestCmd
|
17
|
+
test = TestCmd.TestCmd()
|
18
|
+
|
19
|
+
There are a bunch of keyword arguments available at instantiation:
|
20
|
+
|
21
|
+
test = TestCmd.TestCmd(description = 'string',
|
22
|
+
program = 'program_or_script_to_test',
|
23
|
+
interpreter = 'script_interpreter',
|
24
|
+
workdir = 'prefix',
|
25
|
+
subdir = 'subdir',
|
26
|
+
verbose = Boolean,
|
27
|
+
match = default_match_function,
|
28
|
+
diff = default_diff_function,
|
29
|
+
combine = Boolean)
|
30
|
+
|
31
|
+
There are a bunch of methods that let you do different things:
|
32
|
+
|
33
|
+
test.verbose_set(1)
|
34
|
+
|
35
|
+
test.description_set('string')
|
36
|
+
|
37
|
+
test.program_set('program_or_script_to_test')
|
38
|
+
|
39
|
+
test.interpreter_set('script_interpreter')
|
40
|
+
test.interpreter_set(['script_interpreter', 'arg'])
|
41
|
+
|
42
|
+
test.workdir_set('prefix')
|
43
|
+
test.workdir_set('')
|
44
|
+
|
45
|
+
test.workpath('file')
|
46
|
+
test.workpath('subdir', 'file')
|
47
|
+
|
48
|
+
test.subdir('subdir', ...)
|
49
|
+
|
50
|
+
test.rmdir('subdir', ...)
|
51
|
+
|
52
|
+
test.write('file', "contents\n")
|
53
|
+
test.write(['subdir', 'file'], "contents\n")
|
54
|
+
|
55
|
+
test.read('file')
|
56
|
+
test.read(['subdir', 'file'])
|
57
|
+
test.read('file', mode)
|
58
|
+
test.read(['subdir', 'file'], mode)
|
59
|
+
|
60
|
+
test.writable('dir', 1)
|
61
|
+
test.writable('dir', None)
|
62
|
+
|
63
|
+
test.preserve(condition, ...)
|
64
|
+
|
65
|
+
test.cleanup(condition)
|
66
|
+
|
67
|
+
test.command_args(program = 'program_or_script_to_run',
|
68
|
+
interpreter = 'script_interpreter',
|
69
|
+
arguments = 'arguments to pass to program')
|
70
|
+
|
71
|
+
test.run(program = 'program_or_script_to_run',
|
72
|
+
interpreter = 'script_interpreter',
|
73
|
+
arguments = 'arguments to pass to program',
|
74
|
+
chdir = 'directory_to_chdir_to',
|
75
|
+
stdin = 'input to feed to the program\n')
|
76
|
+
universal_newlines = True)
|
77
|
+
|
78
|
+
p = test.start(program = 'program_or_script_to_run',
|
79
|
+
interpreter = 'script_interpreter',
|
80
|
+
arguments = 'arguments to pass to program',
|
81
|
+
universal_newlines = None)
|
82
|
+
|
83
|
+
test.finish(self, p)
|
84
|
+
|
85
|
+
test.pass_test()
|
86
|
+
test.pass_test(condition)
|
87
|
+
test.pass_test(condition, function)
|
88
|
+
|
89
|
+
test.fail_test()
|
90
|
+
test.fail_test(condition)
|
91
|
+
test.fail_test(condition, function)
|
92
|
+
test.fail_test(condition, function, skip)
|
93
|
+
|
94
|
+
test.no_result()
|
95
|
+
test.no_result(condition)
|
96
|
+
test.no_result(condition, function)
|
97
|
+
test.no_result(condition, function, skip)
|
98
|
+
|
99
|
+
test.stdout()
|
100
|
+
test.stdout(run)
|
101
|
+
|
102
|
+
test.stderr()
|
103
|
+
test.stderr(run)
|
104
|
+
|
105
|
+
test.symlink(target, link)
|
106
|
+
|
107
|
+
test.banner(string)
|
108
|
+
test.banner(string, width)
|
109
|
+
|
110
|
+
test.diff(actual, expected)
|
111
|
+
|
112
|
+
test.match(actual, expected)
|
113
|
+
|
114
|
+
test.match_exact("actual 1\nactual 2\n", "expected 1\nexpected 2\n")
|
115
|
+
test.match_exact(["actual 1\n", "actual 2\n"],
|
116
|
+
["expected 1\n", "expected 2\n"])
|
117
|
+
|
118
|
+
test.match_re("actual 1\nactual 2\n", regex_string)
|
119
|
+
test.match_re(["actual 1\n", "actual 2\n"], list_of_regexes)
|
120
|
+
|
121
|
+
test.match_re_dotall("actual 1\nactual 2\n", regex_string)
|
122
|
+
test.match_re_dotall(["actual 1\n", "actual 2\n"], list_of_regexes)
|
123
|
+
|
124
|
+
test.tempdir()
|
125
|
+
test.tempdir('temporary-directory')
|
126
|
+
|
127
|
+
test.sleep()
|
128
|
+
test.sleep(seconds)
|
129
|
+
|
130
|
+
test.where_is('foo')
|
131
|
+
test.where_is('foo', 'PATH1:PATH2')
|
132
|
+
test.where_is('foo', 'PATH1;PATH2', '.suffix3;.suffix4')
|
133
|
+
|
134
|
+
test.unlink('file')
|
135
|
+
test.unlink('subdir', 'file')
|
136
|
+
|
137
|
+
The TestCmd module provides pass_test(), fail_test(), and no_result()
|
138
|
+
unbound functions that report test results for use with the Aegis change
|
139
|
+
management system. These methods terminate the test immediately,
|
140
|
+
reporting PASSED, FAILED, or NO RESULT respectively, and exiting with
|
141
|
+
status 0 (success), 1 or 2 respectively. This allows for a distinction
|
142
|
+
between an actual failed test and a test that could not be properly
|
143
|
+
evaluated because of an external condition (such as a full file system
|
144
|
+
or incorrect permissions).
|
145
|
+
|
146
|
+
import TestCmd
|
147
|
+
|
148
|
+
TestCmd.pass_test()
|
149
|
+
TestCmd.pass_test(condition)
|
150
|
+
TestCmd.pass_test(condition, function)
|
151
|
+
|
152
|
+
TestCmd.fail_test()
|
153
|
+
TestCmd.fail_test(condition)
|
154
|
+
TestCmd.fail_test(condition, function)
|
155
|
+
TestCmd.fail_test(condition, function, skip)
|
156
|
+
|
157
|
+
TestCmd.no_result()
|
158
|
+
TestCmd.no_result(condition)
|
159
|
+
TestCmd.no_result(condition, function)
|
160
|
+
TestCmd.no_result(condition, function, skip)
|
161
|
+
|
162
|
+
The TestCmd module also provides unbound functions that handle matching
|
163
|
+
in the same way as the match_*() methods described above.
|
164
|
+
|
165
|
+
import TestCmd
|
166
|
+
|
167
|
+
test = TestCmd.TestCmd(match = TestCmd.match_exact)
|
168
|
+
|
169
|
+
test = TestCmd.TestCmd(match = TestCmd.match_re)
|
170
|
+
|
171
|
+
test = TestCmd.TestCmd(match = TestCmd.match_re_dotall)
|
172
|
+
|
173
|
+
The TestCmd module provides unbound functions that can be used for the
|
174
|
+
"diff" argument to TestCmd.TestCmd instantiation:
|
175
|
+
|
176
|
+
import TestCmd
|
177
|
+
|
178
|
+
test = TestCmd.TestCmd(match = TestCmd.match_re,
|
179
|
+
diff = TestCmd.diff_re)
|
180
|
+
|
181
|
+
test = TestCmd.TestCmd(diff = TestCmd.simple_diff)
|
182
|
+
|
183
|
+
The "diff" argument can also be used with standard difflib functions:
|
184
|
+
|
185
|
+
import difflib
|
186
|
+
|
187
|
+
test = TestCmd.TestCmd(diff = difflib.context_diff)
|
188
|
+
|
189
|
+
test = TestCmd.TestCmd(diff = difflib.unified_diff)
|
190
|
+
|
191
|
+
Lastly, the where_is() method also exists in an unbound function
|
192
|
+
version.
|
193
|
+
|
194
|
+
import TestCmd
|
195
|
+
|
196
|
+
TestCmd.where_is('foo')
|
197
|
+
TestCmd.where_is('foo', 'PATH1:PATH2')
|
198
|
+
TestCmd.where_is('foo', 'PATH1;PATH2', '.suffix3;.suffix4')
|
199
|
+
"""
|
200
|
+
|
201
|
+
# Copyright 2000-2010 Steven Knight
|
202
|
+
# This module is free software, and you may redistribute it and/or modify
|
203
|
+
# it under the same terms as Python itself, so long as this copyright message
|
204
|
+
# and disclaimer are retained in their original form.
|
205
|
+
#
|
206
|
+
# IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
|
207
|
+
# SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF
|
208
|
+
# THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
209
|
+
# DAMAGE.
|
210
|
+
#
|
211
|
+
# THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
|
212
|
+
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
213
|
+
# PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS,
|
214
|
+
# AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
|
215
|
+
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
216
|
+
|
217
|
+
__author__ = "Steven Knight <knight at baldmt dot com>"
|
218
|
+
__revision__ = "TestCmd.py 0.37.D001 2010/01/11 16:55:50 knight"
|
219
|
+
__version__ = "0.37"
|
220
|
+
|
221
|
+
import errno
|
222
|
+
import os
|
223
|
+
import os.path
|
224
|
+
import re
|
225
|
+
import shutil
|
226
|
+
import stat
|
227
|
+
import string
|
228
|
+
import sys
|
229
|
+
import tempfile
|
230
|
+
import time
|
231
|
+
import traceback
|
232
|
+
import types
|
233
|
+
import UserList
|
234
|
+
|
235
|
+
__all__ = [
|
236
|
+
'diff_re',
|
237
|
+
'fail_test',
|
238
|
+
'no_result',
|
239
|
+
'pass_test',
|
240
|
+
'match_exact',
|
241
|
+
'match_re',
|
242
|
+
'match_re_dotall',
|
243
|
+
'python_executable',
|
244
|
+
'TestCmd'
|
245
|
+
]
|
246
|
+
|
247
|
+
try:
|
248
|
+
import difflib
|
249
|
+
except ImportError:
|
250
|
+
__all__.append('simple_diff')
|
251
|
+
|
252
|
+
def is_List(e):
|
253
|
+
return type(e) is types.ListType \
|
254
|
+
or isinstance(e, UserList.UserList)
|
255
|
+
|
256
|
+
try:
|
257
|
+
from UserString import UserString
|
258
|
+
except ImportError:
|
259
|
+
class UserString:
|
260
|
+
pass
|
261
|
+
|
262
|
+
if hasattr(types, 'UnicodeType'):
|
263
|
+
def is_String(e):
|
264
|
+
return type(e) is types.StringType \
|
265
|
+
or type(e) is types.UnicodeType \
|
266
|
+
or isinstance(e, UserString)
|
267
|
+
else:
|
268
|
+
def is_String(e):
|
269
|
+
return type(e) is types.StringType or isinstance(e, UserString)
|
270
|
+
|
271
|
+
tempfile.template = 'testcmd.'
|
272
|
+
if os.name in ('posix', 'nt'):
|
273
|
+
tempfile.template = 'testcmd.' + str(os.getpid()) + '.'
|
274
|
+
else:
|
275
|
+
tempfile.template = 'testcmd.'
|
276
|
+
|
277
|
+
re_space = re.compile('\s')
|
278
|
+
|
279
|
+
_Cleanup = []
|
280
|
+
|
281
|
+
_chain_to_exitfunc = None
|
282
|
+
|
283
|
+
def _clean():
|
284
|
+
global _Cleanup
|
285
|
+
cleanlist = filter(None, _Cleanup)
|
286
|
+
del _Cleanup[:]
|
287
|
+
cleanlist.reverse()
|
288
|
+
for test in cleanlist:
|
289
|
+
test.cleanup()
|
290
|
+
if _chain_to_exitfunc:
|
291
|
+
_chain_to_exitfunc()
|
292
|
+
|
293
|
+
try:
|
294
|
+
import atexit
|
295
|
+
except ImportError:
|
296
|
+
# TODO(1.5): atexit requires python 2.0, so chain sys.exitfunc
|
297
|
+
try:
|
298
|
+
_chain_to_exitfunc = sys.exitfunc
|
299
|
+
except AttributeError:
|
300
|
+
pass
|
301
|
+
sys.exitfunc = _clean
|
302
|
+
else:
|
303
|
+
atexit.register(_clean)
|
304
|
+
|
305
|
+
try:
|
306
|
+
zip
|
307
|
+
except NameError:
|
308
|
+
def zip(*lists):
|
309
|
+
result = []
|
310
|
+
for i in xrange(min(map(len, lists))):
|
311
|
+
result.append(tuple(map(lambda l, i=i: l[i], lists)))
|
312
|
+
return result
|
313
|
+
|
314
|
+
class Collector:
|
315
|
+
def __init__(self, top):
|
316
|
+
self.entries = [top]
|
317
|
+
def __call__(self, arg, dirname, names):
|
318
|
+
pathjoin = lambda n, d=dirname: os.path.join(d, n)
|
319
|
+
self.entries.extend(map(pathjoin, names))
|
320
|
+
|
321
|
+
def _caller(tblist, skip):
|
322
|
+
string = ""
|
323
|
+
arr = []
|
324
|
+
for file, line, name, text in tblist:
|
325
|
+
if file[-10:] == "TestCmd.py":
|
326
|
+
break
|
327
|
+
arr = [(file, line, name, text)] + arr
|
328
|
+
atfrom = "at"
|
329
|
+
for file, line, name, text in arr[skip:]:
|
330
|
+
if name in ("?", "<module>"):
|
331
|
+
name = ""
|
332
|
+
else:
|
333
|
+
name = " (" + name + ")"
|
334
|
+
string = string + ("%s line %d of %s%s\n" % (atfrom, line, file, name))
|
335
|
+
atfrom = "\tfrom"
|
336
|
+
return string
|
337
|
+
|
338
|
+
def fail_test(self = None, condition = 1, function = None, skip = 0):
|
339
|
+
"""Cause the test to fail.
|
340
|
+
|
341
|
+
By default, the fail_test() method reports that the test FAILED
|
342
|
+
and exits with a status of 1. If a condition argument is supplied,
|
343
|
+
the test fails only if the condition is true.
|
344
|
+
"""
|
345
|
+
if not condition:
|
346
|
+
return
|
347
|
+
if not function is None:
|
348
|
+
function()
|
349
|
+
of = ""
|
350
|
+
desc = ""
|
351
|
+
sep = " "
|
352
|
+
if not self is None:
|
353
|
+
if self.program:
|
354
|
+
of = " of " + self.program
|
355
|
+
sep = "\n\t"
|
356
|
+
if self.description:
|
357
|
+
desc = " [" + self.description + "]"
|
358
|
+
sep = "\n\t"
|
359
|
+
|
360
|
+
at = _caller(traceback.extract_stack(), skip)
|
361
|
+
sys.stderr.write("FAILED test" + of + desc + sep + at)
|
362
|
+
|
363
|
+
sys.exit(1)
|
364
|
+
|
365
|
+
def no_result(self = None, condition = 1, function = None, skip = 0):
|
366
|
+
"""Causes a test to exit with no valid result.
|
367
|
+
|
368
|
+
By default, the no_result() method reports NO RESULT for the test
|
369
|
+
and exits with a status of 2. If a condition argument is supplied,
|
370
|
+
the test fails only if the condition is true.
|
371
|
+
"""
|
372
|
+
if not condition:
|
373
|
+
return
|
374
|
+
if not function is None:
|
375
|
+
function()
|
376
|
+
of = ""
|
377
|
+
desc = ""
|
378
|
+
sep = " "
|
379
|
+
if not self is None:
|
380
|
+
if self.program:
|
381
|
+
of = " of " + self.program
|
382
|
+
sep = "\n\t"
|
383
|
+
if self.description:
|
384
|
+
desc = " [" + self.description + "]"
|
385
|
+
sep = "\n\t"
|
386
|
+
|
387
|
+
if os.environ.get('TESTCMD_DEBUG_SKIPS'):
|
388
|
+
at = _caller(traceback.extract_stack(), skip)
|
389
|
+
sys.stderr.write("NO RESULT for test" + of + desc + sep + at)
|
390
|
+
else:
|
391
|
+
sys.stderr.write("NO RESULT\n")
|
392
|
+
|
393
|
+
sys.exit(2)
|
394
|
+
|
395
|
+
def pass_test(self = None, condition = 1, function = None):
|
396
|
+
"""Causes a test to pass.
|
397
|
+
|
398
|
+
By default, the pass_test() method reports PASSED for the test
|
399
|
+
and exits with a status of 0. If a condition argument is supplied,
|
400
|
+
the test passes only if the condition is true.
|
401
|
+
"""
|
402
|
+
if not condition:
|
403
|
+
return
|
404
|
+
if not function is None:
|
405
|
+
function()
|
406
|
+
sys.stderr.write("PASSED\n")
|
407
|
+
sys.exit(0)
|
408
|
+
|
409
|
+
def match_exact(lines = None, matches = None):
|
410
|
+
"""
|
411
|
+
"""
|
412
|
+
if not is_List(lines):
|
413
|
+
lines = string.split(lines, "\n")
|
414
|
+
if not is_List(matches):
|
415
|
+
matches = string.split(matches, "\n")
|
416
|
+
if len(lines) != len(matches):
|
417
|
+
return
|
418
|
+
for i in range(len(lines)):
|
419
|
+
if lines[i] != matches[i]:
|
420
|
+
return
|
421
|
+
return 1
|
422
|
+
|
423
|
+
def match_re(lines = None, res = None):
|
424
|
+
"""
|
425
|
+
"""
|
426
|
+
if not is_List(lines):
|
427
|
+
lines = string.split(lines, "\n")
|
428
|
+
if not is_List(res):
|
429
|
+
res = string.split(res, "\n")
|
430
|
+
if len(lines) != len(res):
|
431
|
+
return
|
432
|
+
for i in range(len(lines)):
|
433
|
+
s = "^" + res[i] + "$"
|
434
|
+
try:
|
435
|
+
expr = re.compile(s)
|
436
|
+
except re.error, e:
|
437
|
+
msg = "Regular expression error in %s: %s"
|
438
|
+
raise re.error, msg % (repr(s), e[0])
|
439
|
+
if not expr.search(lines[i]):
|
440
|
+
return
|
441
|
+
return 1
|
442
|
+
|
443
|
+
def match_re_dotall(lines = None, res = None):
|
444
|
+
"""
|
445
|
+
"""
|
446
|
+
if not type(lines) is type(""):
|
447
|
+
lines = string.join(lines, "\n")
|
448
|
+
if not type(res) is type(""):
|
449
|
+
res = string.join(res, "\n")
|
450
|
+
s = "^" + res + "$"
|
451
|
+
try:
|
452
|
+
expr = re.compile(s, re.DOTALL)
|
453
|
+
except re.error, e:
|
454
|
+
msg = "Regular expression error in %s: %s"
|
455
|
+
raise re.error, msg % (repr(s), e[0])
|
456
|
+
if expr.match(lines):
|
457
|
+
return 1
|
458
|
+
|
459
|
+
try:
|
460
|
+
import difflib
|
461
|
+
except ImportError:
|
462
|
+
pass
|
463
|
+
else:
|
464
|
+
def simple_diff(a, b, fromfile='', tofile='',
|
465
|
+
fromfiledate='', tofiledate='', n=3, lineterm='\n'):
|
466
|
+
"""
|
467
|
+
A function with the same calling signature as difflib.context_diff
|
468
|
+
(diff -c) and difflib.unified_diff (diff -u) but which prints
|
469
|
+
output like the simple, unadorned 'diff" command.
|
470
|
+
"""
|
471
|
+
sm = difflib.SequenceMatcher(None, a, b)
|
472
|
+
def comma(x1, x2):
|
473
|
+
return x1+1 == x2 and str(x2) or '%s,%s' % (x1+1, x2)
|
474
|
+
result = []
|
475
|
+
for op, a1, a2, b1, b2 in sm.get_opcodes():
|
476
|
+
if op == 'delete':
|
477
|
+
result.append("%sd%d" % (comma(a1, a2), b1))
|
478
|
+
result.extend(map(lambda l: '< ' + l, a[a1:a2]))
|
479
|
+
elif op == 'insert':
|
480
|
+
result.append("%da%s" % (a1, comma(b1, b2)))
|
481
|
+
result.extend(map(lambda l: '> ' + l, b[b1:b2]))
|
482
|
+
elif op == 'replace':
|
483
|
+
result.append("%sc%s" % (comma(a1, a2), comma(b1, b2)))
|
484
|
+
result.extend(map(lambda l: '< ' + l, a[a1:a2]))
|
485
|
+
result.append('---')
|
486
|
+
result.extend(map(lambda l: '> ' + l, b[b1:b2]))
|
487
|
+
return result
|
488
|
+
|
489
|
+
def diff_re(a, b, fromfile='', tofile='',
|
490
|
+
fromfiledate='', tofiledate='', n=3, lineterm='\n'):
|
491
|
+
"""
|
492
|
+
A simple "diff" of two sets of lines when the expected lines
|
493
|
+
are regular expressions. This is a really dumb thing that
|
494
|
+
just compares each line in turn, so it doesn't look for
|
495
|
+
chunks of matching lines and the like--but at least it lets
|
496
|
+
you know exactly which line first didn't compare correctl...
|
497
|
+
"""
|
498
|
+
result = []
|
499
|
+
diff = len(a) - len(b)
|
500
|
+
if diff < 0:
|
501
|
+
a = a + ['']*(-diff)
|
502
|
+
elif diff > 0:
|
503
|
+
b = b + ['']*diff
|
504
|
+
i = 0
|
505
|
+
for aline, bline in zip(a, b):
|
506
|
+
s = "^" + aline + "$"
|
507
|
+
try:
|
508
|
+
expr = re.compile(s)
|
509
|
+
except re.error, e:
|
510
|
+
msg = "Regular expression error in %s: %s"
|
511
|
+
raise re.error, msg % (repr(s), e[0])
|
512
|
+
if not expr.search(bline):
|
513
|
+
result.append("%sc%s" % (i+1, i+1))
|
514
|
+
result.append('< ' + repr(a[i]))
|
515
|
+
result.append('---')
|
516
|
+
result.append('> ' + repr(b[i]))
|
517
|
+
i = i+1
|
518
|
+
return result
|
519
|
+
|
520
|
+
if os.name == 'java':
|
521
|
+
|
522
|
+
python_executable = os.path.join(sys.prefix, 'jython')
|
523
|
+
|
524
|
+
else:
|
525
|
+
|
526
|
+
python_executable = sys.executable
|
527
|
+
|
528
|
+
if sys.platform == 'win32':
|
529
|
+
|
530
|
+
default_sleep_seconds = 2
|
531
|
+
|
532
|
+
def where_is(file, path=None, pathext=None):
|
533
|
+
if path is None:
|
534
|
+
path = os.environ['PATH']
|
535
|
+
if is_String(path):
|
536
|
+
path = string.split(path, os.pathsep)
|
537
|
+
if pathext is None:
|
538
|
+
pathext = os.environ['PATHEXT']
|
539
|
+
if is_String(pathext):
|
540
|
+
pathext = string.split(pathext, os.pathsep)
|
541
|
+
for ext in pathext:
|
542
|
+
if string.lower(ext) == string.lower(file[-len(ext):]):
|
543
|
+
pathext = ['']
|
544
|
+
break
|
545
|
+
for dir in path:
|
546
|
+
f = os.path.join(dir, file)
|
547
|
+
for ext in pathext:
|
548
|
+
fext = f + ext
|
549
|
+
if os.path.isfile(fext):
|
550
|
+
return fext
|
551
|
+
return None
|
552
|
+
|
553
|
+
else:
|
554
|
+
|
555
|
+
def where_is(file, path=None, pathext=None):
|
556
|
+
if path is None:
|
557
|
+
path = os.environ['PATH']
|
558
|
+
if is_String(path):
|
559
|
+
path = string.split(path, os.pathsep)
|
560
|
+
for dir in path:
|
561
|
+
f = os.path.join(dir, file)
|
562
|
+
if os.path.isfile(f):
|
563
|
+
try:
|
564
|
+
st = os.stat(f)
|
565
|
+
except OSError:
|
566
|
+
continue
|
567
|
+
if stat.S_IMODE(st[stat.ST_MODE]) & 0111:
|
568
|
+
return f
|
569
|
+
return None
|
570
|
+
|
571
|
+
default_sleep_seconds = 1
|
572
|
+
|
573
|
+
|
574
|
+
|
575
|
+
try:
|
576
|
+
import subprocess
|
577
|
+
except ImportError:
|
578
|
+
# The subprocess module doesn't exist in this version of Python,
|
579
|
+
# so we're going to cobble up something that looks just enough
|
580
|
+
# like its API for our purposes below.
|
581
|
+
import new
|
582
|
+
|
583
|
+
subprocess = new.module('subprocess')
|
584
|
+
|
585
|
+
subprocess.PIPE = 'PIPE'
|
586
|
+
subprocess.STDOUT = 'STDOUT'
|
587
|
+
subprocess.mswindows = (sys.platform == 'win32')
|
588
|
+
|
589
|
+
try:
|
590
|
+
import popen2
|
591
|
+
popen2.Popen3
|
592
|
+
except AttributeError:
|
593
|
+
class Popen3:
|
594
|
+
universal_newlines = 1
|
595
|
+
def __init__(self, command, **kw):
|
596
|
+
if sys.platform == 'win32' and command[0] == '"':
|
597
|
+
command = '"' + command + '"'
|
598
|
+
(stdin, stdout, stderr) = os.popen3(' ' + command)
|
599
|
+
self.stdin = stdin
|
600
|
+
self.stdout = stdout
|
601
|
+
self.stderr = stderr
|
602
|
+
def close_output(self):
|
603
|
+
self.stdout.close()
|
604
|
+
self.resultcode = self.stderr.close()
|
605
|
+
def wait(self):
|
606
|
+
resultcode = self.resultcode
|
607
|
+
if os.WIFEXITED(resultcode):
|
608
|
+
return os.WEXITSTATUS(resultcode)
|
609
|
+
elif os.WIFSIGNALED(resultcode):
|
610
|
+
return os.WTERMSIG(resultcode)
|
611
|
+
else:
|
612
|
+
return None
|
613
|
+
|
614
|
+
else:
|
615
|
+
try:
|
616
|
+
popen2.Popen4
|
617
|
+
except AttributeError:
|
618
|
+
# A cribbed Popen4 class, with some retrofitted code from
|
619
|
+
# the Python 1.5 Popen3 class methods to do certain things
|
620
|
+
# by hand.
|
621
|
+
class Popen4(popen2.Popen3):
|
622
|
+
childerr = None
|
623
|
+
|
624
|
+
def __init__(self, cmd, bufsize=-1):
|
625
|
+
p2cread, p2cwrite = os.pipe()
|
626
|
+
c2pread, c2pwrite = os.pipe()
|
627
|
+
self.pid = os.fork()
|
628
|
+
if self.pid == 0:
|
629
|
+
# Child
|
630
|
+
os.dup2(p2cread, 0)
|
631
|
+
os.dup2(c2pwrite, 1)
|
632
|
+
os.dup2(c2pwrite, 2)
|
633
|
+
for i in range(3, popen2.MAXFD):
|
634
|
+
try:
|
635
|
+
os.close(i)
|
636
|
+
except: pass
|
637
|
+
try:
|
638
|
+
os.execvp(cmd[0], cmd)
|
639
|
+
finally:
|
640
|
+
os._exit(1)
|
641
|
+
# Shouldn't come here, I guess
|
642
|
+
os._exit(1)
|
643
|
+
os.close(p2cread)
|
644
|
+
self.tochild = os.fdopen(p2cwrite, 'w', bufsize)
|
645
|
+
os.close(c2pwrite)
|
646
|
+
self.fromchild = os.fdopen(c2pread, 'r', bufsize)
|
647
|
+
popen2._active.append(self)
|
648
|
+
|
649
|
+
popen2.Popen4 = Popen4
|
650
|
+
|
651
|
+
class Popen3(popen2.Popen3, popen2.Popen4):
|
652
|
+
universal_newlines = 1
|
653
|
+
def __init__(self, command, **kw):
|
654
|
+
if kw.get('stderr') == 'STDOUT':
|
655
|
+
apply(popen2.Popen4.__init__, (self, command, 1))
|
656
|
+
else:
|
657
|
+
apply(popen2.Popen3.__init__, (self, command, 1))
|
658
|
+
self.stdin = self.tochild
|
659
|
+
self.stdout = self.fromchild
|
660
|
+
self.stderr = self.childerr
|
661
|
+
def wait(self, *args, **kw):
|
662
|
+
resultcode = apply(popen2.Popen3.wait, (self,)+args, kw)
|
663
|
+
if os.WIFEXITED(resultcode):
|
664
|
+
return os.WEXITSTATUS(resultcode)
|
665
|
+
elif os.WIFSIGNALED(resultcode):
|
666
|
+
return os.WTERMSIG(resultcode)
|
667
|
+
else:
|
668
|
+
return None
|
669
|
+
|
670
|
+
subprocess.Popen = Popen3
|
671
|
+
|
672
|
+
|
673
|
+
|
674
|
+
# From Josiah Carlson,
|
675
|
+
# ASPN : Python Cookbook : Module to allow Asynchronous subprocess use on Windows and Posix platforms
|
676
|
+
# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440554
|
677
|
+
|
678
|
+
PIPE = subprocess.PIPE
|
679
|
+
|
680
|
+
if subprocess.mswindows:
|
681
|
+
from win32file import ReadFile, WriteFile
|
682
|
+
from win32pipe import PeekNamedPipe
|
683
|
+
import msvcrt
|
684
|
+
else:
|
685
|
+
import select
|
686
|
+
import fcntl
|
687
|
+
|
688
|
+
try: fcntl.F_GETFL
|
689
|
+
except AttributeError: fcntl.F_GETFL = 3
|
690
|
+
|
691
|
+
try: fcntl.F_SETFL
|
692
|
+
except AttributeError: fcntl.F_SETFL = 4
|
693
|
+
|
694
|
+
class Popen(subprocess.Popen):
|
695
|
+
def recv(self, maxsize=None):
|
696
|
+
return self._recv('stdout', maxsize)
|
697
|
+
|
698
|
+
def recv_err(self, maxsize=None):
|
699
|
+
return self._recv('stderr', maxsize)
|
700
|
+
|
701
|
+
def send_recv(self, input='', maxsize=None):
|
702
|
+
return self.send(input), self.recv(maxsize), self.recv_err(maxsize)
|
703
|
+
|
704
|
+
def get_conn_maxsize(self, which, maxsize):
|
705
|
+
if maxsize is None:
|
706
|
+
maxsize = 1024
|
707
|
+
elif maxsize < 1:
|
708
|
+
maxsize = 1
|
709
|
+
return getattr(self, which), maxsize
|
710
|
+
|
711
|
+
def _close(self, which):
|
712
|
+
getattr(self, which).close()
|
713
|
+
setattr(self, which, None)
|
714
|
+
|
715
|
+
if subprocess.mswindows:
|
716
|
+
def send(self, input):
|
717
|
+
if not self.stdin:
|
718
|
+
return None
|
719
|
+
|
720
|
+
try:
|
721
|
+
x = msvcrt.get_osfhandle(self.stdin.fileno())
|
722
|
+
(errCode, written) = WriteFile(x, input)
|
723
|
+
except ValueError:
|
724
|
+
return self._close('stdin')
|
725
|
+
except (subprocess.pywintypes.error, Exception), why:
|
726
|
+
if why[0] in (109, errno.ESHUTDOWN):
|
727
|
+
return self._close('stdin')
|
728
|
+
raise
|
729
|
+
|
730
|
+
return written
|
731
|
+
|
732
|
+
def _recv(self, which, maxsize):
|
733
|
+
conn, maxsize = self.get_conn_maxsize(which, maxsize)
|
734
|
+
if conn is None:
|
735
|
+
return None
|
736
|
+
|
737
|
+
try:
|
738
|
+
x = msvcrt.get_osfhandle(conn.fileno())
|
739
|
+
(read, nAvail, nMessage) = PeekNamedPipe(x, 0)
|
740
|
+
if maxsize < nAvail:
|
741
|
+
nAvail = maxsize
|
742
|
+
if nAvail > 0:
|
743
|
+
(errCode, read) = ReadFile(x, nAvail, None)
|
744
|
+
except ValueError:
|
745
|
+
return self._close(which)
|
746
|
+
except (subprocess.pywintypes.error, Exception), why:
|
747
|
+
if why[0] in (109, errno.ESHUTDOWN):
|
748
|
+
return self._close(which)
|
749
|
+
raise
|
750
|
+
|
751
|
+
#if self.universal_newlines:
|
752
|
+
# read = self._translate_newlines(read)
|
753
|
+
return read
|
754
|
+
|
755
|
+
else:
|
756
|
+
def send(self, input):
|
757
|
+
if not self.stdin:
|
758
|
+
return None
|
759
|
+
|
760
|
+
if not select.select([], [self.stdin], [], 0)[1]:
|
761
|
+
return 0
|
762
|
+
|
763
|
+
try:
|
764
|
+
written = os.write(self.stdin.fileno(), input)
|
765
|
+
except OSError, why:
|
766
|
+
if why[0] == errno.EPIPE: #broken pipe
|
767
|
+
return self._close('stdin')
|
768
|
+
raise
|
769
|
+
|
770
|
+
return written
|
771
|
+
|
772
|
+
def _recv(self, which, maxsize):
|
773
|
+
conn, maxsize = self.get_conn_maxsize(which, maxsize)
|
774
|
+
if conn is None:
|
775
|
+
return None
|
776
|
+
|
777
|
+
try:
|
778
|
+
flags = fcntl.fcntl(conn, fcntl.F_GETFL)
|
779
|
+
except TypeError:
|
780
|
+
flags = None
|
781
|
+
else:
|
782
|
+
if not conn.closed:
|
783
|
+
fcntl.fcntl(conn, fcntl.F_SETFL, flags| os.O_NONBLOCK)
|
784
|
+
|
785
|
+
try:
|
786
|
+
if not select.select([conn], [], [], 0)[0]:
|
787
|
+
return ''
|
788
|
+
|
789
|
+
r = conn.read(maxsize)
|
790
|
+
if not r:
|
791
|
+
return self._close(which)
|
792
|
+
|
793
|
+
#if self.universal_newlines:
|
794
|
+
# r = self._translate_newlines(r)
|
795
|
+
return r
|
796
|
+
finally:
|
797
|
+
if not conn.closed and not flags is None:
|
798
|
+
fcntl.fcntl(conn, fcntl.F_SETFL, flags)
|
799
|
+
|
800
|
+
disconnect_message = "Other end disconnected!"
|
801
|
+
|
802
|
+
def recv_some(p, t=.1, e=1, tr=5, stderr=0):
|
803
|
+
if tr < 1:
|
804
|
+
tr = 1
|
805
|
+
x = time.time()+t
|
806
|
+
y = []
|
807
|
+
r = ''
|
808
|
+
pr = p.recv
|
809
|
+
if stderr:
|
810
|
+
pr = p.recv_err
|
811
|
+
while time.time() < x or r:
|
812
|
+
r = pr()
|
813
|
+
if r is None:
|
814
|
+
if e:
|
815
|
+
raise Exception(disconnect_message)
|
816
|
+
else:
|
817
|
+
break
|
818
|
+
elif r:
|
819
|
+
y.append(r)
|
820
|
+
else:
|
821
|
+
time.sleep(max((x-time.time())/tr, 0))
|
822
|
+
return ''.join(y)
|
823
|
+
|
824
|
+
# TODO(3.0: rewrite to use memoryview()
|
825
|
+
def send_all(p, data):
|
826
|
+
while len(data):
|
827
|
+
sent = p.send(data)
|
828
|
+
if sent is None:
|
829
|
+
raise Exception(disconnect_message)
|
830
|
+
data = buffer(data, sent)
|
831
|
+
|
832
|
+
|
833
|
+
|
834
|
+
try:
|
835
|
+
object
|
836
|
+
except NameError:
|
837
|
+
class object:
|
838
|
+
pass
|
839
|
+
|
840
|
+
|
841
|
+
|
842
|
+
class TestCmd(object):
|
843
|
+
"""Class TestCmd
|
844
|
+
"""
|
845
|
+
|
846
|
+
def __init__(self, description = None,
|
847
|
+
program = None,
|
848
|
+
interpreter = None,
|
849
|
+
workdir = None,
|
850
|
+
subdir = None,
|
851
|
+
verbose = None,
|
852
|
+
match = None,
|
853
|
+
diff = None,
|
854
|
+
combine = 0,
|
855
|
+
universal_newlines = 1):
|
856
|
+
self._cwd = os.getcwd()
|
857
|
+
self.description_set(description)
|
858
|
+
self.program_set(program)
|
859
|
+
self.interpreter_set(interpreter)
|
860
|
+
if verbose is None:
|
861
|
+
try:
|
862
|
+
verbose = max( 0, int(os.environ.get('TESTCMD_VERBOSE', 0)) )
|
863
|
+
except ValueError:
|
864
|
+
verbose = 0
|
865
|
+
self.verbose_set(verbose)
|
866
|
+
self.combine = combine
|
867
|
+
self.universal_newlines = universal_newlines
|
868
|
+
if match is not None:
|
869
|
+
self.match_function = match
|
870
|
+
else:
|
871
|
+
self.match_function = match_re
|
872
|
+
if diff is not None:
|
873
|
+
self.diff_function = diff
|
874
|
+
else:
|
875
|
+
try:
|
876
|
+
difflib
|
877
|
+
except NameError:
|
878
|
+
pass
|
879
|
+
else:
|
880
|
+
self.diff_function = simple_diff
|
881
|
+
#self.diff_function = difflib.context_diff
|
882
|
+
#self.diff_function = difflib.unified_diff
|
883
|
+
self._dirlist = []
|
884
|
+
self._preserve = {'pass_test': 0, 'fail_test': 0, 'no_result': 0}
|
885
|
+
if os.environ.has_key('PRESERVE') and not os.environ['PRESERVE'] is '':
|
886
|
+
self._preserve['pass_test'] = os.environ['PRESERVE']
|
887
|
+
self._preserve['fail_test'] = os.environ['PRESERVE']
|
888
|
+
self._preserve['no_result'] = os.environ['PRESERVE']
|
889
|
+
else:
|
890
|
+
try:
|
891
|
+
self._preserve['pass_test'] = os.environ['PRESERVE_PASS']
|
892
|
+
except KeyError:
|
893
|
+
pass
|
894
|
+
try:
|
895
|
+
self._preserve['fail_test'] = os.environ['PRESERVE_FAIL']
|
896
|
+
except KeyError:
|
897
|
+
pass
|
898
|
+
try:
|
899
|
+
self._preserve['no_result'] = os.environ['PRESERVE_NO_RESULT']
|
900
|
+
except KeyError:
|
901
|
+
pass
|
902
|
+
self._stdout = []
|
903
|
+
self._stderr = []
|
904
|
+
self.status = None
|
905
|
+
self.condition = 'no_result'
|
906
|
+
self.workdir_set(workdir)
|
907
|
+
self.subdir(subdir)
|
908
|
+
|
909
|
+
def __del__(self):
|
910
|
+
self.cleanup()
|
911
|
+
|
912
|
+
def __repr__(self):
|
913
|
+
return "%x" % id(self)
|
914
|
+
|
915
|
+
banner_char = '='
|
916
|
+
banner_width = 80
|
917
|
+
|
918
|
+
def banner(self, s, width=None):
|
919
|
+
if width is None:
|
920
|
+
width = self.banner_width
|
921
|
+
return s + self.banner_char * (width - len(s))
|
922
|
+
|
923
|
+
if os.name == 'posix':
|
924
|
+
|
925
|
+
def escape(self, arg):
|
926
|
+
"escape shell special characters"
|
927
|
+
slash = '\\'
|
928
|
+
special = '"$'
|
929
|
+
|
930
|
+
arg = string.replace(arg, slash, slash+slash)
|
931
|
+
for c in special:
|
932
|
+
arg = string.replace(arg, c, slash+c)
|
933
|
+
|
934
|
+
if re_space.search(arg):
|
935
|
+
arg = '"' + arg + '"'
|
936
|
+
return arg
|
937
|
+
|
938
|
+
else:
|
939
|
+
|
940
|
+
# Windows does not allow special characters in file names
|
941
|
+
# anyway, so no need for an escape function, we will just quote
|
942
|
+
# the arg.
|
943
|
+
def escape(self, arg):
|
944
|
+
if re_space.search(arg):
|
945
|
+
arg = '"' + arg + '"'
|
946
|
+
return arg
|
947
|
+
|
948
|
+
def canonicalize(self, path):
|
949
|
+
if is_List(path):
|
950
|
+
path = apply(os.path.join, tuple(path))
|
951
|
+
if not os.path.isabs(path):
|
952
|
+
path = os.path.join(self.workdir, path)
|
953
|
+
return path
|
954
|
+
|
955
|
+
def chmod(self, path, mode):
|
956
|
+
"""Changes permissions on the specified file or directory
|
957
|
+
path name."""
|
958
|
+
path = self.canonicalize(path)
|
959
|
+
os.chmod(path, mode)
|
960
|
+
|
961
|
+
def cleanup(self, condition = None):
|
962
|
+
"""Removes any temporary working directories for the specified
|
963
|
+
TestCmd environment. If the environment variable PRESERVE was
|
964
|
+
set when the TestCmd environment was created, temporary working
|
965
|
+
directories are not removed. If any of the environment variables
|
966
|
+
PRESERVE_PASS, PRESERVE_FAIL, or PRESERVE_NO_RESULT were set
|
967
|
+
when the TestCmd environment was created, then temporary working
|
968
|
+
directories are not removed if the test passed, failed, or had
|
969
|
+
no result, respectively. Temporary working directories are also
|
970
|
+
preserved for conditions specified via the preserve method.
|
971
|
+
|
972
|
+
Typically, this method is not called directly, but is used when
|
973
|
+
the script exits to clean up temporary working directories as
|
974
|
+
appropriate for the exit status.
|
975
|
+
"""
|
976
|
+
if not self._dirlist:
|
977
|
+
return
|
978
|
+
os.chdir(self._cwd)
|
979
|
+
self.workdir = None
|
980
|
+
if condition is None:
|
981
|
+
condition = self.condition
|
982
|
+
if self._preserve[condition]:
|
983
|
+
for dir in self._dirlist:
|
984
|
+
print "Preserved directory", dir
|
985
|
+
else:
|
986
|
+
list = self._dirlist[:]
|
987
|
+
list.reverse()
|
988
|
+
for dir in list:
|
989
|
+
self.writable(dir, 1)
|
990
|
+
shutil.rmtree(dir, ignore_errors = 1)
|
991
|
+
self._dirlist = []
|
992
|
+
|
993
|
+
try:
|
994
|
+
global _Cleanup
|
995
|
+
_Cleanup.remove(self)
|
996
|
+
except (AttributeError, ValueError):
|
997
|
+
pass
|
998
|
+
|
999
|
+
def command_args(self, program = None,
|
1000
|
+
interpreter = None,
|
1001
|
+
arguments = None):
|
1002
|
+
if program:
|
1003
|
+
if type(program) == type('') and not os.path.isabs(program):
|
1004
|
+
program = os.path.join(self._cwd, program)
|
1005
|
+
else:
|
1006
|
+
program = self.program
|
1007
|
+
if not interpreter:
|
1008
|
+
interpreter = self.interpreter
|
1009
|
+
if not type(program) in [type([]), type(())]:
|
1010
|
+
program = [program]
|
1011
|
+
cmd = list(program)
|
1012
|
+
if interpreter:
|
1013
|
+
if not type(interpreter) in [type([]), type(())]:
|
1014
|
+
interpreter = [interpreter]
|
1015
|
+
cmd = list(interpreter) + cmd
|
1016
|
+
if arguments:
|
1017
|
+
if type(arguments) == type(''):
|
1018
|
+
arguments = string.split(arguments)
|
1019
|
+
cmd.extend(arguments)
|
1020
|
+
return cmd
|
1021
|
+
|
1022
|
+
def description_set(self, description):
|
1023
|
+
"""Set the description of the functionality being tested.
|
1024
|
+
"""
|
1025
|
+
self.description = description
|
1026
|
+
|
1027
|
+
try:
|
1028
|
+
difflib
|
1029
|
+
except NameError:
|
1030
|
+
def diff(self, a, b, name, *args, **kw):
|
1031
|
+
print self.banner('Expected %s' % name)
|
1032
|
+
print a
|
1033
|
+
print self.banner('Actual %s' % name)
|
1034
|
+
print b
|
1035
|
+
else:
|
1036
|
+
def diff(self, a, b, name, *args, **kw):
|
1037
|
+
print self.banner(name)
|
1038
|
+
args = (a.splitlines(), b.splitlines()) + args
|
1039
|
+
lines = apply(self.diff_function, args, kw)
|
1040
|
+
for l in lines:
|
1041
|
+
print l
|
1042
|
+
|
1043
|
+
def fail_test(self, condition = 1, function = None, skip = 0):
|
1044
|
+
"""Cause the test to fail.
|
1045
|
+
"""
|
1046
|
+
if not condition:
|
1047
|
+
return
|
1048
|
+
self.condition = 'fail_test'
|
1049
|
+
fail_test(self = self,
|
1050
|
+
condition = condition,
|
1051
|
+
function = function,
|
1052
|
+
skip = skip)
|
1053
|
+
|
1054
|
+
def interpreter_set(self, interpreter):
|
1055
|
+
"""Set the program to be used to interpret the program
|
1056
|
+
under test as a script.
|
1057
|
+
"""
|
1058
|
+
self.interpreter = interpreter
|
1059
|
+
|
1060
|
+
def match(self, lines, matches):
|
1061
|
+
"""Compare actual and expected file contents.
|
1062
|
+
"""
|
1063
|
+
return self.match_function(lines, matches)
|
1064
|
+
|
1065
|
+
def match_exact(self, lines, matches):
|
1066
|
+
"""Compare actual and expected file contents.
|
1067
|
+
"""
|
1068
|
+
return match_exact(lines, matches)
|
1069
|
+
|
1070
|
+
def match_re(self, lines, res):
|
1071
|
+
"""Compare actual and expected file contents.
|
1072
|
+
"""
|
1073
|
+
return match_re(lines, res)
|
1074
|
+
|
1075
|
+
def match_re_dotall(self, lines, res):
|
1076
|
+
"""Compare actual and expected file contents.
|
1077
|
+
"""
|
1078
|
+
return match_re_dotall(lines, res)
|
1079
|
+
|
1080
|
+
def no_result(self, condition = 1, function = None, skip = 0):
|
1081
|
+
"""Report that the test could not be run.
|
1082
|
+
"""
|
1083
|
+
if not condition:
|
1084
|
+
return
|
1085
|
+
self.condition = 'no_result'
|
1086
|
+
no_result(self = self,
|
1087
|
+
condition = condition,
|
1088
|
+
function = function,
|
1089
|
+
skip = skip)
|
1090
|
+
|
1091
|
+
def pass_test(self, condition = 1, function = None):
|
1092
|
+
"""Cause the test to pass.
|
1093
|
+
"""
|
1094
|
+
if not condition:
|
1095
|
+
return
|
1096
|
+
self.condition = 'pass_test'
|
1097
|
+
pass_test(self = self, condition = condition, function = function)
|
1098
|
+
|
1099
|
+
def preserve(self, *conditions):
|
1100
|
+
"""Arrange for the temporary working directories for the
|
1101
|
+
specified TestCmd environment to be preserved for one or more
|
1102
|
+
conditions. If no conditions are specified, arranges for
|
1103
|
+
the temporary working directories to be preserved for all
|
1104
|
+
conditions.
|
1105
|
+
"""
|
1106
|
+
if conditions is ():
|
1107
|
+
conditions = ('pass_test', 'fail_test', 'no_result')
|
1108
|
+
for cond in conditions:
|
1109
|
+
self._preserve[cond] = 1
|
1110
|
+
|
1111
|
+
def program_set(self, program):
|
1112
|
+
"""Set the executable program or script to be tested.
|
1113
|
+
"""
|
1114
|
+
if program and not os.path.isabs(program):
|
1115
|
+
program = os.path.join(self._cwd, program)
|
1116
|
+
self.program = program
|
1117
|
+
|
1118
|
+
def read(self, file, mode = 'rb'):
|
1119
|
+
"""Reads and returns the contents of the specified file name.
|
1120
|
+
The file name may be a list, in which case the elements are
|
1121
|
+
concatenated with the os.path.join() method. The file is
|
1122
|
+
assumed to be under the temporary working directory unless it
|
1123
|
+
is an absolute path name. The I/O mode for the file may
|
1124
|
+
be specified; it must begin with an 'r'. The default is
|
1125
|
+
'rb' (binary read).
|
1126
|
+
"""
|
1127
|
+
file = self.canonicalize(file)
|
1128
|
+
if mode[0] != 'r':
|
1129
|
+
raise ValueError, "mode must begin with 'r'"
|
1130
|
+
with open(file, mode) as f:
|
1131
|
+
result = f.read()
|
1132
|
+
return result
|
1133
|
+
|
1134
|
+
def rmdir(self, dir):
|
1135
|
+
"""Removes the specified dir name.
|
1136
|
+
The dir name may be a list, in which case the elements are
|
1137
|
+
concatenated with the os.path.join() method. The dir is
|
1138
|
+
assumed to be under the temporary working directory unless it
|
1139
|
+
is an absolute path name.
|
1140
|
+
The dir must be empty.
|
1141
|
+
"""
|
1142
|
+
dir = self.canonicalize(dir)
|
1143
|
+
os.rmdir(dir)
|
1144
|
+
|
1145
|
+
def start(self, program = None,
|
1146
|
+
interpreter = None,
|
1147
|
+
arguments = None,
|
1148
|
+
universal_newlines = None,
|
1149
|
+
**kw):
|
1150
|
+
"""
|
1151
|
+
Starts a program or script for the test environment.
|
1152
|
+
|
1153
|
+
The specified program will have the original directory
|
1154
|
+
prepended unless it is enclosed in a [list].
|
1155
|
+
"""
|
1156
|
+
cmd = self.command_args(program, interpreter, arguments)
|
1157
|
+
cmd_string = string.join(map(self.escape, cmd), ' ')
|
1158
|
+
if self.verbose:
|
1159
|
+
sys.stderr.write(cmd_string + "\n")
|
1160
|
+
if universal_newlines is None:
|
1161
|
+
universal_newlines = self.universal_newlines
|
1162
|
+
|
1163
|
+
# On Windows, if we make stdin a pipe when we plan to send
|
1164
|
+
# no input, and the test program exits before
|
1165
|
+
# Popen calls msvcrt.open_osfhandle, that call will fail.
|
1166
|
+
# So don't use a pipe for stdin if we don't need one.
|
1167
|
+
stdin = kw.get('stdin', None)
|
1168
|
+
if stdin is not None:
|
1169
|
+
stdin = subprocess.PIPE
|
1170
|
+
|
1171
|
+
combine = kw.get('combine', self.combine)
|
1172
|
+
if combine:
|
1173
|
+
stderr_value = subprocess.STDOUT
|
1174
|
+
else:
|
1175
|
+
stderr_value = subprocess.PIPE
|
1176
|
+
|
1177
|
+
return Popen(cmd,
|
1178
|
+
stdin=stdin,
|
1179
|
+
stdout=subprocess.PIPE,
|
1180
|
+
stderr=stderr_value,
|
1181
|
+
universal_newlines=universal_newlines)
|
1182
|
+
|
1183
|
+
def finish(self, popen, **kw):
|
1184
|
+
"""
|
1185
|
+
Finishes and waits for the process being run under control of
|
1186
|
+
the specified popen argument, recording the exit status,
|
1187
|
+
standard output and error output.
|
1188
|
+
"""
|
1189
|
+
popen.stdin.close()
|
1190
|
+
self.status = popen.wait()
|
1191
|
+
if not self.status:
|
1192
|
+
self.status = 0
|
1193
|
+
self._stdout.append(popen.stdout.read())
|
1194
|
+
if popen.stderr:
|
1195
|
+
stderr = popen.stderr.read()
|
1196
|
+
else:
|
1197
|
+
stderr = ''
|
1198
|
+
self._stderr.append(stderr)
|
1199
|
+
|
1200
|
+
def run(self, program = None,
|
1201
|
+
interpreter = None,
|
1202
|
+
arguments = None,
|
1203
|
+
chdir = None,
|
1204
|
+
stdin = None,
|
1205
|
+
universal_newlines = None):
|
1206
|
+
"""Runs a test of the program or script for the test
|
1207
|
+
environment. Standard output and error output are saved for
|
1208
|
+
future retrieval via the stdout() and stderr() methods.
|
1209
|
+
|
1210
|
+
The specified program will have the original directory
|
1211
|
+
prepended unless it is enclosed in a [list].
|
1212
|
+
"""
|
1213
|
+
if chdir:
|
1214
|
+
oldcwd = os.getcwd()
|
1215
|
+
if not os.path.isabs(chdir):
|
1216
|
+
chdir = os.path.join(self.workpath(chdir))
|
1217
|
+
if self.verbose:
|
1218
|
+
sys.stderr.write("chdir(" + chdir + ")\n")
|
1219
|
+
os.chdir(chdir)
|
1220
|
+
p = self.start(program,
|
1221
|
+
interpreter,
|
1222
|
+
arguments,
|
1223
|
+
universal_newlines,
|
1224
|
+
stdin=stdin)
|
1225
|
+
if stdin:
|
1226
|
+
if is_List(stdin):
|
1227
|
+
for line in stdin:
|
1228
|
+
p.stdin.write(line)
|
1229
|
+
else:
|
1230
|
+
p.stdin.write(stdin)
|
1231
|
+
p.stdin.close()
|
1232
|
+
|
1233
|
+
out = p.stdout.read()
|
1234
|
+
if p.stderr is None:
|
1235
|
+
err = ''
|
1236
|
+
else:
|
1237
|
+
err = p.stderr.read()
|
1238
|
+
try:
|
1239
|
+
close_output = p.close_output
|
1240
|
+
except AttributeError:
|
1241
|
+
p.stdout.close()
|
1242
|
+
if not p.stderr is None:
|
1243
|
+
p.stderr.close()
|
1244
|
+
else:
|
1245
|
+
close_output()
|
1246
|
+
|
1247
|
+
self._stdout.append(out)
|
1248
|
+
self._stderr.append(err)
|
1249
|
+
|
1250
|
+
self.status = p.wait()
|
1251
|
+
if not self.status:
|
1252
|
+
self.status = 0
|
1253
|
+
|
1254
|
+
if chdir:
|
1255
|
+
os.chdir(oldcwd)
|
1256
|
+
if self.verbose >= 2:
|
1257
|
+
write = sys.stdout.write
|
1258
|
+
write('============ STATUS: %d\n' % self.status)
|
1259
|
+
out = self.stdout()
|
1260
|
+
if out or self.verbose >= 3:
|
1261
|
+
write('============ BEGIN STDOUT (len=%d):\n' % len(out))
|
1262
|
+
write(out)
|
1263
|
+
write('============ END STDOUT\n')
|
1264
|
+
err = self.stderr()
|
1265
|
+
if err or self.verbose >= 3:
|
1266
|
+
write('============ BEGIN STDERR (len=%d)\n' % len(err))
|
1267
|
+
write(err)
|
1268
|
+
write('============ END STDERR\n')
|
1269
|
+
|
1270
|
+
def sleep(self, seconds = default_sleep_seconds):
|
1271
|
+
"""Sleeps at least the specified number of seconds. If no
|
1272
|
+
number is specified, sleeps at least the minimum number of
|
1273
|
+
seconds necessary to advance file time stamps on the current
|
1274
|
+
system. Sleeping more seconds is all right.
|
1275
|
+
"""
|
1276
|
+
time.sleep(seconds)
|
1277
|
+
|
1278
|
+
def stderr(self, run = None):
|
1279
|
+
"""Returns the error output from the specified run number.
|
1280
|
+
If there is no specified run number, then returns the error
|
1281
|
+
output of the last run. If the run number is less than zero,
|
1282
|
+
then returns the error output from that many runs back from the
|
1283
|
+
current run.
|
1284
|
+
"""
|
1285
|
+
if not run:
|
1286
|
+
run = len(self._stderr)
|
1287
|
+
elif run < 0:
|
1288
|
+
run = len(self._stderr) + run
|
1289
|
+
run = run - 1
|
1290
|
+
return self._stderr[run]
|
1291
|
+
|
1292
|
+
def stdout(self, run = None):
|
1293
|
+
"""Returns the standard output from the specified run number.
|
1294
|
+
If there is no specified run number, then returns the standard
|
1295
|
+
output of the last run. If the run number is less than zero,
|
1296
|
+
then returns the standard output from that many runs back from
|
1297
|
+
the current run.
|
1298
|
+
"""
|
1299
|
+
if not run:
|
1300
|
+
run = len(self._stdout)
|
1301
|
+
elif run < 0:
|
1302
|
+
run = len(self._stdout) + run
|
1303
|
+
run = run - 1
|
1304
|
+
return self._stdout[run]
|
1305
|
+
|
1306
|
+
def subdir(self, *subdirs):
|
1307
|
+
"""Create new subdirectories under the temporary working
|
1308
|
+
directory, one for each argument. An argument may be a list,
|
1309
|
+
in which case the list elements are concatenated using the
|
1310
|
+
os.path.join() method. Subdirectories multiple levels deep
|
1311
|
+
must be created using a separate argument for each level:
|
1312
|
+
|
1313
|
+
test.subdir('sub', ['sub', 'dir'], ['sub', 'dir', 'ectory'])
|
1314
|
+
|
1315
|
+
Returns the number of subdirectories actually created.
|
1316
|
+
"""
|
1317
|
+
count = 0
|
1318
|
+
for sub in subdirs:
|
1319
|
+
if sub is None:
|
1320
|
+
continue
|
1321
|
+
if is_List(sub):
|
1322
|
+
sub = apply(os.path.join, tuple(sub))
|
1323
|
+
new = os.path.join(self.workdir, sub)
|
1324
|
+
try:
|
1325
|
+
os.mkdir(new)
|
1326
|
+
except OSError:
|
1327
|
+
pass
|
1328
|
+
else:
|
1329
|
+
count = count + 1
|
1330
|
+
return count
|
1331
|
+
|
1332
|
+
def symlink(self, target, link):
|
1333
|
+
"""Creates a symlink to the specified target.
|
1334
|
+
The link name may be a list, in which case the elements are
|
1335
|
+
concatenated with the os.path.join() method. The link is
|
1336
|
+
assumed to be under the temporary working directory unless it
|
1337
|
+
is an absolute path name. The target is *not* assumed to be
|
1338
|
+
under the temporary working directory.
|
1339
|
+
"""
|
1340
|
+
link = self.canonicalize(link)
|
1341
|
+
os.symlink(target, link)
|
1342
|
+
|
1343
|
+
def tempdir(self, path=None):
|
1344
|
+
"""Creates a temporary directory.
|
1345
|
+
A unique directory name is generated if no path name is specified.
|
1346
|
+
The directory is created, and will be removed when the TestCmd
|
1347
|
+
object is destroyed.
|
1348
|
+
"""
|
1349
|
+
if path is None:
|
1350
|
+
try:
|
1351
|
+
path = tempfile.mktemp(prefix=tempfile.template)
|
1352
|
+
except TypeError:
|
1353
|
+
path = tempfile.mktemp()
|
1354
|
+
os.mkdir(path)
|
1355
|
+
|
1356
|
+
# Symlinks in the path will report things
|
1357
|
+
# differently from os.getcwd(), so chdir there
|
1358
|
+
# and back to fetch the canonical path.
|
1359
|
+
cwd = os.getcwd()
|
1360
|
+
try:
|
1361
|
+
os.chdir(path)
|
1362
|
+
path = os.getcwd()
|
1363
|
+
finally:
|
1364
|
+
os.chdir(cwd)
|
1365
|
+
|
1366
|
+
# Uppercase the drive letter since the case of drive
|
1367
|
+
# letters is pretty much random on win32:
|
1368
|
+
drive,rest = os.path.splitdrive(path)
|
1369
|
+
if drive:
|
1370
|
+
path = string.upper(drive) + rest
|
1371
|
+
|
1372
|
+
#
|
1373
|
+
self._dirlist.append(path)
|
1374
|
+
global _Cleanup
|
1375
|
+
try:
|
1376
|
+
_Cleanup.index(self)
|
1377
|
+
except ValueError:
|
1378
|
+
_Cleanup.append(self)
|
1379
|
+
|
1380
|
+
return path
|
1381
|
+
|
1382
|
+
def touch(self, path, mtime=None):
|
1383
|
+
"""Updates the modification time on the specified file or
|
1384
|
+
directory path name. The default is to update to the
|
1385
|
+
current time if no explicit modification time is specified.
|
1386
|
+
"""
|
1387
|
+
path = self.canonicalize(path)
|
1388
|
+
atime = os.path.getatime(path)
|
1389
|
+
if mtime is None:
|
1390
|
+
mtime = time.time()
|
1391
|
+
os.utime(path, (atime, mtime))
|
1392
|
+
|
1393
|
+
def unlink(self, file):
|
1394
|
+
"""Unlinks the specified file name.
|
1395
|
+
The file name may be a list, in which case the elements are
|
1396
|
+
concatenated with the os.path.join() method. The file is
|
1397
|
+
assumed to be under the temporary working directory unless it
|
1398
|
+
is an absolute path name.
|
1399
|
+
"""
|
1400
|
+
file = self.canonicalize(file)
|
1401
|
+
os.unlink(file)
|
1402
|
+
|
1403
|
+
def verbose_set(self, verbose):
|
1404
|
+
"""Set the verbose level.
|
1405
|
+
"""
|
1406
|
+
self.verbose = verbose
|
1407
|
+
|
1408
|
+
def where_is(self, file, path=None, pathext=None):
|
1409
|
+
"""Find an executable file.
|
1410
|
+
"""
|
1411
|
+
if is_List(file):
|
1412
|
+
file = apply(os.path.join, tuple(file))
|
1413
|
+
if not os.path.isabs(file):
|
1414
|
+
file = where_is(file, path, pathext)
|
1415
|
+
return file
|
1416
|
+
|
1417
|
+
def workdir_set(self, path):
|
1418
|
+
"""Creates a temporary working directory with the specified
|
1419
|
+
path name. If the path is a null string (''), a unique
|
1420
|
+
directory name is created.
|
1421
|
+
"""
|
1422
|
+
if (path != None):
|
1423
|
+
if path == '':
|
1424
|
+
path = None
|
1425
|
+
path = self.tempdir(path)
|
1426
|
+
self.workdir = path
|
1427
|
+
|
1428
|
+
def workpath(self, *args):
|
1429
|
+
"""Returns the absolute path name to a subdirectory or file
|
1430
|
+
within the current temporary working directory. Concatenates
|
1431
|
+
the temporary working directory name with the specified
|
1432
|
+
arguments using the os.path.join() method.
|
1433
|
+
"""
|
1434
|
+
return apply(os.path.join, (self.workdir,) + tuple(args))
|
1435
|
+
|
1436
|
+
def readable(self, top, read=1):
|
1437
|
+
"""Make the specified directory tree readable (read == 1)
|
1438
|
+
or not (read == None).
|
1439
|
+
|
1440
|
+
This method has no effect on Windows systems, which use a
|
1441
|
+
completely different mechanism to control file readability.
|
1442
|
+
"""
|
1443
|
+
|
1444
|
+
if sys.platform == 'win32':
|
1445
|
+
return
|
1446
|
+
|
1447
|
+
if read:
|
1448
|
+
def do_chmod(fname):
|
1449
|
+
try: st = os.stat(fname)
|
1450
|
+
except OSError: pass
|
1451
|
+
else: os.chmod(fname, stat.S_IMODE(st[stat.ST_MODE]|stat.S_IREAD))
|
1452
|
+
else:
|
1453
|
+
def do_chmod(fname):
|
1454
|
+
try: st = os.stat(fname)
|
1455
|
+
except OSError: pass
|
1456
|
+
else: os.chmod(fname, stat.S_IMODE(st[stat.ST_MODE]&~stat.S_IREAD))
|
1457
|
+
|
1458
|
+
if os.path.isfile(top):
|
1459
|
+
# If it's a file, that's easy, just chmod it.
|
1460
|
+
do_chmod(top)
|
1461
|
+
elif read:
|
1462
|
+
# It's a directory and we're trying to turn on read
|
1463
|
+
# permission, so it's also pretty easy, just chmod the
|
1464
|
+
# directory and then chmod every entry on our walk down the
|
1465
|
+
# tree. Because os.path.walk() is top-down, we'll enable
|
1466
|
+
# read permission on any directories that have it disabled
|
1467
|
+
# before os.path.walk() tries to list their contents.
|
1468
|
+
do_chmod(top)
|
1469
|
+
|
1470
|
+
def chmod_entries(arg, dirname, names, do_chmod=do_chmod):
|
1471
|
+
for n in names:
|
1472
|
+
do_chmod(os.path.join(dirname, n))
|
1473
|
+
|
1474
|
+
os.path.walk(top, chmod_entries, None)
|
1475
|
+
else:
|
1476
|
+
# It's a directory and we're trying to turn off read
|
1477
|
+
# permission, which means we have to chmod the directoreis
|
1478
|
+
# in the tree bottom-up, lest disabling read permission from
|
1479
|
+
# the top down get in the way of being able to get at lower
|
1480
|
+
# parts of the tree. But os.path.walk() visits things top
|
1481
|
+
# down, so we just use an object to collect a list of all
|
1482
|
+
# of the entries in the tree, reverse the list, and then
|
1483
|
+
# chmod the reversed (bottom-up) list.
|
1484
|
+
col = Collector(top)
|
1485
|
+
os.path.walk(top, col, None)
|
1486
|
+
col.entries.reverse()
|
1487
|
+
for d in col.entries: do_chmod(d)
|
1488
|
+
|
1489
|
+
def writable(self, top, write=1):
|
1490
|
+
"""Make the specified directory tree writable (write == 1)
|
1491
|
+
or not (write == None).
|
1492
|
+
"""
|
1493
|
+
|
1494
|
+
if sys.platform == 'win32':
|
1495
|
+
|
1496
|
+
if write:
|
1497
|
+
def do_chmod(fname):
|
1498
|
+
try: os.chmod(fname, stat.S_IWRITE)
|
1499
|
+
except OSError: pass
|
1500
|
+
else:
|
1501
|
+
def do_chmod(fname):
|
1502
|
+
try: os.chmod(fname, stat.S_IREAD)
|
1503
|
+
except OSError: pass
|
1504
|
+
|
1505
|
+
else:
|
1506
|
+
|
1507
|
+
if write:
|
1508
|
+
def do_chmod(fname):
|
1509
|
+
try: st = os.stat(fname)
|
1510
|
+
except OSError: pass
|
1511
|
+
else: os.chmod(fname, stat.S_IMODE(st[stat.ST_MODE]|0200))
|
1512
|
+
else:
|
1513
|
+
def do_chmod(fname):
|
1514
|
+
try: st = os.stat(fname)
|
1515
|
+
except OSError: pass
|
1516
|
+
else: os.chmod(fname, stat.S_IMODE(st[stat.ST_MODE]&~0200))
|
1517
|
+
|
1518
|
+
if os.path.isfile(top):
|
1519
|
+
do_chmod(top)
|
1520
|
+
else:
|
1521
|
+
col = Collector(top)
|
1522
|
+
os.path.walk(top, col, None)
|
1523
|
+
for d in col.entries: do_chmod(d)
|
1524
|
+
|
1525
|
+
def executable(self, top, execute=1):
|
1526
|
+
"""Make the specified directory tree executable (execute == 1)
|
1527
|
+
or not (execute == None).
|
1528
|
+
|
1529
|
+
This method has no effect on Windows systems, which use a
|
1530
|
+
completely different mechanism to control file executability.
|
1531
|
+
"""
|
1532
|
+
|
1533
|
+
if sys.platform == 'win32':
|
1534
|
+
return
|
1535
|
+
|
1536
|
+
if execute:
|
1537
|
+
def do_chmod(fname):
|
1538
|
+
try: st = os.stat(fname)
|
1539
|
+
except OSError: pass
|
1540
|
+
else: os.chmod(fname, stat.S_IMODE(st[stat.ST_MODE]|stat.S_IEXEC))
|
1541
|
+
else:
|
1542
|
+
def do_chmod(fname):
|
1543
|
+
try: st = os.stat(fname)
|
1544
|
+
except OSError: pass
|
1545
|
+
else: os.chmod(fname, stat.S_IMODE(st[stat.ST_MODE]&~stat.S_IEXEC))
|
1546
|
+
|
1547
|
+
if os.path.isfile(top):
|
1548
|
+
# If it's a file, that's easy, just chmod it.
|
1549
|
+
do_chmod(top)
|
1550
|
+
elif execute:
|
1551
|
+
# It's a directory and we're trying to turn on execute
|
1552
|
+
# permission, so it's also pretty easy, just chmod the
|
1553
|
+
# directory and then chmod every entry on our walk down the
|
1554
|
+
# tree. Because os.path.walk() is top-down, we'll enable
|
1555
|
+
# execute permission on any directories that have it disabled
|
1556
|
+
# before os.path.walk() tries to list their contents.
|
1557
|
+
do_chmod(top)
|
1558
|
+
|
1559
|
+
def chmod_entries(arg, dirname, names, do_chmod=do_chmod):
|
1560
|
+
for n in names:
|
1561
|
+
do_chmod(os.path.join(dirname, n))
|
1562
|
+
|
1563
|
+
os.path.walk(top, chmod_entries, None)
|
1564
|
+
else:
|
1565
|
+
# It's a directory and we're trying to turn off execute
|
1566
|
+
# permission, which means we have to chmod the directories
|
1567
|
+
# in the tree bottom-up, lest disabling execute permission from
|
1568
|
+
# the top down get in the way of being able to get at lower
|
1569
|
+
# parts of the tree. But os.path.walk() visits things top
|
1570
|
+
# down, so we just use an object to collect a list of all
|
1571
|
+
# of the entries in the tree, reverse the list, and then
|
1572
|
+
# chmod the reversed (bottom-up) list.
|
1573
|
+
col = Collector(top)
|
1574
|
+
os.path.walk(top, col, None)
|
1575
|
+
col.entries.reverse()
|
1576
|
+
for d in col.entries: do_chmod(d)
|
1577
|
+
|
1578
|
+
def write(self, file, content, mode = 'wb'):
|
1579
|
+
"""Writes the specified content text (second argument) to the
|
1580
|
+
specified file name (first argument). The file name may be
|
1581
|
+
a list, in which case the elements are concatenated with the
|
1582
|
+
os.path.join() method. The file is created under the temporary
|
1583
|
+
working directory. Any subdirectories in the path must already
|
1584
|
+
exist. The I/O mode for the file may be specified; it must
|
1585
|
+
begin with a 'w'. The default is 'wb' (binary write).
|
1586
|
+
"""
|
1587
|
+
file = self.canonicalize(file)
|
1588
|
+
if mode[0] != 'w':
|
1589
|
+
raise ValueError, "mode must begin with 'w'"
|
1590
|
+
with open(file, mode) as f:
|
1591
|
+
f.write(content)
|
1592
|
+
|
1593
|
+
# Local Variables:
|
1594
|
+
# tab-width:4
|
1595
|
+
# indent-tabs-mode:nil
|
1596
|
+
# End:
|
1597
|
+
# vim: set expandtab tabstop=4 shiftwidth=4:
|