tree-sitter 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1857) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +22 -0
  3. data/README.md +36 -0
  4. data/Rakefile +49 -0
  5. data/ext/tree-sitter/extconf.rb +34 -0
  6. data/ext/tree-sitter/tree-sitter.c +114 -0
  7. data/ext/tree-sitter/tree-sitter.h +15 -0
  8. data/ext/tree-sitter/tree-sitter/Makefile +360 -0
  9. data/ext/tree-sitter/tree-sitter/README.md +224 -0
  10. data/ext/tree-sitter/tree-sitter/compiler.target.mk +238 -0
  11. data/ext/tree-sitter/tree-sitter/doc/grammar-schema.json +249 -0
  12. data/ext/tree-sitter/tree-sitter/externals/bandit/CMakeLists.txt +57 -0
  13. data/ext/tree-sitter/tree-sitter/externals/bandit/LICENSE.md +21 -0
  14. data/ext/tree-sitter/tree-sitter/externals/bandit/README.md +64 -0
  15. data/ext/tree-sitter/tree-sitter/externals/bandit/appveyor.yml +12 -0
  16. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/adapters/adapter.h +12 -0
  17. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/adapters/adapters.h +16 -0
  18. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/adapters/snowhouse.h +22 -0
  19. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_exception.h +51 -0
  20. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeCloseTo.h +55 -0
  21. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeEmpty.h +32 -0
  22. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeFalsy.h +39 -0
  23. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeGTE.h +45 -0
  24. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeGreaterThan.h +39 -0
  25. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeLTE.h +45 -0
  26. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeLessThan.h +39 -0
  27. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeNull.h +29 -0
  28. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeTruthy.h +35 -0
  29. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/Contain.h +58 -0
  30. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/Equal.h +90 -0
  31. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/MatchProxy.h +43 -0
  32. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/Matcher.h +74 -0
  33. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/MatcherException.h +16 -0
  34. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/ThrowException.h +60 -0
  35. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/ValueProxy.h +26 -0
  36. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/matchers.h +19 -0
  37. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/must.h +36 -0
  38. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/CMakeLists.txt +49 -0
  39. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/LICENSE_1_0.txt +23 -0
  40. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/README.md +419 -0
  41. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/cross_compile.sh +50 -0
  42. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/basic_assertions.cpp +228 -0
  43. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/boolean_operators.cpp +48 -0
  44. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/container_spec.cpp +85 -0
  45. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/custom_matchers_test.cpp +69 -0
  46. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/exceptions_tests.cpp +97 -0
  47. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/expression_error_handling.cpp +28 -0
  48. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/main.cpp +43 -0
  49. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/map_tests.cpp +38 -0
  50. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/operator_tests.cpp +137 -0
  51. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/sequence_container_tests.cpp +192 -0
  52. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/string_line_tests.cpp +179 -0
  53. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/string_tests.cpp +65 -0
  54. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/stringize_tests.cpp +111 -0
  55. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/tests.h +16 -0
  56. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/assert.h +126 -0
  57. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/assertionexception.h +58 -0
  58. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/assertmacro.h +22 -0
  59. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/constraints.h +23 -0
  60. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/containsconstraint.h +80 -0
  61. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/endswithconstraint.h +53 -0
  62. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/equalsconstraint.h +83 -0
  63. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/equalscontainerconstraint.h +80 -0
  64. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/equalswithdeltaconstraint.h +51 -0
  65. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/expressions/andexpression.h +46 -0
  66. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/expressions/expression.h +38 -0
  67. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/expressions/expression_fwd.h +15 -0
  68. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/expressions/notexpression.h +44 -0
  69. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/expressions/orexpression.h +46 -0
  70. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/fulfillsconstraint.h +51 -0
  71. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/haslengthconstraint.h +60 -0
  72. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/isgreaterthanconstraint.h +55 -0
  73. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/isgreaterthanorequaltoconstraint.h +55 -0
  74. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/islessthanconstraint.h +54 -0
  75. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/islessthanorequaltoconstraint.h +55 -0
  76. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/startswithconstraint.h +52 -0
  77. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/exceptions.h +120 -0
  78. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/constraintadapter.h +39 -0
  79. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/constraintlist.h +91 -0
  80. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/expressionbuilder.h +357 -0
  81. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/fluent.h +38 -0
  82. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/andoperator.h +54 -0
  83. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/collections/alloperator.h +35 -0
  84. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/collections/atleastoperator.h +41 -0
  85. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/collections/atmostoperator.h +39 -0
  86. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/collections/collectionconstraintevaluator.h +113 -0
  87. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/collections/collectionoperator.h +24 -0
  88. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/collections/exactlyoperator.h +39 -0
  89. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/collections/noneoperator.h +33 -0
  90. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/constraintoperator.h +70 -0
  91. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/invalidexpressionexception.h +28 -0
  92. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/notoperator.h +53 -0
  93. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/oroperator.h +55 -0
  94. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/snowhouse.h +33 -0
  95. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/stringize.h +104 -0
  96. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/stringizers.h +60 -0
  97. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/bandit.h +44 -0
  98. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/context.h +97 -0
  99. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/external/optionparser.h +2825 -0
  100. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/failure_formatters/default_failure_formatter.h +30 -0
  101. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/failure_formatters/failure_formatter.h +13 -0
  102. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/failure_formatters/failure_formatters.h +16 -0
  103. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/failure_formatters/visual_studio_failure_formatter.h +36 -0
  104. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/grammar.h +185 -0
  105. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/listener.h +27 -0
  106. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/options.h +117 -0
  107. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/registration/registrar.h +25 -0
  108. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/registration/registration.h +7 -0
  109. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/registration/spec_registry.h +17 -0
  110. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/colorizer.h +141 -0
  111. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/dots_reporter.h +76 -0
  112. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/info_reporter.h +319 -0
  113. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/progress_reporter.h +116 -0
  114. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/reporters.h +53 -0
  115. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/single_line_reporter.h +86 -0
  116. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/spec_reporter.h +126 -0
  117. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/test_run_summary.h +90 -0
  118. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/xunit_reporter.h +109 -0
  119. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/run_policies/always_run_policy.h +16 -0
  120. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/run_policies/bandit_run_policy.h +168 -0
  121. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/run_policies/never_run_policy.h +14 -0
  122. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/run_policies/run_policies.h +9 -0
  123. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/run_policies/run_policy.h +66 -0
  124. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/runner.h +103 -0
  125. data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/test_run_error.h +12 -0
  126. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/CMake/cotire.cmake +3695 -0
  127. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/CMakeLists.txt +11 -0
  128. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/HISTORY.md +281 -0
  129. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/MANUAL.md +780 -0
  130. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/OpenCV-2.3.1.patch +299 -0
  131. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/README.md +24 -0
  132. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/bullet-2.80-rev2531.patch +389 -0
  133. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/clang-3.0.src.patch +35 -0
  134. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/clang-3.1.src.patch +35 -0
  135. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/clang-3.3.src.patch +46 -0
  136. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/clang-3.4.src.patch +48 -0
  137. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/clang-3.5.src.patch +39 -0
  138. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/clapack-3.2.1-CMAKE.patch +93 -0
  139. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/cmake-2.8.7.patch +218 -0
  140. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/cminpack-1.1.4.patch +18 -0
  141. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/fsedit-qt5.patch +74 -0
  142. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/fseditor-1.0.patch +68 -0
  143. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/hdf5-1.8.8.patch +118 -0
  144. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/libpng-1.5.9.patch +38 -0
  145. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/llvm-3.0.src.patch +69 -0
  146. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/llvm-3.1.src.patch +69 -0
  147. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/llvm-3.3.src.patch +128 -0
  148. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/llvm-3.4.src.patch +100 -0
  149. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/llvm-3.5.src.patch +99 -0
  150. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/yaml-cpp.patch +37 -0
  151. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/zlib-1.2.6.patch +23 -0
  152. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/README.md +137 -0
  153. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/license +22 -0
  154. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/src/CMakeLists.txt +33 -0
  155. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/src/example.cpp +24 -0
  156. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/src/example.h +10 -0
  157. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/src/log.cpp +17 -0
  158. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/src/log.h +10 -0
  159. data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/src/main.cpp +12 -0
  160. data/ext/tree-sitter/tree-sitter/externals/bandit/cross_compile.sh +43 -0
  161. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/before_each_after_each.spec.cpp +78 -0
  162. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/context.spec.cpp +44 -0
  163. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/describe.spec.cpp +117 -0
  164. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/failure_formatters/default_formatter.spec.cpp +21 -0
  165. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/failure_formatters/visual_studio_failure_formatter.spec.cpp +22 -0
  166. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/fakes/fake_context.h +69 -0
  167. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/fakes/fake_reporter.h +78 -0
  168. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/fakes/fakes.h +8 -0
  169. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/fakes/logging_fake.h +32 -0
  170. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/fuzzbox.spec.cpp +77 -0
  171. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/it.spec.cpp +355 -0
  172. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/main.cpp +6 -0
  173. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_close_to.cpp +112 -0
  174. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_empty.cpp +89 -0
  175. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_falsy.cpp +85 -0
  176. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_greater_than.cpp +105 -0
  177. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_gte.cpp +120 -0
  178. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_less_than.cpp +105 -0
  179. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_lte.cpp +119 -0
  180. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_null.cpp +43 -0
  181. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_truthy.cpp +85 -0
  182. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/contain.cpp +156 -0
  183. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/equal.cpp +218 -0
  184. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/throw_exception.cpp +105 -0
  185. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/options.spec.cpp +134 -0
  186. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/reporters/colorizer.spec.cpp +45 -0
  187. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/reporters/dots_reporter.spec.cpp +206 -0
  188. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/reporters/info_reporter.spec.cpp +377 -0
  189. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/reporters/single_line_reporter.spec.cpp +201 -0
  190. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/reporters/xunit_reporter.spec.cpp +161 -0
  191. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/run.spec.cpp +77 -0
  192. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/run_policies/bandit_run_policy.spec.cpp +247 -0
  193. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/specs.h +10 -0
  194. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/synopsis.spec.cpp +54 -0
  195. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/util/argv_helper.h +62 -0
  196. data/ext/tree-sitter/tree-sitter/externals/bandit/specs/util/util.h +6 -0
  197. data/ext/tree-sitter/tree-sitter/externals/gyp/AUTHORS +11 -0
  198. data/ext/tree-sitter/tree-sitter/externals/gyp/DEPS +24 -0
  199. data/ext/tree-sitter/tree-sitter/externals/gyp/LICENSE +27 -0
  200. data/ext/tree-sitter/tree-sitter/externals/gyp/OWNERS +1 -0
  201. data/ext/tree-sitter/tree-sitter/externals/gyp/PRESUBMIT.py +120 -0
  202. data/ext/tree-sitter/tree-sitter/externals/gyp/buildbot/buildbot_run.py +190 -0
  203. data/ext/tree-sitter/tree-sitter/externals/gyp/codereview.settings +10 -0
  204. data/ext/tree-sitter/tree-sitter/externals/gyp/data/win/large-pdb-shim.cc +12 -0
  205. data/ext/tree-sitter/tree-sitter/externals/gyp/gyp +8 -0
  206. data/ext/tree-sitter/tree-sitter/externals/gyp/gyp.bat +5 -0
  207. data/ext/tree-sitter/tree-sitter/externals/gyp/gyp_main.py +18 -0
  208. data/ext/tree-sitter/tree-sitter/externals/gyp/gyptest.py +274 -0
  209. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSNew.py +340 -0
  210. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSProject.py +208 -0
  211. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSSettings.py +1076 -0
  212. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSSettings_test.py +1483 -0
  213. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSToolFile.py +58 -0
  214. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSUserFile.py +147 -0
  215. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSUtil.py +267 -0
  216. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSVersion.py +409 -0
  217. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/__init__.py +537 -0
  218. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/__init__.pyc +0 -0
  219. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/common.py +521 -0
  220. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/common.pyc +0 -0
  221. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/common_test.py +72 -0
  222. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/easy_xml.py +157 -0
  223. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/easy_xml_test.py +103 -0
  224. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/flock_tool.py +49 -0
  225. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/__init__.py +0 -0
  226. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/__init__.pyc +0 -0
  227. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/android.py +1072 -0
  228. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/cmake.py +1143 -0
  229. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/dump_dependency_json.py +81 -0
  230. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/eclipse.py +335 -0
  231. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/gypd.py +87 -0
  232. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/gypsh.py +56 -0
  233. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/make.py +2181 -0
  234. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/make.pyc +0 -0
  235. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/msvs.py +3342 -0
  236. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/msvs_test.py +37 -0
  237. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/ninja.py +2160 -0
  238. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/ninja_test.py +44 -0
  239. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/xcode.py +1224 -0
  240. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/xcode.pyc +0 -0
  241. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/xcode_test.py +23 -0
  242. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/input.py +2809 -0
  243. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/input.pyc +0 -0
  244. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/input_test.py +90 -0
  245. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/mac_tool.py +510 -0
  246. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/msvs_emulation.py +972 -0
  247. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/ninja_syntax.py +160 -0
  248. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/ordered_dict.py +289 -0
  249. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/win_tool.py +292 -0
  250. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/xcode_emulation.py +1499 -0
  251. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/xcode_emulation.pyc +0 -0
  252. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/xcodeproj_file.py +2889 -0
  253. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/xcodeproj_file.pyc +0 -0
  254. data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/xml_fix.py +69 -0
  255. data/ext/tree-sitter/tree-sitter/externals/gyp/pylintrc +307 -0
  256. data/ext/tree-sitter/tree-sitter/externals/gyp/samples/samples +81 -0
  257. data/ext/tree-sitter/tree-sitter/externals/gyp/samples/samples.bat +5 -0
  258. data/ext/tree-sitter/tree-sitter/externals/gyp/setup.py +19 -0
  259. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-bare/gyptest-bare.py +23 -0
  260. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-bare/src/bare.gyp +25 -0
  261. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-bare/src/bare.py +11 -0
  262. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-multiple/gyptest-all.py +72 -0
  263. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-multiple/src/actions.gyp +226 -0
  264. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-multiple/src/copy.py +9 -0
  265. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-multiple/src/filter.py +12 -0
  266. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-multiple/src/foo.c +11 -0
  267. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-multiple/src/input.txt +1 -0
  268. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-multiple/src/main.c +22 -0
  269. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-none/gyptest-none.py +23 -0
  270. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-none/src/fake_cross.py +12 -0
  271. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-none/src/foo.cc +1 -0
  272. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-none/src/none_with_source_files.gyp +35 -0
  273. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-subdir/gyptest-action.py +26 -0
  274. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-subdir/src/make-file.py +11 -0
  275. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-subdir/src/none.gyp +31 -0
  276. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-subdir/src/subdir/make-subdir-file.py +11 -0
  277. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-subdir/src/subdir/subdir.gyp +28 -0
  278. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/generated-header/action.py +11 -0
  279. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/generated-header/main.cc +7 -0
  280. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/generated-header/test.gyp +34 -0
  281. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/gyptest-all.py +102 -0
  282. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/gyptest-default.py +69 -0
  283. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/gyptest-errors.py +24 -0
  284. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/gyptest-generated-header.py +38 -0
  285. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/action_missing_name.gyp +24 -0
  286. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/actions.gyp +114 -0
  287. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/confirm-dep-files.py +21 -0
  288. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir1/counter.py +44 -0
  289. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir1/executable.gyp +74 -0
  290. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir1/make-prog1.py +20 -0
  291. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir1/make-prog2.py +20 -0
  292. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir1/program.c +12 -0
  293. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir2/make-file.py +11 -0
  294. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir2/none.gyp +33 -0
  295. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir3/generate_main.py +21 -0
  296. data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir3/null_input.gyp +29 -0
  297. data/ext/tree-sitter/tree-sitter/externals/gyp/test/additional-targets/gyptest-additional.py +56 -0
  298. data/ext/tree-sitter/tree-sitter/externals/gyp/test/additional-targets/src/all.gyp +13 -0
  299. data/ext/tree-sitter/tree-sitter/externals/gyp/test/additional-targets/src/dir1/actions.gyp +56 -0
  300. data/ext/tree-sitter/tree-sitter/externals/gyp/test/additional-targets/src/dir1/emit.py +11 -0
  301. data/ext/tree-sitter/tree-sitter/externals/gyp/test/additional-targets/src/dir1/lib1.c +6 -0
  302. data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/gyptest-assembly.py +31 -0
  303. data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/gyptest-override.py +24 -0
  304. data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/as.bat +4 -0
  305. data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/assembly.gyp +62 -0
  306. data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/lib1.S +15 -0
  307. data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/lib1.c +3 -0
  308. data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/override.gyp +34 -0
  309. data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/override_asm.asm +8 -0
  310. data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/program.c +12 -0
  311. data/ext/tree-sitter/tree-sitter/externals/gyp/test/build-option/gyptest-build.py +22 -0
  312. data/ext/tree-sitter/tree-sitter/externals/gyp/test/build-option/hello.c +13 -0
  313. data/ext/tree-sitter/tree-sitter/externals/gyp/test/build-option/hello.gyp +15 -0
  314. data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/gyptest-all.py +85 -0
  315. data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/gyptest-default.py +85 -0
  316. data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/builddir.gypi +18 -0
  317. data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/func1.c +6 -0
  318. data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/func2.c +6 -0
  319. data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/func3.c +6 -0
  320. data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/func4.c +6 -0
  321. data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/func5.c +6 -0
  322. data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/prog1.c +10 -0
  323. data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/prog1.gyp +30 -0
  324. data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/prog2.c +10 -0
  325. data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/prog2.gyp +19 -0
  326. data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/subdir3/prog3.c +10 -0
  327. data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/subdir3/prog3.gyp +19 -0
  328. data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.c +10 -0
  329. data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.gyp +19 -0
  330. data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.c +10 -0
  331. data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.gyp +19 -0
  332. data/ext/tree-sitter/tree-sitter/externals/gyp/test/cflags/cflags.c +15 -0
  333. data/ext/tree-sitter/tree-sitter/externals/gyp/test/cflags/cflags.gyp +23 -0
  334. data/ext/tree-sitter/tree-sitter/externals/gyp/test/cflags/gyptest-cflags.py +104 -0
  335. data/ext/tree-sitter/tree-sitter/externals/gyp/test/compilable/gyptest-headers.py +29 -0
  336. data/ext/tree-sitter/tree-sitter/externals/gyp/test/compilable/src/headers.gyp +26 -0
  337. data/ext/tree-sitter/tree-sitter/externals/gyp/test/compilable/src/lib1.cpp +7 -0
  338. data/ext/tree-sitter/tree-sitter/externals/gyp/test/compilable/src/lib1.hpp +6 -0
  339. data/ext/tree-sitter/tree-sitter/externals/gyp/test/compilable/src/program.cpp +9 -0
  340. data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/compiler-global-settings.gyp.in +34 -0
  341. data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/compiler-host.gyp +17 -0
  342. data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/compiler.gyp +16 -0
  343. data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/cxxtest.cc +7 -0
  344. data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/gyptest-compiler-env.py +112 -0
  345. data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/gyptest-compiler-global-settings.py +73 -0
  346. data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/my_cc.py +6 -0
  347. data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/my_cxx.py +6 -0
  348. data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/my_ld.py +6 -0
  349. data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/test.c +7 -0
  350. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/basics/configurations.c +15 -0
  351. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/basics/configurations.gyp +32 -0
  352. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/basics/gyptest-configurations.py +29 -0
  353. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/inheritance/configurations.c +21 -0
  354. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/inheritance/configurations.gyp +40 -0
  355. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/inheritance/gyptest-inheritance.py +33 -0
  356. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/actions.gyp +18 -0
  357. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/all_dependent_settings.gyp +18 -0
  358. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/configurations.gyp +18 -0
  359. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/dependencies.gyp +18 -0
  360. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/direct_dependent_settings.gyp +18 -0
  361. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/gyptest-configurations.py +36 -0
  362. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/libraries.gyp +18 -0
  363. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/link_settings.gyp +18 -0
  364. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/sources.gyp +18 -0
  365. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/standalone_static_library.gyp +17 -0
  366. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/target_name.gyp +18 -0
  367. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/type.gyp +18 -0
  368. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/target_platform/configurations.gyp +58 -0
  369. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/target_platform/front.c +8 -0
  370. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/target_platform/gyptest-target_platform.py +40 -0
  371. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/target_platform/left.c +3 -0
  372. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/target_platform/right.c +3 -0
  373. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/x64/configurations.c +12 -0
  374. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/x64/configurations.gyp +38 -0
  375. data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/x64/gyptest-x86.py +31 -0
  376. data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-all.py +40 -0
  377. data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-attribs.py +41 -0
  378. data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-default.py +40 -0
  379. data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-samedir.py +28 -0
  380. data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-slash.py +38 -0
  381. data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-updir.py +24 -0
  382. data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/copies-attribs.gyp +20 -0
  383. data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/copies-samedir.gyp +37 -0
  384. data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/copies-slash.gyp +36 -0
  385. data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/copies-updir.gyp +21 -0
  386. data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/copies.gyp +70 -0
  387. data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/directory/file3 +1 -0
  388. data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/directory/file4 +1 -0
  389. data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/directory/subdir/file5 +1 -0
  390. data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/executable-file.sh +3 -0
  391. data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/file1 +1 -0
  392. data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/file2 +1 -0
  393. data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/parentdir/subdir/file6 +1 -0
  394. data/ext/tree-sitter/tree-sitter/externals/gyp/test/custom-generator/gyptest-custom-generator.py +18 -0
  395. data/ext/tree-sitter/tree-sitter/externals/gyp/test/custom-generator/mygenerator.py +14 -0
  396. data/ext/tree-sitter/tree-sitter/externals/gyp/test/custom-generator/test.gyp +15 -0
  397. data/ext/tree-sitter/tree-sitter/externals/gyp/test/cxxflags/cxxflags.cc +15 -0
  398. data/ext/tree-sitter/tree-sitter/externals/gyp/test/cxxflags/cxxflags.gyp +16 -0
  399. data/ext/tree-sitter/tree-sitter/externals/gyp/test/cxxflags/gyptest-cxxflags.py +65 -0
  400. data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines-escaping/defines-escaping.c +11 -0
  401. data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines-escaping/defines-escaping.gyp +19 -0
  402. data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines-escaping/gyptest-defines-escaping.py +184 -0
  403. data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/defines-env.gyp +22 -0
  404. data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/defines.c +23 -0
  405. data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/defines.gyp +38 -0
  406. data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/gyptest-define-override.py +43 -0
  407. data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/gyptest-defines-env-regyp.py +51 -0
  408. data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/gyptest-defines-env.py +85 -0
  409. data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/gyptest-defines.py +39 -0
  410. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/a.c +9 -0
  411. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/b/b.c +3 -0
  412. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/b/b.gyp +22 -0
  413. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/b/b3.c +9 -0
  414. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/c/c.c +4 -0
  415. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/c/c.gyp +22 -0
  416. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/c/d.c +3 -0
  417. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/double_dependency.gyp +23 -0
  418. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/double_dependent.gyp +12 -0
  419. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/extra_targets.gyp +18 -0
  420. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/gyptest-double-dependency.py +19 -0
  421. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/gyptest-extra-targets.py +21 -0
  422. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/gyptest-lib-only.py +39 -0
  423. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/gyptest-none-traversal.py +25 -0
  424. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/gyptest-sharedlib-linksettings.py +21 -0
  425. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/lib_only.gyp +16 -0
  426. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/main.c +14 -0
  427. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/none_traversal.gyp +46 -0
  428. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/sharedlib-linksettings/program.c +25 -0
  429. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/sharedlib-linksettings/sharedlib.c +16 -0
  430. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/sharedlib-linksettings/staticlib.c +24 -0
  431. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/sharedlib-linksettings/test.gyp +37 -0
  432. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependency-copy/gyptest-copy.py +26 -0
  433. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependency-copy/src/copies.gyp +25 -0
  434. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependency-copy/src/file1.c +7 -0
  435. data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependency-copy/src/file2.c +7 -0
  436. data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/duplicate_basenames.gyp +13 -0
  437. data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/duplicate_node.gyp +12 -0
  438. data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/duplicate_rule.gyp +22 -0
  439. data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/duplicate_targets.gyp +14 -0
  440. data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/gyptest-errors.py +47 -0
  441. data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/missing_dep.gyp +15 -0
  442. data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/missing_targets.gyp +8 -0
  443. data/ext/tree-sitter/tree-sitter/externals/gyp/test/escaping/colon/test.gyp +21 -0
  444. data/ext/tree-sitter/tree-sitter/externals/gyp/test/escaping/gyptest-colon.py +43 -0
  445. data/ext/tree-sitter/tree-sitter/externals/gyp/test/exclusion/exclusion.gyp +23 -0
  446. data/ext/tree-sitter/tree-sitter/externals/gyp/test/exclusion/gyptest-exclusion.py +22 -0
  447. data/ext/tree-sitter/tree-sitter/externals/gyp/test/exclusion/hello.c +15 -0
  448. data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/gyptest-cross.py +31 -0
  449. data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/bogus1.cc +1 -0
  450. data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/bogus2.c +1 -0
  451. data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/cross.gyp +83 -0
  452. data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/cross_compile.gypi +23 -0
  453. data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/fake_cross.py +18 -0
  454. data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/program.cc +16 -0
  455. data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/test1.cc +1 -0
  456. data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/test2.c +1 -0
  457. data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/test3.cc +1 -0
  458. data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/test4.c +1 -0
  459. data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/tochar.py +13 -0
  460. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/actions.gyp +16 -0
  461. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/build/README.txt +4 -0
  462. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir1/actions-out/README.txt +4 -0
  463. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir1/build/README.txt +4 -0
  464. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir1/executable.gyp +44 -0
  465. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir1/make-prog1.py +20 -0
  466. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir1/make-prog2.py +20 -0
  467. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir1/program.c +12 -0
  468. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir2/actions-out/README.txt +4 -0
  469. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir2/build/README.txt +4 -0
  470. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir2/make-file.py +11 -0
  471. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir2/none.gyp +31 -0
  472. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/build/README.txt +4 -0
  473. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/copies-out/README.txt +4 -0
  474. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/copies.gyp +50 -0
  475. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/file1 +1 -0
  476. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/file2 +1 -0
  477. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/subdir/build/README.txt +4 -0
  478. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/subdir/copies-out/README.txt +4 -0
  479. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/subdir/file3 +1 -0
  480. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/subdir/file4 +1 -0
  481. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/subdir/subdir.gyp +32 -0
  482. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-actions.py +58 -0
  483. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-copies.py +59 -0
  484. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-depth.py +58 -0
  485. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-mac-bundle.py +28 -0
  486. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-relocate.py +60 -0
  487. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-rules.py +59 -0
  488. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-subdir2-deep.py +37 -0
  489. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-symlink.py +43 -0
  490. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-top-all.py +54 -0
  491. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/mac-bundle/Info.plist +32 -0
  492. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/mac-bundle/app.order +1 -0
  493. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/mac-bundle/header.h +1 -0
  494. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/mac-bundle/main.c +1 -0
  495. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/mac-bundle/resource.sb +1 -0
  496. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/mac-bundle/test.gyp +25 -0
  497. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/build/README.txt +4 -0
  498. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/copy-file.py +12 -0
  499. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/rules.gyp +16 -0
  500. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/build/README.txt +4 -0
  501. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/define3.in0 +1 -0
  502. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/define4.in0 +1 -0
  503. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/executable.gyp +59 -0
  504. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/function1.in1 +6 -0
  505. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/function2.in1 +6 -0
  506. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/program.c +18 -0
  507. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir2/build/README.txt +4 -0
  508. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir2/file1.in0 +1 -0
  509. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir2/file2.in0 +1 -0
  510. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir2/file3.in1 +1 -0
  511. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir2/file4.in1 +1 -0
  512. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir2/none.gyp +49 -0
  513. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir2/rules-out/README.txt +4 -0
  514. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/build/README.txt +4 -0
  515. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/inc.h +1 -0
  516. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/inc1/include1.h +1 -0
  517. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/prog1.c +18 -0
  518. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/prog1.gyp +28 -0
  519. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/build/README.txt +4 -0
  520. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/deeper/build/README.txt +4 -0
  521. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/deeper/deeper.c +7 -0
  522. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/deeper/deeper.gyp +18 -0
  523. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/deeper/deeper.h +1 -0
  524. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/inc2/include2.h +1 -0
  525. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/prog2.c +18 -0
  526. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/prog2.gyp +28 -0
  527. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir3/build/README.txt +4 -0
  528. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir3/inc3/include3.h +1 -0
  529. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir3/prog3.c +18 -0
  530. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir3/prog3.gyp +25 -0
  531. data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/symroot.gypi +16 -0
  532. data/ext/tree-sitter/tree-sitter/externals/gyp/test/gyp-defines/defines.gyp +26 -0
  533. data/ext/tree-sitter/tree-sitter/externals/gyp/test/gyp-defines/echo.py +11 -0
  534. data/ext/tree-sitter/tree-sitter/externals/gyp/test/gyp-defines/gyptest-multiple-values.py +40 -0
  535. data/ext/tree-sitter/tree-sitter/externals/gyp/test/gyp-defines/gyptest-regyp.py +40 -0
  536. data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/gyptest-exported-hard-dependency.py +37 -0
  537. data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/gyptest-no-exported-hard-dependency.py +36 -0
  538. data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/a.c +9 -0
  539. data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/a.h +12 -0
  540. data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/b.c +9 -0
  541. data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/b.h +12 -0
  542. data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/c.c +10 -0
  543. data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/c.h +10 -0
  544. data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/d.c +9 -0
  545. data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/emit.py +11 -0
  546. data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/hard_dependency.gyp +78 -0
  547. data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/gyptest-all.py +24 -0
  548. data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/gyptest-default.py +24 -0
  549. data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/gyptest-disable-regyp.py +32 -0
  550. data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/gyptest-regyp-output.py +36 -0
  551. data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/gyptest-regyp.py +32 -0
  552. data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/gyptest-target.py +24 -0
  553. data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/hello.c +11 -0
  554. data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/hello.gyp +15 -0
  555. data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/hello2.c +11 -0
  556. data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/hello2.gyp +15 -0
  557. data/ext/tree-sitter/tree-sitter/externals/gyp/test/home_dot_gyp/gyptest-home-includes-config-arg.py +31 -0
  558. data/ext/tree-sitter/tree-sitter/externals/gyp/test/home_dot_gyp/gyptest-home-includes-config-env.py +33 -0
  559. data/ext/tree-sitter/tree-sitter/externals/gyp/test/home_dot_gyp/gyptest-home-includes-regyp.py +44 -0
  560. data/ext/tree-sitter/tree-sitter/externals/gyp/test/home_dot_gyp/gyptest-home-includes.py +30 -0
  561. data/ext/tree-sitter/tree-sitter/externals/gyp/test/home_dot_gyp/src/all.gyp +22 -0
  562. data/ext/tree-sitter/tree-sitter/externals/gyp/test/home_dot_gyp/src/printfoo.c +7 -0
  563. data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/gyptest-all.py +43 -0
  564. data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/gyptest-default.py +43 -0
  565. data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/inc.h +1 -0
  566. data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/inc1/include1.h +1 -0
  567. data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/includes.c +19 -0
  568. data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/includes.gyp +27 -0
  569. data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/shadow1/shadow.h +1 -0
  570. data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/shadow2/shadow.h +1 -0
  571. data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/subdir/inc.h +1 -0
  572. data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/subdir/inc2/include2.h +1 -0
  573. data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/subdir/subdir_includes.c +14 -0
  574. data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/subdir/subdir_includes.gyp +20 -0
  575. data/ext/tree-sitter/tree-sitter/externals/gyp/test/intermediate_dir/gyptest-intermediate-dir.py +42 -0
  576. data/ext/tree-sitter/tree-sitter/externals/gyp/test/intermediate_dir/src/script.py +24 -0
  577. data/ext/tree-sitter/tree-sitter/externals/gyp/test/intermediate_dir/src/shared_infile.txt +1 -0
  578. data/ext/tree-sitter/tree-sitter/externals/gyp/test/intermediate_dir/src/test.gyp +42 -0
  579. data/ext/tree-sitter/tree-sitter/externals/gyp/test/intermediate_dir/src/test2.gyp +42 -0
  580. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/English.lproj/InfoPlist-error.strings +3 -0
  581. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/English.lproj/InfoPlist.strings +3 -0
  582. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/English.lproj/MainMenu.xib +4119 -0
  583. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/English.lproj/Main_iPhone.storyboard +27 -0
  584. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/TestApp-Info.plist +32 -0
  585. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/check_no_signature.py +13 -0
  586. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/main.m +13 -0
  587. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/only-compile-in-32-bits.m +7 -0
  588. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/only-compile-in-64-bits.m +7 -0
  589. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/test-archs.gyp +110 -0
  590. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/test-device.gyp +79 -0
  591. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/test.gyp +45 -0
  592. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/deployment-target/check-version-min.c +33 -0
  593. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/deployment-target/deployment-target.gyp +58 -0
  594. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/gyptest-app-ios.py +46 -0
  595. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/gyptest-archs.py +106 -0
  596. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/gyptest-deployment-target.py +23 -0
  597. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/gyptest-per-config-settings.py +147 -0
  598. data/ext/tree-sitter/tree-sitter/externals/gyp/test/lib/README.txt +17 -0
  599. data/ext/tree-sitter/tree-sitter/externals/gyp/test/lib/TestCmd.py +1597 -0
  600. data/ext/tree-sitter/tree-sitter/externals/gyp/test/lib/TestCommon.py +570 -0
  601. data/ext/tree-sitter/tree-sitter/externals/gyp/test/lib/TestGyp.py +1117 -0
  602. data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/gyptest-shared-obj-install-path.py +42 -0
  603. data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/gyptest-shared.py +84 -0
  604. data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/gyptest-static.py +84 -0
  605. data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/lib1.c +10 -0
  606. data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/lib1_moveable.c +10 -0
  607. data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/lib2.c +10 -0
  608. data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/lib2_moveable.c +10 -0
  609. data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/library.gyp +58 -0
  610. data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/program.c +15 -0
  611. data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/shared_dependency.gyp +33 -0
  612. data/ext/tree-sitter/tree-sitter/externals/gyp/test/library_dirs/gyptest-library-dirs.py +50 -0
  613. data/ext/tree-sitter/tree-sitter/externals/gyp/test/library_dirs/subdir/README.txt +1 -0
  614. data/ext/tree-sitter/tree-sitter/externals/gyp/test/library_dirs/subdir/hello.cc +11 -0
  615. data/ext/tree-sitter/tree-sitter/externals/gyp/test/library_dirs/subdir/mylib.cc +9 -0
  616. data/ext/tree-sitter/tree-sitter/externals/gyp/test/library_dirs/subdir/mylib.h +12 -0
  617. data/ext/tree-sitter/tree-sitter/externals/gyp/test/library_dirs/subdir/test-win.gyp +60 -0
  618. data/ext/tree-sitter/tree-sitter/externals/gyp/test/library_dirs/subdir/test.gyp +68 -0
  619. data/ext/tree-sitter/tree-sitter/externals/gyp/test/link-objects/base.c +6 -0
  620. data/ext/tree-sitter/tree-sitter/externals/gyp/test/link-objects/extra.c +5 -0
  621. data/ext/tree-sitter/tree-sitter/externals/gyp/test/link-objects/gyptest-all.py +28 -0
  622. data/ext/tree-sitter/tree-sitter/externals/gyp/test/link-objects/link-objects.gyp +24 -0
  623. data/ext/tree-sitter/tree-sitter/externals/gyp/test/linux/gyptest-implicit-rpath.py +48 -0
  624. data/ext/tree-sitter/tree-sitter/externals/gyp/test/linux/implicit-rpath/file.c +1 -0
  625. data/ext/tree-sitter/tree-sitter/externals/gyp/test/linux/implicit-rpath/main.c +1 -0
  626. data/ext/tree-sitter/tree-sitter/externals/gyp/test/linux/implicit-rpath/test.gyp +47 -0
  627. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/action-envvars/action/action.gyp +34 -0
  628. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/action-envvars/action/action.sh +8 -0
  629. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/English.lproj/InfoPlist-error.strings +3 -0
  630. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/English.lproj/InfoPlist.strings +3 -0
  631. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/English.lproj/MainMenu.xib +4119 -0
  632. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/English.lproj/utf-16be.strings +0 -0
  633. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/English.lproj/utf-16le.strings +0 -0
  634. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/TestApp-Info.plist +34 -0
  635. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/TestAppAppDelegate.h +13 -0
  636. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/TestAppAppDelegate.m +15 -0
  637. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/main.m +10 -0
  638. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/empty.c +0 -0
  639. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/test-error.gyp +31 -0
  640. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/test.gyp +41 -0
  641. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/empty_main.cc +1 -0
  642. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/file.mm +1 -0
  643. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/header.h +1 -0
  644. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/my_file.cc +4 -0
  645. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/my_main_file.cc +9 -0
  646. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/test-archs-multiarch.gyp +72 -0
  647. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/test-archs-x86_64.gyp +27 -0
  648. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/test-no-archs.gyp +21 -0
  649. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/bundle-resources/change.sh +3 -0
  650. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/bundle-resources/executable-file.sh +3 -0
  651. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/bundle-resources/secret.txt +1 -0
  652. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/bundle-resources/test.gyp +59 -0
  653. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/ccfile.cc +7 -0
  654. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/ccfile_withcflags.cc +7 -0
  655. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/cfile.c +7 -0
  656. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/cppfile.cpp +7 -0
  657. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/cppfile_withcflags.cpp +7 -0
  658. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/cxxfile.cxx +7 -0
  659. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/cxxfile_withcflags.cxx +7 -0
  660. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/mfile.m +7 -0
  661. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/mmfile.mm +7 -0
  662. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/mmfile_withcflags.mm +7 -0
  663. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/test.gyp +132 -0
  664. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/clang-cxx-language-standard/c++11.cc +8 -0
  665. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/clang-cxx-language-standard/c++98.cc +24 -0
  666. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/clang-cxx-language-standard/clang-cxx-language-standard.gyp +30 -0
  667. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/clang-cxx-library/clang-cxx-library.gyp +32 -0
  668. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/clang-cxx-library/libc++.cc +11 -0
  669. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/clang-cxx-library/libstdc++.cc +11 -0
  670. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/copy-dylib/empty.c +1 -0
  671. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/copy-dylib/test.gyp +31 -0
  672. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/debuginfo/file.c +6 -0
  673. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/debuginfo/test.gyp +82 -0
  674. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/depend-on-bundle/English.lproj/InfoPlist.strings +1 -0
  675. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/depend-on-bundle/Info.plist +28 -0
  676. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/depend-on-bundle/bundle.c +1 -0
  677. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/depend-on-bundle/executable.c +4 -0
  678. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/depend-on-bundle/test.gyp +28 -0
  679. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/deployment-target/check-version-min.c +33 -0
  680. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/deployment-target/deployment-target.gyp +28 -0
  681. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework-dirs/calculate.c +15 -0
  682. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework-dirs/framework-dirs.gyp +21 -0
  683. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework-headers/myframework.h +8 -0
  684. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework-headers/myframework.m +8 -0
  685. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework-headers/test.gyp +44 -0
  686. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/TestFramework/English.lproj/InfoPlist.strings +2 -0
  687. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/TestFramework/Info.plist +28 -0
  688. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/TestFramework/ObjCVector.h +28 -0
  689. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/TestFramework/ObjCVector.mm +63 -0
  690. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/TestFramework/ObjCVectorInternal.h +9 -0
  691. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/TestFramework/TestFramework_Prefix.pch +7 -0
  692. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/empty.c +0 -0
  693. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/framework.gyp +71 -0
  694. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/global-settings/src/dir1/dir1.gyp +11 -0
  695. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/global-settings/src/dir2/dir2.gyp +22 -0
  696. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/global-settings/src/dir2/file.txt +1 -0
  697. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-action-envvars.py +30 -0
  698. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-app-error.py +43 -0
  699. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-app.py +119 -0
  700. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-archs.py +89 -0
  701. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-bundle-resources.py +58 -0
  702. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-cflags.py +20 -0
  703. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-clang-cxx-language-standard.py +25 -0
  704. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-clang-cxx-library.py +29 -0
  705. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-copies.py +49 -0
  706. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-copy-dylib.py +25 -0
  707. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-debuginfo.py +36 -0
  708. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-depend-on-bundle.py +40 -0
  709. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-deployment-target.py +23 -0
  710. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-framework-dirs.py +23 -0
  711. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-framework-headers.py +38 -0
  712. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-framework.py +74 -0
  713. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-global-settings.py +26 -0
  714. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-infoplist-process.py +51 -0
  715. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-installname.py +79 -0
  716. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-ldflags-passed-to-libtool.py +31 -0
  717. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-ldflags.py +68 -0
  718. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-libraries.py +22 -0
  719. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-loadable-module.py +48 -0
  720. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-missing-cfbundlesignature.py +29 -0
  721. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-non-strs-flattened-to-env.py +33 -0
  722. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-objc-arc.py +26 -0
  723. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-objc-gc.py +45 -0
  724. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-postbuild-copy-bundle.py +75 -0
  725. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-postbuild-defaults.py +29 -0
  726. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-postbuild-fail.py +67 -0
  727. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-postbuild-multiple-configurations.py +26 -0
  728. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-postbuild-static-library.py +28 -0
  729. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-postbuild.py +53 -0
  730. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-prefixheader.py +19 -0
  731. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-rebuild.py +41 -0
  732. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-rpath.py +49 -0
  733. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-sdkroot.py +50 -0
  734. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-sourceless-module.py +72 -0
  735. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-strip-default.py +95 -0
  736. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-strip.py +53 -0
  737. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-type-envvars.py +24 -0
  738. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-unicode-settings.py +20 -0
  739. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-xcode-env-order.py +94 -0
  740. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-xcode-gcc-clang.py +40 -0
  741. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-xcode-gcc.py +56 -0
  742. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-xctest.py +38 -0
  743. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/infoplist-process/Info.plist +36 -0
  744. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/infoplist-process/main.c +7 -0
  745. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/infoplist-process/test1.gyp +25 -0
  746. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/infoplist-process/test2.gyp +25 -0
  747. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/infoplist-process/test3.gyp +25 -0
  748. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/installname/Info.plist +28 -0
  749. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/installname/file.c +1 -0
  750. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/installname/main.c +1 -0
  751. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/installname/test.gyp +93 -0
  752. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/ldflags-libtool/file.c +1 -0
  753. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/ldflags-libtool/test.gyp +17 -0
  754. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/ldflags/subdirectory/Info.plist +8 -0
  755. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/ldflags/subdirectory/file.c +2 -0
  756. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/ldflags/subdirectory/symbol_list.def +1 -0
  757. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/ldflags/subdirectory/test.gyp +66 -0
  758. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/libraries/subdir/README.txt +1 -0
  759. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/libraries/subdir/hello.cc +10 -0
  760. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/libraries/subdir/mylib.c +7 -0
  761. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/libraries/subdir/test.gyp +65 -0
  762. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/loadable-module/Info.plist +26 -0
  763. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/loadable-module/module.c +11 -0
  764. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/loadable-module/test.gyp +18 -0
  765. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/missing-cfbundlesignature/Info.plist +10 -0
  766. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/missing-cfbundlesignature/Other-Info.plist +12 -0
  767. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/missing-cfbundlesignature/Third-Info.plist +12 -0
  768. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/missing-cfbundlesignature/file.c +1 -0
  769. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/missing-cfbundlesignature/test.gyp +34 -0
  770. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/non-strs-flattened-to-env/Info.plist +15 -0
  771. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/non-strs-flattened-to-env/main.c +7 -0
  772. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/non-strs-flattened-to-env/test.gyp +27 -0
  773. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-arc/c-file.c +6 -0
  774. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-arc/cc-file.cc +5 -0
  775. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-arc/m-file-no-arc.m +5 -0
  776. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-arc/m-file.m +5 -0
  777. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-arc/mm-file-no-arc.mm +5 -0
  778. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-arc/mm-file.mm +5 -0
  779. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-arc/test.gyp +45 -0
  780. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-gc/c-file.c +1 -0
  781. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-gc/cc-file.cc +1 -0
  782. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-gc/main.m +6 -0
  783. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-gc/needs-gc-mm.mm +1 -0
  784. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-gc/needs-gc.m +1 -0
  785. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-gc/test.gyp +102 -0
  786. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/Framework-Info.plist +30 -0
  787. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/TestApp-Info.plist +32 -0
  788. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/copied.txt +1 -0
  789. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/empty.c +0 -0
  790. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/main.c +4 -0
  791. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/postbuild-copy-framework.sh +9 -0
  792. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/resource_file.sb +1 -0
  793. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/test.gyp +49 -0
  794. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-defaults/Info.plist +13 -0
  795. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-defaults/main.c +7 -0
  796. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-defaults/postbuild-defaults.sh +15 -0
  797. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-defaults/test.gyp +26 -0
  798. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-fail/file.c +6 -0
  799. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-fail/postbuild-fail.sh +6 -0
  800. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-fail/test.gyp +38 -0
  801. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-fail/touch-dynamic.sh +7 -0
  802. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-fail/touch-static.sh +7 -0
  803. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-multiple-configurations/main.c +4 -0
  804. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-multiple-configurations/postbuild-touch-file.sh +7 -0
  805. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-multiple-configurations/test.gyp +26 -0
  806. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-static-library/empty.c +4 -0
  807. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-static-library/postbuild-touch-file.sh +7 -0
  808. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-static-library/test.gyp +34 -0
  809. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/copy.sh +3 -0
  810. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/file.c +4 -0
  811. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/file_g.c +4 -0
  812. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/file_h.c +4 -0
  813. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/script/shared_library_postbuild.sh +23 -0
  814. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/script/static_library_postbuild.sh +23 -0
  815. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/subdirectory/copied_file.txt +1 -0
  816. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/subdirectory/nested_target.gyp +53 -0
  817. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/test.gyp +93 -0
  818. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/prefixheader/file.c +1 -0
  819. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/prefixheader/file.cc +1 -0
  820. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/prefixheader/file.m +1 -0
  821. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/prefixheader/file.mm +1 -0
  822. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/prefixheader/header.h +1 -0
  823. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/prefixheader/test.gyp +82 -0
  824. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rebuild/TestApp-Info.plist +32 -0
  825. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rebuild/delay-touch.sh +6 -0
  826. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rebuild/empty.c +0 -0
  827. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rebuild/main.c +1 -0
  828. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rebuild/test.gyp +56 -0
  829. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rpath/file.c +1 -0
  830. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rpath/main.c +1 -0
  831. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rpath/test.gyp +48 -0
  832. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/sdkroot/file.cc +5 -0
  833. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/sdkroot/test.gyp +35 -0
  834. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/sdkroot/test_shorthand.sh +20 -0
  835. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/sourceless-module/empty.c +1 -0
  836. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/sourceless-module/empty.txt +2 -0
  837. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/sourceless-module/fun.c +1 -0
  838. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/sourceless-module/test.gyp +96 -0
  839. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/file.c +22 -0
  840. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/main.c +25 -0
  841. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/strip.saves +5 -0
  842. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/subdirectory/nested_file.c +1 -0
  843. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/subdirectory/nested_strip.saves +5 -0
  844. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/subdirectory/subdirectory.gyp +38 -0
  845. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/subdirectory/test_reading_save_file_from_postbuild.sh +5 -0
  846. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/test-defaults.gyp +51 -0
  847. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/test.gyp +119 -0
  848. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/file.c +6 -0
  849. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test.gyp +100 -0
  850. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_bundle_executable.sh +21 -0
  851. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_bundle_loadable_module.sh +22 -0
  852. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_bundle_shared_library.sh +23 -0
  853. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_nonbundle_executable.sh +22 -0
  854. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_nonbundle_loadable_module.sh +21 -0
  855. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_nonbundle_none.sh +22 -0
  856. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_nonbundle_shared_library.sh +21 -0
  857. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_nonbundle_static_library.sh +21 -0
  858. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/unicode-settings/file.cc +2 -0
  859. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/unicode-settings/test.gyp +23 -0
  860. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/unicode-settings/test_bundle_display_name.sh +7 -0
  861. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-env-order/Info.plist +56 -0
  862. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-env-order/file.ext1 +0 -0
  863. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-env-order/file.ext2 +0 -0
  864. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-env-order/file.ext3 +0 -0
  865. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-env-order/main.c +7 -0
  866. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-env-order/test.gyp +121 -0
  867. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/aliasing.cc +13 -0
  868. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/test-clang.gyp +42 -0
  869. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/test.gyp +60 -0
  870. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/valid_c.c +8 -0
  871. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/valid_cc.cc +8 -0
  872. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/valid_m.m +8 -0
  873. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/valid_mm.mm +8 -0
  874. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/warn_about_invalid_offsetof_macro.cc +15 -0
  875. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/warn_about_missing_newline.c +8 -0
  876. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xctest/MyClass.h +8 -0
  877. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xctest/MyClass.m +8 -0
  878. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xctest/TestCase.m +16 -0
  879. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xctest/resource.txt +1 -0
  880. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xctest/test.gyp +47 -0
  881. data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xctest/test.xcodeproj/xcshareddata/xcschemes/classes.xcscheme +69 -0
  882. data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/dependencies.gyp +15 -0
  883. data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/gyptest-dependencies.py +26 -0
  884. data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/gyptest-noload.py +57 -0
  885. data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/main.cc +12 -0
  886. data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/main.h +0 -0
  887. data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/noload/all.gyp +18 -0
  888. data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/noload/lib/shared.c +3 -0
  889. data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/noload/lib/shared.gyp +16 -0
  890. data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/noload/lib/shared.h +1 -0
  891. data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/noload/main.c +9 -0
  892. data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/basics/gyptest-make_global_settings.py +46 -0
  893. data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/basics/make_global_settings.gyp +17 -0
  894. data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/env-wrapper/gyptest-wrapper.py +46 -0
  895. data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/env-wrapper/wrapper.gyp +17 -0
  896. data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/wrapper/gyptest-wrapper.py +47 -0
  897. data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/wrapper/wrapper.gyp +21 -0
  898. data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/file0 +0 -0
  899. data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/file1 +0 -0
  900. data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/file2 +0 -0
  901. data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/file3 +0 -0
  902. data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/file4 +0 -0
  903. data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/gyptest-many-actions-unsorted.py +34 -0
  904. data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/gyptest-many-actions.py +20 -0
  905. data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/many-actions-unsorted.gyp +154 -0
  906. data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/many-actions.gyp +1817 -0
  907. data/ext/tree-sitter/tree-sitter/externals/gyp/test/module/gyptest-default.py +29 -0
  908. data/ext/tree-sitter/tree-sitter/externals/gyp/test/module/src/lib1.c +10 -0
  909. data/ext/tree-sitter/tree-sitter/externals/gyp/test/module/src/lib2.c +10 -0
  910. data/ext/tree-sitter/tree-sitter/externals/gyp/test/module/src/module.gyp +53 -0
  911. data/ext/tree-sitter/tree-sitter/externals/gyp/test/module/src/program.c +111 -0
  912. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/buildevents/buildevents.gyp +14 -0
  913. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/buildevents/gyptest-msbuild-supports-prepostbuild.py +24 -0
  914. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/buildevents/gyptest-ninja-warnings.py +29 -0
  915. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/buildevents/main.cc +5 -0
  916. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/config_attrs/gyptest-config_attrs.py +31 -0
  917. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/config_attrs/hello.c +11 -0
  918. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/config_attrs/hello.gyp +21 -0
  919. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/express/base/base.gyp +22 -0
  920. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/express/express.gyp +19 -0
  921. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/express/gyptest-express.py +29 -0
  922. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/external.gyp +68 -0
  923. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/external_builder.py +9 -0
  924. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/gyptest-all.py +59 -0
  925. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/hello.cpp +10 -0
  926. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/hello.z +6 -0
  927. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/msbuild_action.py +9 -0
  928. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/msbuild_rule.py +11 -0
  929. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/filters/filters.gyp +47 -0
  930. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/filters/gyptest-filters-2008.py +68 -0
  931. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/filters/gyptest-filters-2010.py +57 -0
  932. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/list_excluded/gyptest-all.py +51 -0
  933. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/list_excluded/hello.cpp +10 -0
  934. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/list_excluded/hello_exclude.gyp +19 -0
  935. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/list_excluded/hello_mac.cpp +10 -0
  936. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/missing_sources/gyptest-missing.py +43 -0
  937. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/missing_sources/hello_missing.gyp +15 -0
  938. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/props/AppName.props +14 -0
  939. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/props/AppName.vsprops +11 -0
  940. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/props/gyptest-props.py +22 -0
  941. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/props/hello.c +11 -0
  942. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/props/hello.gyp +22 -0
  943. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/shared_output/common.gypi +17 -0
  944. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/shared_output/gyptest-shared_output.py +41 -0
  945. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/shared_output/hello.c +12 -0
  946. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/shared_output/hello.gyp +21 -0
  947. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/shared_output/there/there.c +12 -0
  948. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/shared_output/there/there.gyp +16 -0
  949. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/uldi2010/gyptest-all.py +20 -0
  950. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/uldi2010/hello.c +13 -0
  951. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/uldi2010/hello.gyp +26 -0
  952. data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/uldi2010/hello2.c +10 -0
  953. data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/gyptest-all.py +33 -0
  954. data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/gyptest-default.py +33 -0
  955. data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/src/common.c +7 -0
  956. data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/src/multiple.gyp +24 -0
  957. data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/src/prog1.c +10 -0
  958. data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/src/prog2.c +10 -0
  959. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/gyptest-action-dependencies.py +53 -0
  960. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/a.c +10 -0
  961. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/a.h +13 -0
  962. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/action_dependencies.gyp +88 -0
  963. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/b.c +18 -0
  964. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/b.h +13 -0
  965. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/c.c +10 -0
  966. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/c.h +13 -0
  967. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/emit.py +11 -0
  968. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/chained-dependency/chained-dependency.gyp +53 -0
  969. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/chained-dependency/chained.c +5 -0
  970. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/chained-dependency/gyptest-chained-dependency.py +26 -0
  971. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/normalize-paths-win/gyptest-normalize-paths.py +42 -0
  972. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/normalize-paths-win/hello.cc +7 -0
  973. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/normalize-paths-win/normalize-paths.gyp +56 -0
  974. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/s-needs-no-depfiles/empty.s +1 -0
  975. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py +42 -0
  976. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/s-needs-no-depfiles/s-needs-no-depfiles.gyp +13 -0
  977. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/solibs_avoid_relinking/gyptest-solibs-avoid-relinking.py +41 -0
  978. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/solibs_avoid_relinking/main.cc +5 -0
  979. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/solibs_avoid_relinking/solib.cc +8 -0
  980. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/solibs_avoid_relinking/solibs_avoid_relinking.gyp +38 -0
  981. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/use-custom-environment-files/gyptest-use-custom-environment-files.py +28 -0
  982. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/use-custom-environment-files/use-custom-environment-files.cc +7 -0
  983. data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/use-custom-environment-files/use-custom-environment-files.gyp +15 -0
  984. data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-cpp/gyptest-no-cpp.py +50 -0
  985. data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-cpp/src/call-f-main.c +2 -0
  986. data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-cpp/src/empty-main.c +1 -0
  987. data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-cpp/src/f.cc +3 -0
  988. data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-cpp/src/test.gyp +25 -0
  989. data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-output/gyptest-no-output.py +21 -0
  990. data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-output/src/nooutput.gyp +17 -0
  991. data/ext/tree-sitter/tree-sitter/externals/gyp/test/product/gyptest-product.py +44 -0
  992. data/ext/tree-sitter/tree-sitter/externals/gyp/test/product/hello.c +15 -0
  993. data/ext/tree-sitter/tree-sitter/externals/gyp/test/product/product.gyp +128 -0
  994. data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/gyptest-prune-targets.py +64 -0
  995. data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/lib1.cc +6 -0
  996. data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/lib2.cc +6 -0
  997. data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/lib3.cc +6 -0
  998. data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/lib_indirect.cc +6 -0
  999. data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/program.cc +7 -0
  1000. data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/test1.gyp +26 -0
  1001. data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/test2.gyp +30 -0
  1002. data/ext/tree-sitter/tree-sitter/externals/gyp/test/relative/foo/a/a.cc +9 -0
  1003. data/ext/tree-sitter/tree-sitter/externals/gyp/test/relative/foo/a/a.gyp +13 -0
  1004. data/ext/tree-sitter/tree-sitter/externals/gyp/test/relative/foo/a/c/c.cc +9 -0
  1005. data/ext/tree-sitter/tree-sitter/externals/gyp/test/relative/foo/a/c/c.gyp +12 -0
  1006. data/ext/tree-sitter/tree-sitter/externals/gyp/test/relative/foo/b/b.cc +9 -0
  1007. data/ext/tree-sitter/tree-sitter/externals/gyp/test/relative/foo/b/b.gyp +9 -0
  1008. data/ext/tree-sitter/tree-sitter/externals/gyp/test/relative/gyptest-default.py +25 -0
  1009. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rename/filecase/file.c +1 -0
  1010. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rename/filecase/test-casesensitive.gyp +15 -0
  1011. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rename/filecase/test.gyp +14 -0
  1012. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rename/gyptest-filecase.py +35 -0
  1013. data/ext/tree-sitter/tree-sitter/externals/gyp/test/restat/gyptest-restat.py +31 -0
  1014. data/ext/tree-sitter/tree-sitter/externals/gyp/test/restat/src/create_intermediate.py +17 -0
  1015. data/ext/tree-sitter/tree-sitter/externals/gyp/test/restat/src/restat.gyp +50 -0
  1016. data/ext/tree-sitter/tree-sitter/externals/gyp/test/restat/src/touch.py +16 -0
  1017. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/gyptest-dirname.py +36 -0
  1018. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/actions.gyp +15 -0
  1019. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/copy-file.py +11 -0
  1020. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/a/b/c.gencc +11 -0
  1021. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/a/b/c.printvars +1 -0
  1022. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/foo/bar/baz.gencc +11 -0
  1023. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/foo/bar/baz.printvars +1 -0
  1024. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/input-rule-dirname.gyp +92 -0
  1025. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/main.cc +12 -0
  1026. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/printvars.py +14 -0
  1027. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/gyptest-all.py +70 -0
  1028. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/gyptest-default.py +91 -0
  1029. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/src/main.c +12 -0
  1030. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/src/make-sources.py +19 -0
  1031. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/src/prog1.in +7 -0
  1032. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/src/prog2.in +7 -0
  1033. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/src/same_target.gyp +31 -0
  1034. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-use-built-dependencies/gyptest-use-built-dependencies.py +22 -0
  1035. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-use-built-dependencies/src/main.cc +17 -0
  1036. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-use-built-dependencies/src/use-built-dependencies-rule.gyp +42 -0
  1037. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/gyptest-rules-variables.py +26 -0
  1038. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/src/input_ext.c +9 -0
  1039. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/src/input_name/test.c +9 -0
  1040. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/src/input_path/subdir/test.c +9 -0
  1041. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/src/subdir/input_dirname.c +9 -0
  1042. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/src/subdir/test.c +18 -0
  1043. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/src/test.input_root.c +9 -0
  1044. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/src/variables.gyp +40 -0
  1045. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/gyptest-all.py +69 -0
  1046. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/gyptest-default.py +55 -0
  1047. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/gyptest-input-root.py +26 -0
  1048. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/gyptest-special-variables.py +18 -0
  1049. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/actions.gyp +22 -0
  1050. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/an_asm.S +6 -0
  1051. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/as.bat +7 -0
  1052. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/copy-file.py +11 -0
  1053. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/external/external.gyp +66 -0
  1054. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/external/file1.in +1 -0
  1055. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/external/file2.in +1 -0
  1056. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/input-root.gyp +24 -0
  1057. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/noaction/file1.in +1 -0
  1058. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/noaction/no_action_with_rules_fails.gyp +37 -0
  1059. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/rule.py +17 -0
  1060. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/somefile.ext +0 -0
  1061. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/special-variables.gyp +35 -0
  1062. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir1/executable.gyp +37 -0
  1063. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir1/function1.in +6 -0
  1064. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir1/function2.in +6 -0
  1065. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir1/program.c +12 -0
  1066. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir2/file1.in +1 -0
  1067. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir2/file2.in +1 -0
  1068. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir2/never_used.gyp +31 -0
  1069. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir2/no_action.gyp +38 -0
  1070. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir2/no_inputs.gyp +32 -0
  1071. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir2/none.gyp +33 -0
  1072. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir3/executable2.gyp +37 -0
  1073. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir3/function3.in +6 -0
  1074. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir3/program.c +10 -0
  1075. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir4/asm-function.assem +10 -0
  1076. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir4/build-asm.gyp +49 -0
  1077. data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir4/program.c +19 -0
  1078. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/gyptest-all.py +38 -0
  1079. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/gyptest-default.py +38 -0
  1080. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/gyptest-library.py +20 -0
  1081. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/library/one/sub.gyp +11 -0
  1082. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/library/test.gyp +15 -0
  1083. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/library/two/sub.gyp +11 -0
  1084. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/src/all.gyp +16 -0
  1085. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/src/subdir1/executable.gyp +15 -0
  1086. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/src/subdir1/main1.cc +6 -0
  1087. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/src/subdir2/executable.gyp +15 -0
  1088. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/src/subdir2/main2.cc +6 -0
  1089. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-rule-output-file-name/gyptest-all.py +23 -0
  1090. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-rule-output-file-name/src/subdir1/subdir1.gyp +30 -0
  1091. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-rule-output-file-name/src/subdir2/subdir2.gyp +30 -0
  1092. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-rule-output-file-name/src/subdirs.gyp +16 -0
  1093. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-rule-output-file-name/src/touch.py +11 -0
  1094. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/gyptest-all.py +34 -0
  1095. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/gyptest-default.py +34 -0
  1096. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/gyptest-fail-shared.py +18 -0
  1097. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/gyptest-fail-static.py +18 -0
  1098. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/gyptest-pass-executable.py +33 -0
  1099. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/all.gyp +30 -0
  1100. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/double-executable.gyp +21 -0
  1101. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/double-shared.gyp +21 -0
  1102. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/double-static.gyp +21 -0
  1103. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/func.c +6 -0
  1104. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/prog1.c +16 -0
  1105. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/prog2.c +16 -0
  1106. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/prog3.c +18 -0
  1107. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/subdir1/func.c +6 -0
  1108. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/subdir2/func.c +6 -0
  1109. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name-different-directory/gyptest-all.py +36 -0
  1110. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name-different-directory/src/subdir1/subdir1.gyp +66 -0
  1111. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name-different-directory/src/subdir2/subdir2.gyp +66 -0
  1112. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name-different-directory/src/subdirs.gyp +16 -0
  1113. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name-different-directory/src/touch.py +11 -0
  1114. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name/gyptest-same-target-name.py +18 -0
  1115. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name/src/all.gyp +16 -0
  1116. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name/src/executable1.gyp +15 -0
  1117. data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name/src/executable2.gyp +15 -0
  1118. data/ext/tree-sitter/tree-sitter/externals/gyp/test/sanitize-rule-names/blah.S +0 -0
  1119. data/ext/tree-sitter/tree-sitter/externals/gyp/test/sanitize-rule-names/gyptest-sanitize-rule-names.py +17 -0
  1120. data/ext/tree-sitter/tree-sitter/externals/gyp/test/sanitize-rule-names/hello.cc +7 -0
  1121. data/ext/tree-sitter/tree-sitter/externals/gyp/test/sanitize-rule-names/sanitize-rule-names.gyp +27 -0
  1122. data/ext/tree-sitter/tree-sitter/externals/gyp/test/sanitize-rule-names/script.py +10 -0
  1123. data/ext/tree-sitter/tree-sitter/externals/gyp/test/self-dependency/common.gypi +13 -0
  1124. data/ext/tree-sitter/tree-sitter/externals/gyp/test/self-dependency/dep.gyp +23 -0
  1125. data/ext/tree-sitter/tree-sitter/externals/gyp/test/self-dependency/gyptest-self-dependency.py +19 -0
  1126. data/ext/tree-sitter/tree-sitter/externals/gyp/test/self-dependency/self_dependency.gyp +15 -0
  1127. data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/gyptest-all.py +39 -0
  1128. data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/gyptest-relocate.py +41 -0
  1129. data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/src/build/all.gyp +16 -0
  1130. data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/src/prog1/prog1.c +7 -0
  1131. data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/src/prog1/prog1.gyp +15 -0
  1132. data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/src/prog2/prog2.c +7 -0
  1133. data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/src/prog2/prog2.gyp +15 -0
  1134. data/ext/tree-sitter/tree-sitter/externals/gyp/test/small/gyptest-small.py +55 -0
  1135. data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone-static-library/gyptest-standalone-static-library.py +52 -0
  1136. data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone-static-library/invalid.gyp +16 -0
  1137. data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone-static-library/mylib.c +7 -0
  1138. data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone-static-library/mylib.gyp +26 -0
  1139. data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone-static-library/prog.c +7 -0
  1140. data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone/gyptest-standalone.py +33 -0
  1141. data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone/standalone.gyp +12 -0
  1142. data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-SYMROOT-all.py +36 -0
  1143. data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-SYMROOT-default.py +37 -0
  1144. data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-subdir-all.py +35 -0
  1145. data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-subdir-default.py +35 -0
  1146. data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-subdir2-deep.py +25 -0
  1147. data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-top-all.py +43 -0
  1148. data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-top-default.py +43 -0
  1149. data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/prog1.c +7 -0
  1150. data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/prog1.gyp +21 -0
  1151. data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/subdir/prog2.c +7 -0
  1152. data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/subdir/prog2.gyp +18 -0
  1153. data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/subdir/subdir2/prog3.c +7 -0
  1154. data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/subdir/subdir2/prog3.gyp +18 -0
  1155. data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/symroot.gypi +16 -0
  1156. data/ext/tree-sitter/tree-sitter/externals/gyp/test/target/gyptest-target.py +37 -0
  1157. data/ext/tree-sitter/tree-sitter/externals/gyp/test/target/hello.c +7 -0
  1158. data/ext/tree-sitter/tree-sitter/externals/gyp/test/target/target.gyp +24 -0
  1159. data/ext/tree-sitter/tree-sitter/externals/gyp/test/toolsets/gyptest-toolsets.py +31 -0
  1160. data/ext/tree-sitter/tree-sitter/externals/gyp/test/toolsets/main.cc +13 -0
  1161. data/ext/tree-sitter/tree-sitter/externals/gyp/test/toolsets/toolsets.cc +11 -0
  1162. data/ext/tree-sitter/tree-sitter/externals/gyp/test/toolsets/toolsets.gyp +62 -0
  1163. data/ext/tree-sitter/tree-sitter/externals/gyp/test/toolsets/toolsets_shared.cc +11 -0
  1164. data/ext/tree-sitter/tree-sitter/externals/gyp/test/toplevel-dir/gyptest-toplevel-dir.py +31 -0
  1165. data/ext/tree-sitter/tree-sitter/externals/gyp/test/toplevel-dir/src/sub1/main.gyp +18 -0
  1166. data/ext/tree-sitter/tree-sitter/externals/gyp/test/toplevel-dir/src/sub1/prog1.c +7 -0
  1167. data/ext/tree-sitter/tree-sitter/externals/gyp/test/toplevel-dir/src/sub2/prog2.c +7 -0
  1168. data/ext/tree-sitter/tree-sitter/externals/gyp/test/toplevel-dir/src/sub2/prog2.gyp +15 -0
  1169. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands-repeated.gyp +128 -0
  1170. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands-repeated.gyp.stdout +136 -0
  1171. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands-repeated.gypd.golden +77 -0
  1172. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands.gyp +91 -0
  1173. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands.gyp.ignore-env.stdout +96 -0
  1174. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands.gyp.stdout +96 -0
  1175. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands.gypd.golden +66 -0
  1176. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands.gypi +23 -0
  1177. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/gyptest-commands-ignore-env.py +46 -0
  1178. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/gyptest-commands-repeated.py +38 -0
  1179. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/gyptest-commands.py +39 -0
  1180. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/test.py +1 -0
  1181. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/update_golden +11 -0
  1182. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/filelist.gyp.stdout +26 -0
  1183. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/filelist.gypd.golden +43 -0
  1184. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/gyptest-filelist-golden.py +51 -0
  1185. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/gyptest-filelist.py +29 -0
  1186. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/src/dummy.py +5 -0
  1187. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/src/filelist.gyp +93 -0
  1188. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/src/filelist2.gyp +40 -0
  1189. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/update_golden +8 -0
  1190. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/latelate/gyptest-latelate.py +25 -0
  1191. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/latelate/src/latelate.gyp +34 -0
  1192. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/latelate/src/program.cc +13 -0
  1193. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/variable-in-path/C1/hello.cc +7 -0
  1194. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/variable-in-path/gyptest-variable-in-path.py +23 -0
  1195. data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/variable-in-path/variable-in-path.gyp +31 -0
  1196. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/asm-files/asm-files.gyp +17 -0
  1197. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/asm-files/b.s +0 -0
  1198. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/asm-files/c.S +0 -0
  1199. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/asm-files/hello.cc +7 -0
  1200. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/batch-file-action/batch-file-action.gyp +21 -0
  1201. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/batch-file-action/infile +1 -0
  1202. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/batch-file-action/somecmd.bat +5 -0
  1203. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/command-quote/a.S +0 -0
  1204. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/command-quote/bat with spaces.bat +7 -0
  1205. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/command-quote/command-quote.gyp +84 -0
  1206. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/command-quote/go.bat +7 -0
  1207. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/command-quote/subdir/and/another/in-subdir.gyp +28 -0
  1208. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/additional-include-dirs.cc +10 -0
  1209. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/additional-include-dirs.gyp +20 -0
  1210. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/additional-options.cc +10 -0
  1211. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/additional-options.gyp +31 -0
  1212. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/analysis.gyp +40 -0
  1213. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/buffer-security-check.gyp +51 -0
  1214. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/buffer-security.cc +12 -0
  1215. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/character-set-mbcs.cc +11 -0
  1216. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/character-set-unicode.cc +15 -0
  1217. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/character-set.gyp +35 -0
  1218. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/debug-format.gyp +48 -0
  1219. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/default-char-is-unsigned.cc +15 -0
  1220. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/default-char-is-unsigned.gyp +20 -0
  1221. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/disable-specific-warnings.cc +9 -0
  1222. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/disable-specific-warnings.gyp +29 -0
  1223. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/exception-handling-on.cc +24 -0
  1224. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/exception-handling.gyp +46 -0
  1225. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/force-include-files-with-precompiled.cc +10 -0
  1226. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/force-include-files.cc +8 -0
  1227. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/force-include-files.gyp +36 -0
  1228. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/function-level-linking.cc +11 -0
  1229. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/function-level-linking.gyp +28 -0
  1230. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/hello.cc +7 -0
  1231. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/optimizations.gyp +207 -0
  1232. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/pdbname-override.gyp +26 -0
  1233. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/pdbname.cc +7 -0
  1234. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/pdbname.gyp +24 -0
  1235. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/precomp.cc +6 -0
  1236. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/rtti-on.cc +11 -0
  1237. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/rtti.gyp +37 -0
  1238. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/runtime-checks.cc +11 -0
  1239. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/runtime-checks.gyp +29 -0
  1240. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/runtime-library-md.cc +19 -0
  1241. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/runtime-library-mdd.cc +19 -0
  1242. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/runtime-library-mt.cc +19 -0
  1243. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/runtime-library-mtd.cc +19 -0
  1244. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/runtime-library.gyp +48 -0
  1245. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/subdir/header.h +0 -0
  1246. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/treat-wchar-t-as-built-in-type.gyp +33 -0
  1247. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/treat-wchar-t-as-built-in-type1.cc +11 -0
  1248. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/treat-wchar-t-as-built-in-type2.cc +11 -0
  1249. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/uninit.cc +13 -0
  1250. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/warning-as-error.cc +9 -0
  1251. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/warning-as-error.gyp +37 -0
  1252. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/warning-level.gyp +115 -0
  1253. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/warning-level1.cc +8 -0
  1254. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/warning-level2.cc +14 -0
  1255. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/warning-level3.cc +11 -0
  1256. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/warning-level4.cc +10 -0
  1257. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/generator-output-different-drive/gyptest-generator-output-different-drive.py +44 -0
  1258. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/generator-output-different-drive/prog.c +10 -0
  1259. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/generator-output-different-drive/prog.gyp +15 -0
  1260. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-asm-files.py +26 -0
  1261. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-additional-include-dirs.py +22 -0
  1262. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-additional-options.py +28 -0
  1263. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-analysis.py +30 -0
  1264. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-buffer-security-check.py +53 -0
  1265. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-character-set.py +22 -0
  1266. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-debug-format.py +43 -0
  1267. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-default-char-is-unsigned.py +22 -0
  1268. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-disable-specific-warnings.py +32 -0
  1269. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-exception-handling.py +33 -0
  1270. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-force-include-files.py +22 -0
  1271. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-function-level-linking.py +52 -0
  1272. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-optimizations.py +105 -0
  1273. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-pdbname-override.py +27 -0
  1274. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-pdbname.py +30 -0
  1275. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-rtti.py +30 -0
  1276. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-runtime-checks.py +30 -0
  1277. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-runtime-library.py +22 -0
  1278. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-treat-wchar-t-as-built-in-type.py +22 -0
  1279. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-warning-as-error.py +30 -0
  1280. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-warning-level.py +41 -0
  1281. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-command-quote.py +37 -0
  1282. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-lib-ltcg.py +22 -0
  1283. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-additional-deps.py +22 -0
  1284. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-additional-options.py +22 -0
  1285. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-aslr.py +35 -0
  1286. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-base-address.py +62 -0
  1287. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-debug-info.py +26 -0
  1288. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-default-libs.py +22 -0
  1289. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-deffile.py +43 -0
  1290. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-defrelink.py +51 -0
  1291. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-delay-load-dlls.py +35 -0
  1292. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-embed-manifest.py +99 -0
  1293. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-enable-uac.py +95 -0
  1294. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-entrypointsymbol.py +24 -0
  1295. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-fixed-base.py +40 -0
  1296. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-force-symbol-reference.py +26 -0
  1297. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-generate-manifest.py +127 -0
  1298. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-incremental.py +37 -0
  1299. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-large-address-aware.py +35 -0
  1300. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-large-pdb.py +70 -0
  1301. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-library-adjust.py +21 -0
  1302. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-library-directories.py +35 -0
  1303. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-ltcg.py +36 -0
  1304. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-mapfile.py +44 -0
  1305. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-nodefaultlib.py +24 -0
  1306. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-nxcompat.py +37 -0
  1307. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-opt-icf.py +41 -0
  1308. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-opt-ref.py +40 -0
  1309. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-ordering.py +101 -0
  1310. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-outputfile.py +28 -0
  1311. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-pdb-output.py +34 -0
  1312. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-pdb.py +35 -0
  1313. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-pgo.py +75 -0
  1314. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-profile.py +37 -0
  1315. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-restat-importlib.py +39 -0
  1316. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-shard.py +27 -0
  1317. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-subsystem.py +38 -0
  1318. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-target-machine.py +28 -0
  1319. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-tsaware.py +33 -0
  1320. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-uldi.py +28 -0
  1321. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-unsupported-manifest.py +27 -0
  1322. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-update-manifest.py +103 -0
  1323. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-warnings-as-errors.py +24 -0
  1324. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-long-command-line.py +23 -0
  1325. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-macro-projectname.py +24 -0
  1326. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-macro-targetname.py +29 -0
  1327. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-macro-vcinstalldir.py +24 -0
  1328. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-macros-containing-gyp.py +21 -0
  1329. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-macros-in-inputs-and-outputs.py +27 -0
  1330. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-midl-rules.py +24 -0
  1331. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-quoting-commands.py +25 -0
  1332. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-rc-build.py +24 -0
  1333. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/idl-rules/basic-idl.gyp +42 -0
  1334. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/idl-rules/history_indexer.idl +17 -0
  1335. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/idl-rules/history_indexer_user.cc +15 -0
  1336. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/importlib/has-exports.cc +10 -0
  1337. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/importlib/hello.cc +9 -0
  1338. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/importlib/importlib.gyp +30 -0
  1339. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/large-pdb/dllmain.cc +9 -0
  1340. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/large-pdb/large-pdb.gyp +98 -0
  1341. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/large-pdb/main.cc +7 -0
  1342. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/lib-flags/answer.cc +9 -0
  1343. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/lib-flags/answer.h +5 -0
  1344. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/lib-flags/ltcg.gyp +21 -0
  1345. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/a/x.cc +7 -0
  1346. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/a/z.cc +7 -0
  1347. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/additional-deps.cc +10 -0
  1348. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/additional-deps.gyp +30 -0
  1349. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/additional-options.gyp +29 -0
  1350. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/aslr.gyp +35 -0
  1351. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/b/y.cc +7 -0
  1352. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/base-address.gyp +38 -0
  1353. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/debug-info.gyp +28 -0
  1354. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/deffile-multiple.gyp +17 -0
  1355. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/deffile.cc +13 -0
  1356. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/deffile.def +8 -0
  1357. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/deffile.gyp +38 -0
  1358. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/delay-load-dlls.gyp +35 -0
  1359. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/delay-load.cc +10 -0
  1360. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/embed-manifest.gyp +109 -0
  1361. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/enable-uac.gyp +45 -0
  1362. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/entrypointsymbol.cc +13 -0
  1363. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/entrypointsymbol.gyp +28 -0
  1364. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/extra.manifest +11 -0
  1365. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/extra2.manifest +11 -0
  1366. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/fixed-base.gyp +52 -0
  1367. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/force-symbol-reference.gyp +39 -0
  1368. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/generate-manifest.gyp +166 -0
  1369. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/hello.cc +7 -0
  1370. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/incremental.gyp +65 -0
  1371. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/inline_test.cc +12 -0
  1372. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/inline_test.h +5 -0
  1373. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/inline_test_main.cc +15 -0
  1374. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/large-address-aware.gyp +28 -0
  1375. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/library-adjust.cc +10 -0
  1376. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/library-adjust.gyp +16 -0
  1377. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/library-directories-define.cc +7 -0
  1378. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/library-directories-reference.cc +10 -0
  1379. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/library-directories.gyp +42 -0
  1380. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/link-ordering.gyp +95 -0
  1381. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/link-warning.cc +10 -0
  1382. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/ltcg.gyp +42 -0
  1383. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/main-crt.c +8 -0
  1384. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/manifest-in-comment.cc +13 -0
  1385. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/mapfile.cc +12 -0
  1386. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/mapfile.gyp +45 -0
  1387. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/no-default-libs.cc +18 -0
  1388. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/no-default-libs.gyp +13 -0
  1389. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/nodefaultlib.cc +13 -0
  1390. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/nodefaultlib.gyp +30 -0
  1391. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/nxcompat.gyp +35 -0
  1392. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/opt-icf.cc +29 -0
  1393. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/opt-icf.gyp +63 -0
  1394. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/opt-ref.cc +11 -0
  1395. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/opt-ref.gyp +56 -0
  1396. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/outputfile.gyp +58 -0
  1397. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/pdb-output.gyp +36 -0
  1398. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/pgo.gyp +143 -0
  1399. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/profile.gyp +50 -0
  1400. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/program-database.gyp +40 -0
  1401. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/subdir/library.gyp +13 -0
  1402. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/subsystem-windows.cc +9 -0
  1403. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/subsystem.gyp +70 -0
  1404. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/target-machine.gyp +48 -0
  1405. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/tsaware.gyp +28 -0
  1406. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/unsupported-manifest.gyp +13 -0
  1407. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/update_pgd.py +35 -0
  1408. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/warn-as-error.gyp +33 -0
  1409. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/x.cc +7 -0
  1410. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/y.cc +7 -0
  1411. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/z.cc +7 -0
  1412. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/long-command-line/function.cc +7 -0
  1413. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/long-command-line/hello.cc +7 -0
  1414. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/long-command-line/long-command-line.gyp +54 -0
  1415. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/precompiled/gyptest-all.py +21 -0
  1416. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/precompiled/hello.c +14 -0
  1417. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/precompiled/hello.gyp +28 -0
  1418. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/precompiled/hello2.c +13 -0
  1419. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/precompiled/precomp.c +8 -0
  1420. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/Resource.h +26 -0
  1421. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/hello.cpp +30 -0
  1422. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/hello.gyp +92 -0
  1423. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/hello.h +3 -0
  1424. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/hello.ico +0 -0
  1425. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/hello.rc +86 -0
  1426. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/hello3.rc +87 -0
  1427. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/small.ico +0 -0
  1428. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/subdir/hello2.rc +87 -0
  1429. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/subdir/include.h +1 -0
  1430. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/targetver.h +24 -0
  1431. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/shard/hello1.cc +7 -0
  1432. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/shard/hello2.cc +7 -0
  1433. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/shard/hello3.cc +7 -0
  1434. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/shard/hello4.cc +7 -0
  1435. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/shard/shard.gyp +20 -0
  1436. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/uldi/a.cc +7 -0
  1437. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/uldi/b.cc +7 -0
  1438. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/uldi/main.cc +10 -0
  1439. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/uldi/uldi.gyp +45 -0
  1440. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/as.py +18 -0
  1441. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/containing-gyp.gyp +40 -0
  1442. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/do_stuff.py +8 -0
  1443. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/hello.cc +7 -0
  1444. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/input-output-macros.gyp +33 -0
  1445. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/input.S +0 -0
  1446. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/projectname.gyp +29 -0
  1447. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/stuff.blah +1 -0
  1448. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/targetname.gyp +52 -0
  1449. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/test_exists.py +10 -0
  1450. data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/vcinstalldir.gyp +41 -0
  1451. data/ext/tree-sitter/tree-sitter/externals/gyp/tools/README +15 -0
  1452. data/ext/tree-sitter/tree-sitter/externals/gyp/tools/Xcode/README +5 -0
  1453. data/ext/tree-sitter/tree-sitter/externals/gyp/tools/Xcode/Specifications/gyp.pbfilespec +27 -0
  1454. data/ext/tree-sitter/tree-sitter/externals/gyp/tools/Xcode/Specifications/gyp.xclangspec +226 -0
  1455. data/ext/tree-sitter/tree-sitter/externals/gyp/tools/emacs/README +12 -0
  1456. data/ext/tree-sitter/tree-sitter/externals/gyp/tools/emacs/gyp-tests.el +63 -0
  1457. data/ext/tree-sitter/tree-sitter/externals/gyp/tools/emacs/gyp.el +252 -0
  1458. data/ext/tree-sitter/tree-sitter/externals/gyp/tools/emacs/run-unit-tests.sh +7 -0
  1459. data/ext/tree-sitter/tree-sitter/externals/gyp/tools/emacs/testdata/media.gyp +1105 -0
  1460. data/ext/tree-sitter/tree-sitter/externals/gyp/tools/emacs/testdata/media.gyp.fontified +1107 -0
  1461. data/ext/tree-sitter/tree-sitter/externals/gyp/tools/graphviz.py +100 -0
  1462. data/ext/tree-sitter/tree-sitter/externals/gyp/tools/pretty_gyp.py +155 -0
  1463. data/ext/tree-sitter/tree-sitter/externals/gyp/tools/pretty_sln.py +168 -0
  1464. data/ext/tree-sitter/tree-sitter/externals/gyp/tools/pretty_vcproj.py +329 -0
  1465. data/ext/tree-sitter/tree-sitter/externals/json-parser/AUTHORS +20 -0
  1466. data/ext/tree-sitter/tree-sitter/externals/json-parser/LICENSE +26 -0
  1467. data/ext/tree-sitter/tree-sitter/externals/json-parser/Makefile.in +68 -0
  1468. data/ext/tree-sitter/tree-sitter/externals/json-parser/README.md +97 -0
  1469. data/ext/tree-sitter/tree-sitter/externals/json-parser/bindings/python/example/test.json +88 -0
  1470. data/ext/tree-sitter/tree-sitter/externals/json-parser/bindings/python/example/test.py +11 -0
  1471. data/ext/tree-sitter/tree-sitter/externals/json-parser/bindings/python/jsonparser.pyx +9 -0
  1472. data/ext/tree-sitter/tree-sitter/externals/json-parser/bindings/python/setup.py +14 -0
  1473. data/ext/tree-sitter/tree-sitter/externals/json-parser/bindings/python/wrap_json.c +95 -0
  1474. data/ext/tree-sitter/tree-sitter/externals/json-parser/configure +3796 -0
  1475. data/ext/tree-sitter/tree-sitter/externals/json-parser/configure.ac +30 -0
  1476. data/ext/tree-sitter/tree-sitter/externals/json-parser/examples/test_json.c +180 -0
  1477. data/ext/tree-sitter/tree-sitter/externals/json-parser/json-parser.pc.in +10 -0
  1478. data/ext/tree-sitter/tree-sitter/externals/json-parser/json.c +1011 -0
  1479. data/ext/tree-sitter/tree-sitter/externals/json-parser/json.h +283 -0
  1480. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/ext-invalid-0001.json +3 -0
  1481. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/ext-invalid-0002.json +1 -0
  1482. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/ext-valid-0001.json +9 -0
  1483. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/ext-valid-0002.json +4 -0
  1484. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/ext-valid-0003.json +3 -0
  1485. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0000.json +0 -0
  1486. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0001.json +2 -0
  1487. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0002.json +2 -0
  1488. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0003.json +88 -0
  1489. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0004.json +2 -0
  1490. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0005.json +2 -0
  1491. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0006.json +3 -0
  1492. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0007.json +1 -0
  1493. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0008.json +1 -0
  1494. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0009.json +1 -0
  1495. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0010.json +1 -0
  1496. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/test.py +70 -0
  1497. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0000.json +88 -0
  1498. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0001.json +2 -0
  1499. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0002.json +2 -0
  1500. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0003.json +3 -0
  1501. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0004.json +1 -0
  1502. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0005.json +15 -0
  1503. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0006.json +1 -0
  1504. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0007.json +2 -0
  1505. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0008.json +8 -0
  1506. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0009.json +1 -0
  1507. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0010.json +1 -0
  1508. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0011.json +1 -0
  1509. data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0012.json +5 -0
  1510. data/ext/tree-sitter/tree-sitter/externals/utf8proc/CMakeLists.txt +31 -0
  1511. data/ext/tree-sitter/tree-sitter/externals/utf8proc/Doxyfile +1528 -0
  1512. data/ext/tree-sitter/tree-sitter/externals/utf8proc/LICENSE.md +93 -0
  1513. data/ext/tree-sitter/tree-sitter/externals/utf8proc/MANIFEST +7 -0
  1514. data/ext/tree-sitter/tree-sitter/externals/utf8proc/Makefile +145 -0
  1515. data/ext/tree-sitter/tree-sitter/externals/utf8proc/NEWS.md +234 -0
  1516. data/ext/tree-sitter/tree-sitter/externals/utf8proc/README.md +67 -0
  1517. data/ext/tree-sitter/tree-sitter/externals/utf8proc/appveyor.yml +42 -0
  1518. data/ext/tree-sitter/tree-sitter/externals/utf8proc/bench/Makefile +39 -0
  1519. data/ext/tree-sitter/tree-sitter/externals/utf8proc/bench/bench.c +56 -0
  1520. data/ext/tree-sitter/tree-sitter/externals/utf8proc/bench/icu.c +61 -0
  1521. data/ext/tree-sitter/tree-sitter/externals/utf8proc/bench/unistring.c +60 -0
  1522. data/ext/tree-sitter/tree-sitter/externals/utf8proc/bench/util.c +39 -0
  1523. data/ext/tree-sitter/tree-sitter/externals/utf8proc/bench/util.h +22 -0
  1524. data/ext/tree-sitter/tree-sitter/externals/utf8proc/data/Makefile +63 -0
  1525. data/ext/tree-sitter/tree-sitter/externals/utf8proc/data/charwidths.jl +190 -0
  1526. data/ext/tree-sitter/tree-sitter/externals/utf8proc/data/data_generator.rb +328 -0
  1527. data/ext/tree-sitter/tree-sitter/externals/utf8proc/lump.md +27 -0
  1528. data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/case.c +50 -0
  1529. data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/charwidth.c +71 -0
  1530. data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/graphemetest.c +74 -0
  1531. data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/iterate.c +160 -0
  1532. data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/normtest.c +64 -0
  1533. data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/printproperty.c +51 -0
  1534. data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/tests.c +46 -0
  1535. data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/tests.h +23 -0
  1536. data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/valid.c +41 -0
  1537. data/ext/tree-sitter/tree-sitter/externals/utf8proc/utf8proc.c +644 -0
  1538. data/ext/tree-sitter/tree-sitter/externals/utf8proc/utf8proc.h +601 -0
  1539. data/ext/tree-sitter/tree-sitter/externals/utf8proc/utf8proc_data.c +16752 -0
  1540. data/ext/tree-sitter/tree-sitter/externals/utf8proc/utils.cmake +20 -0
  1541. data/ext/tree-sitter/tree-sitter/gyp-mac-tool +511 -0
  1542. data/ext/tree-sitter/tree-sitter/include/tree_sitter/compiler.h +32 -0
  1543. data/ext/tree-sitter/tree-sitter/include/tree_sitter/parser.h +188 -0
  1544. data/ext/tree-sitter/tree-sitter/include/tree_sitter/runtime.h +126 -0
  1545. data/ext/tree-sitter/tree-sitter/out/Release/libcompiler.a +0 -0
  1546. data/ext/tree-sitter/tree-sitter/out/Release/libruntime.a +0 -0
  1547. data/ext/tree-sitter/tree-sitter/out/Release/linker.lock +0 -0
  1548. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/externals/json-parser/json.o +0 -0
  1549. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/externals/utf8proc/utf8proc.o +0 -0
  1550. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/build_lex_table.o +0 -0
  1551. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/build_parse_table.o +0 -0
  1552. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/build_tables.o +0 -0
  1553. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/lex_conflict_manager.o +0 -0
  1554. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/lex_item.o +0 -0
  1555. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/lex_item_transitions.o +0 -0
  1556. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/lookahead_set.o +0 -0
  1557. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/parse_item.o +0 -0
  1558. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/parse_item_set_builder.o +0 -0
  1559. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/recovery_tokens.o +0 -0
  1560. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/rule_can_be_blank.o +0 -0
  1561. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/compile.o +0 -0
  1562. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/generate_code/c_code.o +0 -0
  1563. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/lex_table.o +0 -0
  1564. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/parse_grammar.o +0 -0
  1565. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/parse_table.o +0 -0
  1566. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/precedence_range.o +0 -0
  1567. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/expand_repeats.o +0 -0
  1568. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/expand_tokens.o +0 -0
  1569. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/extract_choices.o +0 -0
  1570. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/extract_tokens.o +0 -0
  1571. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/flatten_grammar.o +0 -0
  1572. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/intern_symbols.o +0 -0
  1573. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/is_token.o +0 -0
  1574. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/normalize_rules.o +0 -0
  1575. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/parse_regex.o +0 -0
  1576. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/prepare_grammar.o +0 -0
  1577. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/token_description.o +0 -0
  1578. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rule.o +0 -0
  1579. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/blank.o +0 -0
  1580. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/built_in_symbols.o +0 -0
  1581. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/character_range.o +0 -0
  1582. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/character_set.o +0 -0
  1583. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/choice.o +0 -0
  1584. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/metadata.o +0 -0
  1585. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/named_symbol.o +0 -0
  1586. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/pattern.o +0 -0
  1587. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/repeat.o +0 -0
  1588. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/rules.o +0 -0
  1589. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/seq.o +0 -0
  1590. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/string.o +0 -0
  1591. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/symbol.o +0 -0
  1592. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/visitor.o +0 -0
  1593. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/syntax_grammar.o +0 -0
  1594. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/util/string_helpers.o +0 -0
  1595. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/variable.o +0 -0
  1596. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/externals/utf8proc/utf8proc.o +0 -0
  1597. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/document.o +0 -0
  1598. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/error_costs.o +0 -0
  1599. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/language.o +0 -0
  1600. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/lexer.o +0 -0
  1601. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/node.o +0 -0
  1602. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/parser.o +0 -0
  1603. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/stack.o +0 -0
  1604. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/string_input.o +0 -0
  1605. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/tree.o +0 -0
  1606. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/utf16.o +0 -0
  1607. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/build_tables/distinctive_tokens_spec.o +0 -0
  1608. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/build_tables/lex_conflict_manager_spec.o +0 -0
  1609. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/build_tables/lex_item_spec.o +0 -0
  1610. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/build_tables/parse_item_set_builder_spec.o +0 -0
  1611. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/build_tables/rule_can_be_blank_spec.o +0 -0
  1612. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/expand_repeats_spec.o +0 -0
  1613. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/expand_tokens_spec.o +0 -0
  1614. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/extract_choices_spec.o +0 -0
  1615. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/extract_tokens_spec.o +0 -0
  1616. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/flatten_grammar_spec.o +0 -0
  1617. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/intern_symbols_spec.o +0 -0
  1618. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/parse_regex_spec.o +0 -0
  1619. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/rules/character_set_spec.o +0 -0
  1620. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/rules/choice_spec.o +0 -0
  1621. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/rules/repeat_spec.o +0 -0
  1622. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/util/string_helpers_spec.o +0 -0
  1623. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/encoding_helpers.o +0 -0
  1624. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/load_language.o +0 -0
  1625. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/point_helpers.o +0 -0
  1626. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/random_helpers.o +0 -0
  1627. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/read_test_entries.o +0 -0
  1628. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/record_alloc.o +0 -0
  1629. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/rule_helpers.o +0 -0
  1630. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/scope_sequence.o +0 -0
  1631. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/spy_input.o +0 -0
  1632. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/spy_logger.o +0 -0
  1633. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/stderr_logger.o +0 -0
  1634. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/stream_methods.o +0 -0
  1635. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/tree_helpers.o +0 -0
  1636. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/integration/compile_grammar_spec.o +0 -0
  1637. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/integration/corpus_specs.o +0 -0
  1638. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/runtime/document_spec.o +0 -0
  1639. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/runtime/node_spec.o +0 -0
  1640. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/runtime/parser_spec.o +0 -0
  1641. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/runtime/stack_spec.o +0 -0
  1642. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/runtime/tree_spec.o +0 -0
  1643. data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/specs.o +0 -0
  1644. data/ext/tree-sitter/tree-sitter/out/Release/tests +0 -0
  1645. data/ext/tree-sitter/tree-sitter/project.Makefile +6 -0
  1646. data/ext/tree-sitter/tree-sitter/project.gyp +175 -0
  1647. data/ext/tree-sitter/tree-sitter/runtime.target.mk +174 -0
  1648. data/ext/tree-sitter/tree-sitter/script/check-mallocs +20 -0
  1649. data/ext/tree-sitter/tree-sitter/script/ci +7 -0
  1650. data/ext/tree-sitter/tree-sitter/script/clean +7 -0
  1651. data/ext/tree-sitter/tree-sitter/script/configure +7 -0
  1652. data/ext/tree-sitter/tree-sitter/script/fetch-fixtures +28 -0
  1653. data/ext/tree-sitter/tree-sitter/script/format +7 -0
  1654. data/ext/tree-sitter/tree-sitter/script/lint +14 -0
  1655. data/ext/tree-sitter/tree-sitter/script/test +122 -0
  1656. data/ext/tree-sitter/tree-sitter/script/trim-whitespace +3 -0
  1657. data/ext/tree-sitter/tree-sitter/script/util/valgrind.supp +256 -0
  1658. data/ext/tree-sitter/tree-sitter/spec/compiler/build_tables/distinctive_tokens_spec.cc +34 -0
  1659. data/ext/tree-sitter/tree-sitter/spec/compiler/build_tables/lex_conflict_manager_spec.cc +88 -0
  1660. data/ext/tree-sitter/tree-sitter/spec/compiler/build_tables/lex_item_spec.cc +517 -0
  1661. data/ext/tree-sitter/tree-sitter/spec/compiler/build_tables/parse_item_set_builder_spec.cc +133 -0
  1662. data/ext/tree-sitter/tree-sitter/spec/compiler/build_tables/rule_can_be_blank_spec.cc +60 -0
  1663. data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/expand_repeats_spec.cc +152 -0
  1664. data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/expand_tokens_spec.cc +109 -0
  1665. data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/extract_choices_spec.cc +106 -0
  1666. data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/extract_tokens_spec.cc +251 -0
  1667. data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/flatten_grammar_spec.cc +89 -0
  1668. data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/intern_symbols_spec.cc +89 -0
  1669. data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/parse_regex_spec.cc +245 -0
  1670. data/ext/tree-sitter/tree-sitter/spec/compiler/rules/character_set_spec.cc +337 -0
  1671. data/ext/tree-sitter/tree-sitter/spec/compiler/rules/choice_spec.cc +53 -0
  1672. data/ext/tree-sitter/tree-sitter/spec/compiler/rules/repeat_spec.cc +22 -0
  1673. data/ext/tree-sitter/tree-sitter/spec/compiler/util/string_helpers_spec.cc +26 -0
  1674. data/ext/tree-sitter/tree-sitter/spec/fixtures/error_corpus/c_errors.txt +130 -0
  1675. data/ext/tree-sitter/tree-sitter/spec/fixtures/error_corpus/javascript_errors.txt +157 -0
  1676. data/ext/tree-sitter/tree-sitter/spec/fixtures/error_corpus/json_errors.txt +56 -0
  1677. data/ext/tree-sitter/tree-sitter/spec/fixtures/error_corpus/python_errors.txt +29 -0
  1678. data/ext/tree-sitter/tree-sitter/spec/fixtures/external_scanners/extra_external_tokens.c +42 -0
  1679. data/ext/tree-sitter/tree-sitter/spec/fixtures/external_scanners/percent_strings.c +118 -0
  1680. data/ext/tree-sitter/tree-sitter/spec/fixtures/external_scanners/shared_external_tokens.c +63 -0
  1681. data/ext/tree-sitter/tree-sitter/spec/helpers/dedent.h +12 -0
  1682. data/ext/tree-sitter/tree-sitter/spec/helpers/encoding_helpers.cc +58 -0
  1683. data/ext/tree-sitter/tree-sitter/spec/helpers/encoding_helpers.h +15 -0
  1684. data/ext/tree-sitter/tree-sitter/spec/helpers/equals_pointer.h +37 -0
  1685. data/ext/tree-sitter/tree-sitter/spec/helpers/load_language.cc +206 -0
  1686. data/ext/tree-sitter/tree-sitter/spec/helpers/load_language.h +12 -0
  1687. data/ext/tree-sitter/tree-sitter/spec/helpers/point_helpers.cc +45 -0
  1688. data/ext/tree-sitter/tree-sitter/spec/helpers/point_helpers.h +23 -0
  1689. data/ext/tree-sitter/tree-sitter/spec/helpers/random_helpers.cc +35 -0
  1690. data/ext/tree-sitter/tree-sitter/spec/helpers/random_helpers.h +8 -0
  1691. data/ext/tree-sitter/tree-sitter/spec/helpers/read_test_entries.cc +105 -0
  1692. data/ext/tree-sitter/tree-sitter/spec/helpers/read_test_entries.h +15 -0
  1693. data/ext/tree-sitter/tree-sitter/spec/helpers/record_alloc.cc +84 -0
  1694. data/ext/tree-sitter/tree-sitter/spec/helpers/record_alloc.h +16 -0
  1695. data/ext/tree-sitter/tree-sitter/spec/helpers/rule_helpers.cc +55 -0
  1696. data/ext/tree-sitter/tree-sitter/spec/helpers/rule_helpers.h +21 -0
  1697. data/ext/tree-sitter/tree-sitter/spec/helpers/scope_sequence.cc +106 -0
  1698. data/ext/tree-sitter/tree-sitter/spec/helpers/scope_sequence.h +16 -0
  1699. data/ext/tree-sitter/tree-sitter/spec/helpers/spy_input.cc +133 -0
  1700. data/ext/tree-sitter/tree-sitter/spec/helpers/spy_input.h +39 -0
  1701. data/ext/tree-sitter/tree-sitter/spec/helpers/spy_logger.cc +22 -0
  1702. data/ext/tree-sitter/tree-sitter/spec/helpers/spy_logger.h +15 -0
  1703. data/ext/tree-sitter/tree-sitter/spec/helpers/stderr_logger.cc +22 -0
  1704. data/ext/tree-sitter/tree-sitter/spec/helpers/stderr_logger.h +8 -0
  1705. data/ext/tree-sitter/tree-sitter/spec/helpers/stream_methods.cc +140 -0
  1706. data/ext/tree-sitter/tree-sitter/spec/helpers/stream_methods.h +136 -0
  1707. data/ext/tree-sitter/tree-sitter/spec/helpers/tree_helpers.cc +50 -0
  1708. data/ext/tree-sitter/tree-sitter/spec/helpers/tree_helpers.h +16 -0
  1709. data/ext/tree-sitter/tree-sitter/spec/integration/compile_grammar_spec.cc +847 -0
  1710. data/ext/tree-sitter/tree-sitter/spec/integration/corpus_specs.cc +185 -0
  1711. data/ext/tree-sitter/tree-sitter/spec/runtime/document_spec.cc +372 -0
  1712. data/ext/tree-sitter/tree-sitter/spec/runtime/node_spec.cc +436 -0
  1713. data/ext/tree-sitter/tree-sitter/spec/runtime/parser_spec.cc +479 -0
  1714. data/ext/tree-sitter/tree-sitter/spec/runtime/stack_spec.cc +571 -0
  1715. data/ext/tree-sitter/tree-sitter/spec/runtime/tree_spec.cc +439 -0
  1716. data/ext/tree-sitter/tree-sitter/spec/spec_helper.h +19 -0
  1717. data/ext/tree-sitter/tree-sitter/spec/specs.cc +16 -0
  1718. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_lex_table.cc +195 -0
  1719. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_lex_table.h +18 -0
  1720. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_parse_table.cc +604 -0
  1721. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_parse_table.h +22 -0
  1722. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_tables.cc +27 -0
  1723. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_tables.h +24 -0
  1724. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/conflict_type.h +16 -0
  1725. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_conflict_manager.cc +55 -0
  1726. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_conflict_manager.h +31 -0
  1727. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_item.cc +118 -0
  1728. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_item.h +82 -0
  1729. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_item_transitions.cc +188 -0
  1730. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_item_transitions.h +17 -0
  1731. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lookahead_set.cc +47 -0
  1732. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lookahead_set.h +28 -0
  1733. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/parse_item.cc +148 -0
  1734. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/parse_item.h +65 -0
  1735. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/parse_item_set_builder.cc +167 -0
  1736. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/parse_item_set_builder.h +35 -0
  1737. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/recovery_tokens.cc +89 -0
  1738. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/recovery_tokens.h +19 -0
  1739. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/remove_duplicate_states.h +65 -0
  1740. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/rule_can_be_blank.cc +44 -0
  1741. data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/rule_can_be_blank.h +14 -0
  1742. data/ext/tree-sitter/tree-sitter/src/compiler/compile.cc +72 -0
  1743. data/ext/tree-sitter/tree-sitter/src/compiler/compile.h +16 -0
  1744. data/ext/tree-sitter/tree-sitter/src/compiler/compile_error.h +28 -0
  1745. data/ext/tree-sitter/tree-sitter/src/compiler/generate_code/c_code.cc +691 -0
  1746. data/ext/tree-sitter/tree-sitter/src/compiler/generate_code/c_code.h +21 -0
  1747. data/ext/tree-sitter/tree-sitter/src/compiler/grammar.h +20 -0
  1748. data/ext/tree-sitter/tree-sitter/src/compiler/lex_table.cc +78 -0
  1749. data/ext/tree-sitter/tree-sitter/src/compiler/lex_table.h +75 -0
  1750. data/ext/tree-sitter/tree-sitter/src/compiler/lexical_grammar.h +19 -0
  1751. data/ext/tree-sitter/tree-sitter/src/compiler/parse_grammar.cc +335 -0
  1752. data/ext/tree-sitter/tree-sitter/src/compiler/parse_grammar.h +20 -0
  1753. data/ext/tree-sitter/tree-sitter/src/compiler/parse_table.cc +258 -0
  1754. data/ext/tree-sitter/tree-sitter/src/compiler/parse_table.h +106 -0
  1755. data/ext/tree-sitter/tree-sitter/src/compiler/precedence_range.cc +45 -0
  1756. data/ext/tree-sitter/tree-sitter/src/compiler/precedence_range.h +23 -0
  1757. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/expand_repeats.cc +80 -0
  1758. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/expand_repeats.h +16 -0
  1759. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/expand_tokens.cc +88 -0
  1760. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/expand_tokens.h +18 -0
  1761. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/extract_choices.cc +55 -0
  1762. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/extract_choices.h +15 -0
  1763. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/extract_tokens.cc +213 -0
  1764. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/extract_tokens.h +19 -0
  1765. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/flatten_grammar.cc +124 -0
  1766. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/flatten_grammar.h +20 -0
  1767. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/initial_syntax_grammar.h +24 -0
  1768. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/intern_symbols.cc +110 -0
  1769. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/intern_symbols.h +20 -0
  1770. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/interned_grammar.h +24 -0
  1771. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/is_token.cc +30 -0
  1772. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/is_token.h +14 -0
  1773. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/normalize_rules.cc +19 -0
  1774. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/normalize_rules.h +14 -0
  1775. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/parse_regex.cc +252 -0
  1776. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/parse_regex.h +17 -0
  1777. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/prepare_grammar.cc +69 -0
  1778. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/prepare_grammar.h +21 -0
  1779. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/token_description.cc +69 -0
  1780. data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/token_description.h +15 -0
  1781. data/ext/tree-sitter/tree-sitter/src/compiler/rule.cc +15 -0
  1782. data/ext/tree-sitter/tree-sitter/src/compiler/rule.h +45 -0
  1783. data/ext/tree-sitter/tree-sitter/src/compiler/rules.h +28 -0
  1784. data/ext/tree-sitter/tree-sitter/src/compiler/rules/blank.cc +36 -0
  1785. data/ext/tree-sitter/tree-sitter/src/compiler/rules/blank.h +25 -0
  1786. data/ext/tree-sitter/tree-sitter/src/compiler/rules/built_in_symbols.cc +19 -0
  1787. data/ext/tree-sitter/tree-sitter/src/compiler/rules/built_in_symbols.h +16 -0
  1788. data/ext/tree-sitter/tree-sitter/src/compiler/rules/character_range.cc +36 -0
  1789. data/ext/tree-sitter/tree-sitter/src/compiler/rules/character_range.h +25 -0
  1790. data/ext/tree-sitter/tree-sitter/src/compiler/rules/character_set.cc +220 -0
  1791. data/ext/tree-sitter/tree-sitter/src/compiler/rules/character_set.h +59 -0
  1792. data/ext/tree-sitter/tree-sitter/src/compiler/rules/choice.cc +78 -0
  1793. data/ext/tree-sitter/tree-sitter/src/compiler/rules/choice.h +28 -0
  1794. data/ext/tree-sitter/tree-sitter/src/compiler/rules/metadata.cc +98 -0
  1795. data/ext/tree-sitter/tree-sitter/src/compiler/rules/metadata.h +51 -0
  1796. data/ext/tree-sitter/tree-sitter/src/compiler/rules/named_symbol.cc +35 -0
  1797. data/ext/tree-sitter/tree-sitter/src/compiler/rules/named_symbol.h +26 -0
  1798. data/ext/tree-sitter/tree-sitter/src/compiler/rules/pattern.cc +36 -0
  1799. data/ext/tree-sitter/tree-sitter/src/compiler/rules/pattern.h +26 -0
  1800. data/ext/tree-sitter/tree-sitter/src/compiler/rules/repeat.cc +44 -0
  1801. data/ext/tree-sitter/tree-sitter/src/compiler/rules/repeat.h +27 -0
  1802. data/ext/tree-sitter/tree-sitter/src/compiler/rules/rules.cc +108 -0
  1803. data/ext/tree-sitter/tree-sitter/src/compiler/rules/seq.cc +57 -0
  1804. data/ext/tree-sitter/tree-sitter/src/compiler/rules/seq.h +29 -0
  1805. data/ext/tree-sitter/tree-sitter/src/compiler/rules/string.cc +35 -0
  1806. data/ext/tree-sitter/tree-sitter/src/compiler/rules/string.h +26 -0
  1807. data/ext/tree-sitter/tree-sitter/src/compiler/rules/symbol.cc +82 -0
  1808. data/ext/tree-sitter/tree-sitter/src/compiler/rules/symbol.h +55 -0
  1809. data/ext/tree-sitter/tree-sitter/src/compiler/rules/visitor.cc +44 -0
  1810. data/ext/tree-sitter/tree-sitter/src/compiler/rules/visitor.h +234 -0
  1811. data/ext/tree-sitter/tree-sitter/src/compiler/syntax_grammar.cc +34 -0
  1812. data/ext/tree-sitter/tree-sitter/src/compiler/syntax_grammar.h +52 -0
  1813. data/ext/tree-sitter/tree-sitter/src/compiler/util/hash_combine.h +24 -0
  1814. data/ext/tree-sitter/tree-sitter/src/compiler/util/string_helpers.cc +54 -0
  1815. data/ext/tree-sitter/tree-sitter/src/compiler/util/string_helpers.h +19 -0
  1816. data/ext/tree-sitter/tree-sitter/src/compiler/variable.cc +11 -0
  1817. data/ext/tree-sitter/tree-sitter/src/compiler/variable.h +27 -0
  1818. data/ext/tree-sitter/tree-sitter/src/runtime/alloc.h +85 -0
  1819. data/ext/tree-sitter/tree-sitter/src/runtime/array.h +137 -0
  1820. data/ext/tree-sitter/tree-sitter/src/runtime/document.c +152 -0
  1821. data/ext/tree-sitter/tree-sitter/src/runtime/document.h +17 -0
  1822. data/ext/tree-sitter/tree-sitter/src/runtime/error_costs.c +28 -0
  1823. data/ext/tree-sitter/tree-sitter/src/runtime/error_costs.h +25 -0
  1824. data/ext/tree-sitter/tree-sitter/src/runtime/language.c +56 -0
  1825. data/ext/tree-sitter/tree-sitter/src/runtime/language.h +70 -0
  1826. data/ext/tree-sitter/tree-sitter/src/runtime/length.h +59 -0
  1827. data/ext/tree-sitter/tree-sitter/src/runtime/lexer.c +131 -0
  1828. data/ext/tree-sitter/tree-sitter/src/runtime/lexer.h +40 -0
  1829. data/ext/tree-sitter/tree-sitter/src/runtime/node.c +393 -0
  1830. data/ext/tree-sitter/tree-sitter/src/runtime/node.h +8 -0
  1831. data/ext/tree-sitter/tree-sitter/src/runtime/parser.c +1227 -0
  1832. data/ext/tree-sitter/tree-sitter/src/runtime/parser.h +41 -0
  1833. data/ext/tree-sitter/tree-sitter/src/runtime/point.h +46 -0
  1834. data/ext/tree-sitter/tree-sitter/src/runtime/reduce_action.h +32 -0
  1835. data/ext/tree-sitter/tree-sitter/src/runtime/reusable_node.h +50 -0
  1836. data/ext/tree-sitter/tree-sitter/src/runtime/stack.c +658 -0
  1837. data/ext/tree-sitter/tree-sitter/src/runtime/stack.h +130 -0
  1838. data/ext/tree-sitter/tree-sitter/src/runtime/string_input.c +50 -0
  1839. data/ext/tree-sitter/tree-sitter/src/runtime/string_input.h +17 -0
  1840. data/ext/tree-sitter/tree-sitter/src/runtime/tree.c +551 -0
  1841. data/ext/tree-sitter/tree-sitter/src/runtime/tree.h +117 -0
  1842. data/ext/tree-sitter/tree-sitter/src/runtime/tree_path.h +217 -0
  1843. data/ext/tree-sitter/tree-sitter/src/runtime/utf16.c +24 -0
  1844. data/ext/tree-sitter/tree-sitter/src/runtime/utf16.h +20 -0
  1845. data/ext/tree-sitter/tree-sitter/tests.Makefile +6 -0
  1846. data/ext/tree-sitter/tree-sitter/tests.gyp +58 -0
  1847. data/ext/tree-sitter/tree-sitter/tests.target.mk +176 -0
  1848. data/lib/tree-sitter.rb +11 -0
  1849. data/lib/tree-sitter/version.rb +3 -0
  1850. data/test/test_helper.rb +9 -0
  1851. data/test/tree-sitter/fixtures/arithmetic/grammar.json +67 -0
  1852. data/test/tree-sitter/fixtures/ruby/grammar.json +4803 -0
  1853. data/test/tree-sitter/test_basic.rb +7 -0
  1854. data/test/tree-sitter/test_document.rb +7 -0
  1855. data/test/tree-sitter/test_grammar.rb +34 -0
  1856. data/tree-sitter.gemspec +33 -0
  1857. metadata +2018 -0
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env python
2
+ # Copyright (c) 2012 Google Inc. All rights reserved.
3
+ # Use of this source code is governed by a BSD-style license that can be
4
+ # found in the LICENSE file.
5
+
6
+ """ Unit tests for the msvs.py file. """
7
+
8
+ import gyp.generator.msvs as msvs
9
+ import unittest
10
+ import StringIO
11
+
12
+
13
+ class TestSequenceFunctions(unittest.TestCase):
14
+
15
+ def setUp(self):
16
+ self.stderr = StringIO.StringIO()
17
+
18
+ def test_GetLibraries(self):
19
+ self.assertEqual(
20
+ msvs._GetLibraries({}),
21
+ [])
22
+ self.assertEqual(
23
+ msvs._GetLibraries({'libraries': []}),
24
+ [])
25
+ self.assertEqual(
26
+ msvs._GetLibraries({'other':'foo', 'libraries': ['a.lib']}),
27
+ ['a.lib'])
28
+ self.assertEqual(
29
+ msvs._GetLibraries({'libraries': ['-la']}),
30
+ ['a.lib'])
31
+ self.assertEqual(
32
+ msvs._GetLibraries({'libraries': ['a.lib', 'b.lib', 'c.lib', '-lb.lib',
33
+ '-lb.lib', 'd.lib', 'a.lib']}),
34
+ ['c.lib', 'b.lib', 'd.lib', 'a.lib'])
35
+
36
+ if __name__ == '__main__':
37
+ unittest.main()
@@ -0,0 +1,2160 @@
1
+ # Copyright (c) 2013 Google Inc. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style license that can be
3
+ # found in the LICENSE file.
4
+
5
+ import collections
6
+ import copy
7
+ import hashlib
8
+ import json
9
+ import multiprocessing
10
+ import os.path
11
+ import re
12
+ import signal
13
+ import subprocess
14
+ import sys
15
+ import gyp
16
+ import gyp.common
17
+ import gyp.msvs_emulation
18
+ import gyp.MSVSUtil as MSVSUtil
19
+ import gyp.xcode_emulation
20
+ from cStringIO import StringIO
21
+
22
+ from gyp.common import GetEnvironFallback
23
+ import gyp.ninja_syntax as ninja_syntax
24
+
25
+ generator_default_variables = {
26
+ 'EXECUTABLE_PREFIX': '',
27
+ 'EXECUTABLE_SUFFIX': '',
28
+ 'STATIC_LIB_PREFIX': 'lib',
29
+ 'STATIC_LIB_SUFFIX': '.a',
30
+ 'SHARED_LIB_PREFIX': 'lib',
31
+
32
+ # Gyp expects the following variables to be expandable by the build
33
+ # system to the appropriate locations. Ninja prefers paths to be
34
+ # known at gyp time. To resolve this, introduce special
35
+ # variables starting with $! and $| (which begin with a $ so gyp knows it
36
+ # should be treated specially, but is otherwise an invalid
37
+ # ninja/shell variable) that are passed to gyp here but expanded
38
+ # before writing out into the target .ninja files; see
39
+ # ExpandSpecial.
40
+ # $! is used for variables that represent a path and that can only appear at
41
+ # the start of a string, while $| is used for variables that can appear
42
+ # anywhere in a string.
43
+ 'INTERMEDIATE_DIR': '$!INTERMEDIATE_DIR',
44
+ 'SHARED_INTERMEDIATE_DIR': '$!PRODUCT_DIR/gen',
45
+ 'PRODUCT_DIR': '$!PRODUCT_DIR',
46
+ 'CONFIGURATION_NAME': '$|CONFIGURATION_NAME',
47
+
48
+ # Special variables that may be used by gyp 'rule' targets.
49
+ # We generate definitions for these variables on the fly when processing a
50
+ # rule.
51
+ 'RULE_INPUT_ROOT': '${root}',
52
+ 'RULE_INPUT_DIRNAME': '${dirname}',
53
+ 'RULE_INPUT_PATH': '${source}',
54
+ 'RULE_INPUT_EXT': '${ext}',
55
+ 'RULE_INPUT_NAME': '${name}',
56
+ }
57
+
58
+ # Placates pylint.
59
+ generator_additional_non_configuration_keys = []
60
+ generator_additional_path_sections = []
61
+ generator_extra_sources_for_rules = []
62
+ generator_filelist_paths = None
63
+
64
+ # TODO: figure out how to not build extra host objects in the non-cross-compile
65
+ # case when this is enabled, and enable unconditionally.
66
+ generator_supports_multiple_toolsets = (
67
+ os.environ.get('GYP_CROSSCOMPILE') or
68
+ os.environ.get('AR_host') or
69
+ os.environ.get('CC_host') or
70
+ os.environ.get('CXX_host') or
71
+ os.environ.get('AR_target') or
72
+ os.environ.get('CC_target') or
73
+ os.environ.get('CXX_target'))
74
+
75
+
76
+ def StripPrefix(arg, prefix):
77
+ if arg.startswith(prefix):
78
+ return arg[len(prefix):]
79
+ return arg
80
+
81
+
82
+ def QuoteShellArgument(arg, flavor):
83
+ """Quote a string such that it will be interpreted as a single argument
84
+ by the shell."""
85
+ # Rather than attempting to enumerate the bad shell characters, just
86
+ # whitelist common OK ones and quote anything else.
87
+ if re.match(r'^[a-zA-Z0-9_=.\\/-]+$', arg):
88
+ return arg # No quoting necessary.
89
+ if flavor == 'win':
90
+ return gyp.msvs_emulation.QuoteForRspFile(arg)
91
+ return "'" + arg.replace("'", "'" + '"\'"' + "'") + "'"
92
+
93
+
94
+ def Define(d, flavor):
95
+ """Takes a preprocessor define and returns a -D parameter that's ninja- and
96
+ shell-escaped."""
97
+ if flavor == 'win':
98
+ # cl.exe replaces literal # characters with = in preprocesor definitions for
99
+ # some reason. Octal-encode to work around that.
100
+ d = d.replace('#', '\\%03o' % ord('#'))
101
+ return QuoteShellArgument(ninja_syntax.escape('-D' + d), flavor)
102
+
103
+
104
+ def AddArch(output, arch):
105
+ """Adds an arch string to an output path."""
106
+ output, extension = os.path.splitext(output)
107
+ return '%s.%s%s' % (output, arch, extension)
108
+
109
+
110
+ class Target:
111
+ """Target represents the paths used within a single gyp target.
112
+
113
+ Conceptually, building a single target A is a series of steps:
114
+
115
+ 1) actions/rules/copies generates source/resources/etc.
116
+ 2) compiles generates .o files
117
+ 3) link generates a binary (library/executable)
118
+ 4) bundle merges the above in a mac bundle
119
+
120
+ (Any of these steps can be optional.)
121
+
122
+ From a build ordering perspective, a dependent target B could just
123
+ depend on the last output of this series of steps.
124
+
125
+ But some dependent commands sometimes need to reach inside the box.
126
+ For example, when linking B it needs to get the path to the static
127
+ library generated by A.
128
+
129
+ This object stores those paths. To keep things simple, member
130
+ variables only store concrete paths to single files, while methods
131
+ compute derived values like "the last output of the target".
132
+ """
133
+ def __init__(self, type):
134
+ # Gyp type ("static_library", etc.) of this target.
135
+ self.type = type
136
+ # File representing whether any input dependencies necessary for
137
+ # dependent actions have completed.
138
+ self.preaction_stamp = None
139
+ # File representing whether any input dependencies necessary for
140
+ # dependent compiles have completed.
141
+ self.precompile_stamp = None
142
+ # File representing the completion of actions/rules/copies, if any.
143
+ self.actions_stamp = None
144
+ # Path to the output of the link step, if any.
145
+ self.binary = None
146
+ # Path to the file representing the completion of building the bundle,
147
+ # if any.
148
+ self.bundle = None
149
+ # On Windows, incremental linking requires linking against all the .objs
150
+ # that compose a .lib (rather than the .lib itself). That list is stored
151
+ # here.
152
+ self.component_objs = None
153
+ # Windows only. The import .lib is the output of a build step, but
154
+ # because dependents only link against the lib (not both the lib and the
155
+ # dll) we keep track of the import library here.
156
+ self.import_lib = None
157
+
158
+ def Linkable(self):
159
+ """Return true if this is a target that can be linked against."""
160
+ return self.type in ('static_library', 'shared_library')
161
+
162
+ def UsesToc(self, flavor):
163
+ """Return true if the target should produce a restat rule based on a TOC
164
+ file."""
165
+ # For bundles, the .TOC should be produced for the binary, not for
166
+ # FinalOutput(). But the naive approach would put the TOC file into the
167
+ # bundle, so don't do this for bundles for now.
168
+ if flavor == 'win' or self.bundle:
169
+ return False
170
+ return self.type in ('shared_library', 'loadable_module')
171
+
172
+ def PreActionInput(self, flavor):
173
+ """Return the path, if any, that should be used as a dependency of
174
+ any dependent action step."""
175
+ if self.UsesToc(flavor):
176
+ return self.FinalOutput() + '.TOC'
177
+ return self.FinalOutput() or self.preaction_stamp
178
+
179
+ def PreCompileInput(self):
180
+ """Return the path, if any, that should be used as a dependency of
181
+ any dependent compile step."""
182
+ return self.actions_stamp or self.precompile_stamp
183
+
184
+ def FinalOutput(self):
185
+ """Return the last output of the target, which depends on all prior
186
+ steps."""
187
+ return self.bundle or self.binary or self.actions_stamp
188
+
189
+
190
+ # A small discourse on paths as used within the Ninja build:
191
+ # All files we produce (both at gyp and at build time) appear in the
192
+ # build directory (e.g. out/Debug).
193
+ #
194
+ # Paths within a given .gyp file are always relative to the directory
195
+ # containing the .gyp file. Call these "gyp paths". This includes
196
+ # sources as well as the starting directory a given gyp rule/action
197
+ # expects to be run from. We call the path from the source root to
198
+ # the gyp file the "base directory" within the per-.gyp-file
199
+ # NinjaWriter code.
200
+ #
201
+ # All paths as written into the .ninja files are relative to the build
202
+ # directory. Call these paths "ninja paths".
203
+ #
204
+ # We translate between these two notions of paths with two helper
205
+ # functions:
206
+ #
207
+ # - GypPathToNinja translates a gyp path (i.e. relative to the .gyp file)
208
+ # into the equivalent ninja path.
209
+ #
210
+ # - GypPathToUniqueOutput translates a gyp path into a ninja path to write
211
+ # an output file; the result can be namespaced such that it is unique
212
+ # to the input file name as well as the output target name.
213
+
214
+ class NinjaWriter:
215
+ def __init__(self, qualified_target, target_outputs, base_dir, build_dir,
216
+ output_file, toplevel_build, output_file_name, flavor,
217
+ toplevel_dir=None):
218
+ """
219
+ base_dir: path from source root to directory containing this gyp file,
220
+ by gyp semantics, all input paths are relative to this
221
+ build_dir: path from source root to build output
222
+ toplevel_dir: path to the toplevel directory
223
+ """
224
+
225
+ self.qualified_target = qualified_target
226
+ self.target_outputs = target_outputs
227
+ self.base_dir = base_dir
228
+ self.build_dir = build_dir
229
+ self.ninja = ninja_syntax.Writer(output_file)
230
+ self.toplevel_build = toplevel_build
231
+ self.output_file_name = output_file_name
232
+
233
+ self.flavor = flavor
234
+ self.abs_build_dir = None
235
+ if toplevel_dir is not None:
236
+ self.abs_build_dir = os.path.abspath(os.path.join(toplevel_dir,
237
+ build_dir))
238
+ self.obj_ext = '.obj' if flavor == 'win' else '.o'
239
+ if flavor == 'win':
240
+ # See docstring of msvs_emulation.GenerateEnvironmentFiles().
241
+ self.win_env = {}
242
+ for arch in ('x86', 'x64'):
243
+ self.win_env[arch] = 'environment.' + arch
244
+
245
+ # Relative path from build output dir to base dir.
246
+ build_to_top = gyp.common.InvertRelativePath(build_dir, toplevel_dir)
247
+ self.build_to_base = os.path.join(build_to_top, base_dir)
248
+ # Relative path from base dir to build dir.
249
+ base_to_top = gyp.common.InvertRelativePath(base_dir, toplevel_dir)
250
+ self.base_to_build = os.path.join(base_to_top, build_dir)
251
+
252
+ def ExpandSpecial(self, path, product_dir=None):
253
+ """Expand specials like $!PRODUCT_DIR in |path|.
254
+
255
+ If |product_dir| is None, assumes the cwd is already the product
256
+ dir. Otherwise, |product_dir| is the relative path to the product
257
+ dir.
258
+ """
259
+
260
+ PRODUCT_DIR = '$!PRODUCT_DIR'
261
+ if PRODUCT_DIR in path:
262
+ if product_dir:
263
+ path = path.replace(PRODUCT_DIR, product_dir)
264
+ else:
265
+ path = path.replace(PRODUCT_DIR + '/', '')
266
+ path = path.replace(PRODUCT_DIR + '\\', '')
267
+ path = path.replace(PRODUCT_DIR, '.')
268
+
269
+ INTERMEDIATE_DIR = '$!INTERMEDIATE_DIR'
270
+ if INTERMEDIATE_DIR in path:
271
+ int_dir = self.GypPathToUniqueOutput('gen')
272
+ # GypPathToUniqueOutput generates a path relative to the product dir,
273
+ # so insert product_dir in front if it is provided.
274
+ path = path.replace(INTERMEDIATE_DIR,
275
+ os.path.join(product_dir or '', int_dir))
276
+
277
+ CONFIGURATION_NAME = '$|CONFIGURATION_NAME'
278
+ path = path.replace(CONFIGURATION_NAME, self.config_name)
279
+
280
+ return path
281
+
282
+ def ExpandRuleVariables(self, path, root, dirname, source, ext, name):
283
+ if self.flavor == 'win':
284
+ path = self.msvs_settings.ConvertVSMacros(
285
+ path, config=self.config_name)
286
+ path = path.replace(generator_default_variables['RULE_INPUT_ROOT'], root)
287
+ path = path.replace(generator_default_variables['RULE_INPUT_DIRNAME'],
288
+ dirname)
289
+ path = path.replace(generator_default_variables['RULE_INPUT_PATH'], source)
290
+ path = path.replace(generator_default_variables['RULE_INPUT_EXT'], ext)
291
+ path = path.replace(generator_default_variables['RULE_INPUT_NAME'], name)
292
+ return path
293
+
294
+ def GypPathToNinja(self, path, env=None):
295
+ """Translate a gyp path to a ninja path, optionally expanding environment
296
+ variable references in |path| with |env|.
297
+
298
+ See the above discourse on path conversions."""
299
+ if env:
300
+ if self.flavor == 'mac':
301
+ path = gyp.xcode_emulation.ExpandEnvVars(path, env)
302
+ elif self.flavor == 'win':
303
+ path = gyp.msvs_emulation.ExpandMacros(path, env)
304
+ if path.startswith('$!'):
305
+ expanded = self.ExpandSpecial(path)
306
+ if self.flavor == 'win':
307
+ expanded = os.path.normpath(expanded)
308
+ return expanded
309
+ if '$|' in path:
310
+ path = self.ExpandSpecial(path)
311
+ assert '$' not in path, path
312
+ return os.path.normpath(os.path.join(self.build_to_base, path))
313
+
314
+ def GypPathToUniqueOutput(self, path, qualified=True):
315
+ """Translate a gyp path to a ninja path for writing output.
316
+
317
+ If qualified is True, qualify the resulting filename with the name
318
+ of the target. This is necessary when e.g. compiling the same
319
+ path twice for two separate output targets.
320
+
321
+ See the above discourse on path conversions."""
322
+
323
+ path = self.ExpandSpecial(path)
324
+ assert not path.startswith('$'), path
325
+
326
+ # Translate the path following this scheme:
327
+ # Input: foo/bar.gyp, target targ, references baz/out.o
328
+ # Output: obj/foo/baz/targ.out.o (if qualified)
329
+ # obj/foo/baz/out.o (otherwise)
330
+ # (and obj.host instead of obj for cross-compiles)
331
+ #
332
+ # Why this scheme and not some other one?
333
+ # 1) for a given input, you can compute all derived outputs by matching
334
+ # its path, even if the input is brought via a gyp file with '..'.
335
+ # 2) simple files like libraries and stamps have a simple filename.
336
+
337
+ obj = 'obj'
338
+ if self.toolset != 'target':
339
+ obj += '.' + self.toolset
340
+
341
+ path_dir, path_basename = os.path.split(path)
342
+ if qualified:
343
+ path_basename = self.name + '.' + path_basename
344
+ return os.path.normpath(os.path.join(obj, self.base_dir, path_dir,
345
+ path_basename))
346
+
347
+ def WriteCollapsedDependencies(self, name, targets):
348
+ """Given a list of targets, return a path for a single file
349
+ representing the result of building all the targets or None.
350
+
351
+ Uses a stamp file if necessary."""
352
+
353
+ assert targets == filter(None, targets), targets
354
+ if len(targets) == 0:
355
+ return None
356
+ if len(targets) > 1:
357
+ stamp = self.GypPathToUniqueOutput(name + '.stamp')
358
+ targets = self.ninja.build(stamp, 'stamp', targets)
359
+ self.ninja.newline()
360
+ return targets[0]
361
+
362
+ def _SubninjaNameForArch(self, arch):
363
+ output_file_base = os.path.splitext(self.output_file_name)[0]
364
+ return '%s.%s.ninja' % (output_file_base, arch)
365
+
366
+ def WriteSpec(self, spec, config_name, generator_flags):
367
+ """The main entry point for NinjaWriter: write the build rules for a spec.
368
+
369
+ Returns a Target object, which represents the output paths for this spec.
370
+ Returns None if there are no outputs (e.g. a settings-only 'none' type
371
+ target)."""
372
+
373
+ self.config_name = config_name
374
+ self.name = spec['target_name']
375
+ self.toolset = spec['toolset']
376
+ config = spec['configurations'][config_name]
377
+ self.target = Target(spec['type'])
378
+ self.is_standalone_static_library = bool(
379
+ spec.get('standalone_static_library', 0))
380
+ # Track if this target contains any C++ files, to decide if gcc or g++
381
+ # should be used for linking.
382
+ self.uses_cpp = False
383
+
384
+ self.is_mac_bundle = gyp.xcode_emulation.IsMacBundle(self.flavor, spec)
385
+ self.xcode_settings = self.msvs_settings = None
386
+ if self.flavor == 'mac':
387
+ self.xcode_settings = gyp.xcode_emulation.XcodeSettings(spec)
388
+ if self.flavor == 'win':
389
+ self.msvs_settings = gyp.msvs_emulation.MsvsSettings(spec,
390
+ generator_flags)
391
+ arch = self.msvs_settings.GetArch(config_name)
392
+ self.ninja.variable('arch', self.win_env[arch])
393
+ self.ninja.variable('cc', '$cl_' + arch)
394
+ self.ninja.variable('cxx', '$cl_' + arch)
395
+
396
+ if self.flavor == 'mac':
397
+ self.archs = self.xcode_settings.GetActiveArchs(config_name)
398
+ if len(self.archs) > 1:
399
+ self.arch_subninjas = dict(
400
+ (arch, ninja_syntax.Writer(
401
+ OpenOutput(os.path.join(self.toplevel_build,
402
+ self._SubninjaNameForArch(arch)),
403
+ 'w')))
404
+ for arch in self.archs)
405
+
406
+ # Compute predepends for all rules.
407
+ # actions_depends is the dependencies this target depends on before running
408
+ # any of its action/rule/copy steps.
409
+ # compile_depends is the dependencies this target depends on before running
410
+ # any of its compile steps.
411
+ actions_depends = []
412
+ compile_depends = []
413
+ # TODO(evan): it is rather confusing which things are lists and which
414
+ # are strings. Fix these.
415
+ if 'dependencies' in spec:
416
+ for dep in spec['dependencies']:
417
+ if dep in self.target_outputs:
418
+ target = self.target_outputs[dep]
419
+ actions_depends.append(target.PreActionInput(self.flavor))
420
+ compile_depends.append(target.PreCompileInput())
421
+ actions_depends = filter(None, actions_depends)
422
+ compile_depends = filter(None, compile_depends)
423
+ actions_depends = self.WriteCollapsedDependencies('actions_depends',
424
+ actions_depends)
425
+ compile_depends = self.WriteCollapsedDependencies('compile_depends',
426
+ compile_depends)
427
+ self.target.preaction_stamp = actions_depends
428
+ self.target.precompile_stamp = compile_depends
429
+
430
+ # Write out actions, rules, and copies. These must happen before we
431
+ # compile any sources, so compute a list of predependencies for sources
432
+ # while we do it.
433
+ extra_sources = []
434
+ mac_bundle_depends = []
435
+ self.target.actions_stamp = self.WriteActionsRulesCopies(
436
+ spec, extra_sources, actions_depends, mac_bundle_depends)
437
+
438
+ # If we have actions/rules/copies, we depend directly on those, but
439
+ # otherwise we depend on dependent target's actions/rules/copies etc.
440
+ # We never need to explicitly depend on previous target's link steps,
441
+ # because no compile ever depends on them.
442
+ compile_depends_stamp = (self.target.actions_stamp or compile_depends)
443
+
444
+ # Write out the compilation steps, if any.
445
+ link_deps = []
446
+ sources = extra_sources + spec.get('sources', [])
447
+ if sources:
448
+ if self.flavor == 'mac' and len(self.archs) > 1:
449
+ # Write subninja file containing compile and link commands scoped to
450
+ # a single arch if a fat binary is being built.
451
+ for arch in self.archs:
452
+ self.ninja.subninja(self._SubninjaNameForArch(arch))
453
+
454
+ pch = None
455
+ if self.flavor == 'win':
456
+ gyp.msvs_emulation.VerifyMissingSources(
457
+ sources, self.abs_build_dir, generator_flags, self.GypPathToNinja)
458
+ pch = gyp.msvs_emulation.PrecompiledHeader(
459
+ self.msvs_settings, config_name, self.GypPathToNinja,
460
+ self.GypPathToUniqueOutput, self.obj_ext)
461
+ else:
462
+ pch = gyp.xcode_emulation.MacPrefixHeader(
463
+ self.xcode_settings, self.GypPathToNinja,
464
+ lambda path, lang: self.GypPathToUniqueOutput(path + '-' + lang))
465
+ link_deps = self.WriteSources(
466
+ self.ninja, config_name, config, sources, compile_depends_stamp, pch,
467
+ spec)
468
+ # Some actions/rules output 'sources' that are already object files.
469
+ obj_outputs = [f for f in sources if f.endswith(self.obj_ext)]
470
+ if obj_outputs:
471
+ if self.flavor != 'mac' or len(self.archs) == 1:
472
+ link_deps += [self.GypPathToNinja(o) for o in obj_outputs]
473
+ else:
474
+ print "Warning: Actions/rules writing object files don't work with " \
475
+ "multiarch targets, dropping. (target %s)" % spec['target_name']
476
+ elif self.flavor == 'mac' and len(self.archs) > 1:
477
+ link_deps = collections.defaultdict(list)
478
+
479
+
480
+ if self.flavor == 'win' and self.target.type == 'static_library':
481
+ self.target.component_objs = link_deps
482
+
483
+ # Write out a link step, if needed.
484
+ output = None
485
+ is_empty_bundle = not link_deps and not mac_bundle_depends
486
+ if link_deps or self.target.actions_stamp or actions_depends:
487
+ output = self.WriteTarget(spec, config_name, config, link_deps,
488
+ self.target.actions_stamp or actions_depends)
489
+ if self.is_mac_bundle:
490
+ mac_bundle_depends.append(output)
491
+
492
+ # Bundle all of the above together, if needed.
493
+ if self.is_mac_bundle:
494
+ output = self.WriteMacBundle(spec, mac_bundle_depends, is_empty_bundle)
495
+
496
+ if not output:
497
+ return None
498
+
499
+ assert self.target.FinalOutput(), output
500
+ return self.target
501
+
502
+ def _WinIdlRule(self, source, prebuild, outputs):
503
+ """Handle the implicit VS .idl rule for one source file. Fills |outputs|
504
+ with files that are generated."""
505
+ outdir, output, vars, flags = self.msvs_settings.GetIdlBuildData(
506
+ source, self.config_name)
507
+ outdir = self.GypPathToNinja(outdir)
508
+ def fix_path(path, rel=None):
509
+ path = os.path.join(outdir, path)
510
+ dirname, basename = os.path.split(source)
511
+ root, ext = os.path.splitext(basename)
512
+ path = self.ExpandRuleVariables(
513
+ path, root, dirname, source, ext, basename)
514
+ if rel:
515
+ path = os.path.relpath(path, rel)
516
+ return path
517
+ vars = [(name, fix_path(value, outdir)) for name, value in vars]
518
+ output = [fix_path(p) for p in output]
519
+ vars.append(('outdir', outdir))
520
+ vars.append(('idlflags', flags))
521
+ input = self.GypPathToNinja(source)
522
+ self.ninja.build(output, 'idl', input,
523
+ variables=vars, order_only=prebuild)
524
+ outputs.extend(output)
525
+
526
+ def WriteWinIdlFiles(self, spec, prebuild):
527
+ """Writes rules to match MSVS's implicit idl handling."""
528
+ assert self.flavor == 'win'
529
+ if self.msvs_settings.HasExplicitIdlRules(spec):
530
+ return []
531
+ outputs = []
532
+ for source in filter(lambda x: x.endswith('.idl'), spec['sources']):
533
+ self._WinIdlRule(source, prebuild, outputs)
534
+ return outputs
535
+
536
+ def WriteActionsRulesCopies(self, spec, extra_sources, prebuild,
537
+ mac_bundle_depends):
538
+ """Write out the Actions, Rules, and Copies steps. Return a path
539
+ representing the outputs of these steps."""
540
+ outputs = []
541
+ if self.is_mac_bundle:
542
+ mac_bundle_resources = spec.get('mac_bundle_resources', [])[:]
543
+ else:
544
+ mac_bundle_resources = []
545
+ extra_mac_bundle_resources = []
546
+
547
+ if 'actions' in spec:
548
+ outputs += self.WriteActions(spec['actions'], extra_sources, prebuild,
549
+ extra_mac_bundle_resources)
550
+ if 'rules' in spec:
551
+ outputs += self.WriteRules(spec['rules'], extra_sources, prebuild,
552
+ mac_bundle_resources,
553
+ extra_mac_bundle_resources)
554
+ if 'copies' in spec:
555
+ outputs += self.WriteCopies(spec['copies'], prebuild, mac_bundle_depends)
556
+
557
+ if 'sources' in spec and self.flavor == 'win':
558
+ outputs += self.WriteWinIdlFiles(spec, prebuild)
559
+
560
+ stamp = self.WriteCollapsedDependencies('actions_rules_copies', outputs)
561
+
562
+ if self.is_mac_bundle:
563
+ self.WriteMacBundleResources(
564
+ extra_mac_bundle_resources + mac_bundle_resources, mac_bundle_depends)
565
+ self.WriteMacInfoPlist(mac_bundle_depends)
566
+
567
+ return stamp
568
+
569
+ def GenerateDescription(self, verb, message, fallback):
570
+ """Generate and return a description of a build step.
571
+
572
+ |verb| is the short summary, e.g. ACTION or RULE.
573
+ |message| is a hand-written description, or None if not available.
574
+ |fallback| is the gyp-level name of the step, usable as a fallback.
575
+ """
576
+ if self.toolset != 'target':
577
+ verb += '(%s)' % self.toolset
578
+ if message:
579
+ return '%s %s' % (verb, self.ExpandSpecial(message))
580
+ else:
581
+ return '%s %s: %s' % (verb, self.name, fallback)
582
+
583
+ def WriteActions(self, actions, extra_sources, prebuild,
584
+ extra_mac_bundle_resources):
585
+ # Actions cd into the base directory.
586
+ env = self.GetSortedXcodeEnv()
587
+ if self.flavor == 'win':
588
+ env = self.msvs_settings.GetVSMacroEnv(
589
+ '$!PRODUCT_DIR', config=self.config_name)
590
+ all_outputs = []
591
+ for action in actions:
592
+ # First write out a rule for the action.
593
+ name = '%s_%s' % (action['action_name'],
594
+ hashlib.md5(self.qualified_target).hexdigest())
595
+ description = self.GenerateDescription('ACTION',
596
+ action.get('message', None),
597
+ name)
598
+ is_cygwin = (self.msvs_settings.IsRuleRunUnderCygwin(action)
599
+ if self.flavor == 'win' else False)
600
+ args = action['action']
601
+ rule_name, _ = self.WriteNewNinjaRule(name, args, description,
602
+ is_cygwin, env=env)
603
+
604
+ inputs = [self.GypPathToNinja(i, env) for i in action['inputs']]
605
+ if int(action.get('process_outputs_as_sources', False)):
606
+ extra_sources += action['outputs']
607
+ if int(action.get('process_outputs_as_mac_bundle_resources', False)):
608
+ extra_mac_bundle_resources += action['outputs']
609
+ outputs = [self.GypPathToNinja(o, env) for o in action['outputs']]
610
+
611
+ # Then write out an edge using the rule.
612
+ self.ninja.build(outputs, rule_name, inputs,
613
+ order_only=prebuild)
614
+ all_outputs += outputs
615
+
616
+ self.ninja.newline()
617
+
618
+ return all_outputs
619
+
620
+ def WriteRules(self, rules, extra_sources, prebuild,
621
+ mac_bundle_resources, extra_mac_bundle_resources):
622
+ env = self.GetSortedXcodeEnv()
623
+ all_outputs = []
624
+ for rule in rules:
625
+ # First write out a rule for the rule action.
626
+ name = '%s_%s' % (rule['rule_name'],
627
+ hashlib.md5(self.qualified_target).hexdigest())
628
+ # Skip a rule with no action and no inputs.
629
+ if 'action' not in rule and not rule.get('rule_sources', []):
630
+ continue
631
+ args = rule['action']
632
+ description = self.GenerateDescription(
633
+ 'RULE',
634
+ rule.get('message', None),
635
+ ('%s ' + generator_default_variables['RULE_INPUT_PATH']) % name)
636
+ is_cygwin = (self.msvs_settings.IsRuleRunUnderCygwin(rule)
637
+ if self.flavor == 'win' else False)
638
+ rule_name, args = self.WriteNewNinjaRule(
639
+ name, args, description, is_cygwin, env=env)
640
+
641
+ # TODO: if the command references the outputs directly, we should
642
+ # simplify it to just use $out.
643
+
644
+ # Rules can potentially make use of some special variables which
645
+ # must vary per source file.
646
+ # Compute the list of variables we'll need to provide.
647
+ special_locals = ('source', 'root', 'dirname', 'ext', 'name')
648
+ needed_variables = set(['source'])
649
+ for argument in args:
650
+ for var in special_locals:
651
+ if ('${%s}' % var) in argument:
652
+ needed_variables.add(var)
653
+
654
+ def cygwin_munge(path):
655
+ if is_cygwin:
656
+ return path.replace('\\', '/')
657
+ return path
658
+
659
+ # For each source file, write an edge that generates all the outputs.
660
+ for source in rule.get('rule_sources', []):
661
+ source = os.path.normpath(source)
662
+ dirname, basename = os.path.split(source)
663
+ root, ext = os.path.splitext(basename)
664
+
665
+ # Gather the list of inputs and outputs, expanding $vars if possible.
666
+ outputs = [self.ExpandRuleVariables(o, root, dirname,
667
+ source, ext, basename)
668
+ for o in rule['outputs']]
669
+ inputs = [self.ExpandRuleVariables(i, root, dirname,
670
+ source, ext, basename)
671
+ for i in rule.get('inputs', [])]
672
+
673
+ if int(rule.get('process_outputs_as_sources', False)):
674
+ extra_sources += outputs
675
+
676
+ was_mac_bundle_resource = source in mac_bundle_resources
677
+ if was_mac_bundle_resource or \
678
+ int(rule.get('process_outputs_as_mac_bundle_resources', False)):
679
+ extra_mac_bundle_resources += outputs
680
+ # Note: This is n_resources * n_outputs_in_rule. Put to-be-removed
681
+ # items in a set and remove them all in a single pass if this becomes
682
+ # a performance issue.
683
+ if was_mac_bundle_resource:
684
+ mac_bundle_resources.remove(source)
685
+
686
+ extra_bindings = []
687
+ for var in needed_variables:
688
+ if var == 'root':
689
+ extra_bindings.append(('root', cygwin_munge(root)))
690
+ elif var == 'dirname':
691
+ # '$dirname' is a parameter to the rule action, which means
692
+ # it shouldn't be converted to a Ninja path. But we don't
693
+ # want $!PRODUCT_DIR in there either.
694
+ dirname_expanded = self.ExpandSpecial(dirname, self.base_to_build)
695
+ extra_bindings.append(('dirname', cygwin_munge(dirname_expanded)))
696
+ elif var == 'source':
697
+ # '$source' is a parameter to the rule action, which means
698
+ # it shouldn't be converted to a Ninja path. But we don't
699
+ # want $!PRODUCT_DIR in there either.
700
+ source_expanded = self.ExpandSpecial(source, self.base_to_build)
701
+ extra_bindings.append(('source', cygwin_munge(source_expanded)))
702
+ elif var == 'ext':
703
+ extra_bindings.append(('ext', ext))
704
+ elif var == 'name':
705
+ extra_bindings.append(('name', cygwin_munge(basename)))
706
+ else:
707
+ assert var == None, repr(var)
708
+
709
+ inputs = [self.GypPathToNinja(i, env) for i in inputs]
710
+ outputs = [self.GypPathToNinja(o, env) for o in outputs]
711
+ extra_bindings.append(('unique_name',
712
+ hashlib.md5(outputs[0]).hexdigest()))
713
+ self.ninja.build(outputs, rule_name, self.GypPathToNinja(source),
714
+ implicit=inputs,
715
+ order_only=prebuild,
716
+ variables=extra_bindings)
717
+
718
+ all_outputs.extend(outputs)
719
+
720
+ return all_outputs
721
+
722
+ def WriteCopies(self, copies, prebuild, mac_bundle_depends):
723
+ outputs = []
724
+ env = self.GetSortedXcodeEnv()
725
+ for copy in copies:
726
+ for path in copy['files']:
727
+ # Normalize the path so trailing slashes don't confuse us.
728
+ path = os.path.normpath(path)
729
+ basename = os.path.split(path)[1]
730
+ src = self.GypPathToNinja(path, env)
731
+ dst = self.GypPathToNinja(os.path.join(copy['destination'], basename),
732
+ env)
733
+ outputs += self.ninja.build(dst, 'copy', src, order_only=prebuild)
734
+ if self.is_mac_bundle:
735
+ # gyp has mac_bundle_resources to copy things into a bundle's
736
+ # Resources folder, but there's no built-in way to copy files to other
737
+ # places in the bundle. Hence, some targets use copies for this. Check
738
+ # if this file is copied into the current bundle, and if so add it to
739
+ # the bundle depends so that dependent targets get rebuilt if the copy
740
+ # input changes.
741
+ if dst.startswith(self.xcode_settings.GetBundleContentsFolderPath()):
742
+ mac_bundle_depends.append(dst)
743
+
744
+ return outputs
745
+
746
+ def WriteMacBundleResources(self, resources, bundle_depends):
747
+ """Writes ninja edges for 'mac_bundle_resources'."""
748
+ for output, res in gyp.xcode_emulation.GetMacBundleResources(
749
+ generator_default_variables['PRODUCT_DIR'],
750
+ self.xcode_settings, map(self.GypPathToNinja, resources)):
751
+ output = self.ExpandSpecial(output)
752
+ self.ninja.build(output, 'mac_tool', res,
753
+ variables=[('mactool_cmd', 'copy-bundle-resource')])
754
+ bundle_depends.append(output)
755
+
756
+ def WriteMacInfoPlist(self, bundle_depends):
757
+ """Write build rules for bundle Info.plist files."""
758
+ info_plist, out, defines, extra_env = gyp.xcode_emulation.GetMacInfoPlist(
759
+ generator_default_variables['PRODUCT_DIR'],
760
+ self.xcode_settings, self.GypPathToNinja)
761
+ if not info_plist:
762
+ return
763
+ out = self.ExpandSpecial(out)
764
+ if defines:
765
+ # Create an intermediate file to store preprocessed results.
766
+ intermediate_plist = self.GypPathToUniqueOutput(
767
+ os.path.basename(info_plist))
768
+ defines = ' '.join([Define(d, self.flavor) for d in defines])
769
+ info_plist = self.ninja.build(
770
+ intermediate_plist, 'preprocess_infoplist', info_plist,
771
+ variables=[('defines',defines)])
772
+
773
+ env = self.GetSortedXcodeEnv(additional_settings=extra_env)
774
+ env = self.ComputeExportEnvString(env)
775
+
776
+ keys = self.xcode_settings.GetExtraPlistItems(self.config_name)
777
+ keys = QuoteShellArgument(json.dumps(keys), self.flavor)
778
+ self.ninja.build(out, 'copy_infoplist', info_plist,
779
+ variables=[('env', env), ('keys', keys)])
780
+ bundle_depends.append(out)
781
+
782
+ def WriteSources(self, ninja_file, config_name, config, sources, predepends,
783
+ precompiled_header, spec):
784
+ """Write build rules to compile all of |sources|."""
785
+ if self.toolset == 'host':
786
+ self.ninja.variable('ar', '$ar_host')
787
+ self.ninja.variable('cc', '$cc_host')
788
+ self.ninja.variable('cxx', '$cxx_host')
789
+ self.ninja.variable('ld', '$ld_host')
790
+ self.ninja.variable('ldxx', '$ldxx_host')
791
+
792
+ if self.flavor != 'mac' or len(self.archs) == 1:
793
+ return self.WriteSourcesForArch(
794
+ self.ninja, config_name, config, sources, predepends,
795
+ precompiled_header, spec)
796
+ else:
797
+ return dict((arch, self.WriteSourcesForArch(
798
+ self.arch_subninjas[arch], config_name, config, sources, predepends,
799
+ precompiled_header, spec, arch=arch))
800
+ for arch in self.archs)
801
+
802
+ def WriteSourcesForArch(self, ninja_file, config_name, config, sources,
803
+ predepends, precompiled_header, spec, arch=None):
804
+ """Write build rules to compile all of |sources|."""
805
+
806
+ extra_defines = []
807
+ if self.flavor == 'mac':
808
+ cflags = self.xcode_settings.GetCflags(config_name, arch=arch)
809
+ cflags_c = self.xcode_settings.GetCflagsC(config_name)
810
+ cflags_cc = self.xcode_settings.GetCflagsCC(config_name)
811
+ cflags_objc = ['$cflags_c'] + \
812
+ self.xcode_settings.GetCflagsObjC(config_name)
813
+ cflags_objcc = ['$cflags_cc'] + \
814
+ self.xcode_settings.GetCflagsObjCC(config_name)
815
+ elif self.flavor == 'win':
816
+ cflags = self.msvs_settings.GetCflags(config_name)
817
+ cflags_c = self.msvs_settings.GetCflagsC(config_name)
818
+ cflags_cc = self.msvs_settings.GetCflagsCC(config_name)
819
+ extra_defines = self.msvs_settings.GetComputedDefines(config_name)
820
+ # See comment at cc_command for why there's two .pdb files.
821
+ pdbpath_c = pdbpath_cc = self.msvs_settings.GetCompilerPdbName(
822
+ config_name, self.ExpandSpecial)
823
+ if not pdbpath_c:
824
+ obj = 'obj'
825
+ if self.toolset != 'target':
826
+ obj += '.' + self.toolset
827
+ pdbpath = os.path.normpath(os.path.join(obj, self.base_dir, self.name))
828
+ pdbpath_c = pdbpath + '.c.pdb'
829
+ pdbpath_cc = pdbpath + '.cc.pdb'
830
+ self.WriteVariableList(ninja_file, 'pdbname_c', [pdbpath_c])
831
+ self.WriteVariableList(ninja_file, 'pdbname_cc', [pdbpath_cc])
832
+ self.WriteVariableList(ninja_file, 'pchprefix', [self.name])
833
+ else:
834
+ cflags = config.get('cflags', [])
835
+ cflags_c = config.get('cflags_c', [])
836
+ cflags_cc = config.get('cflags_cc', [])
837
+
838
+ # Respect environment variables related to build, but target-specific
839
+ # flags can still override them.
840
+ if self.toolset == 'target':
841
+ cflags_c = (os.environ.get('CPPFLAGS', '').split() +
842
+ os.environ.get('CFLAGS', '').split() + cflags_c)
843
+ cflags_cc = (os.environ.get('CPPFLAGS', '').split() +
844
+ os.environ.get('CXXFLAGS', '').split() + cflags_cc)
845
+
846
+ defines = config.get('defines', []) + extra_defines
847
+ self.WriteVariableList(ninja_file, 'defines',
848
+ [Define(d, self.flavor) for d in defines])
849
+ if self.flavor == 'win':
850
+ self.WriteVariableList(ninja_file, 'rcflags',
851
+ [QuoteShellArgument(self.ExpandSpecial(f), self.flavor)
852
+ for f in self.msvs_settings.GetRcflags(config_name,
853
+ self.GypPathToNinja)])
854
+
855
+ include_dirs = config.get('include_dirs', [])
856
+ env = self.GetSortedXcodeEnv()
857
+ if self.flavor == 'win':
858
+ env = self.msvs_settings.GetVSMacroEnv('$!PRODUCT_DIR',
859
+ config=config_name)
860
+ include_dirs = self.msvs_settings.AdjustIncludeDirs(include_dirs,
861
+ config_name)
862
+ self.WriteVariableList(ninja_file, 'includes',
863
+ [QuoteShellArgument('-I' + self.GypPathToNinja(i, env), self.flavor)
864
+ for i in include_dirs])
865
+
866
+ pch_commands = precompiled_header.GetPchBuildCommands(arch)
867
+ if self.flavor == 'mac':
868
+ # Most targets use no precompiled headers, so only write these if needed.
869
+ for ext, var in [('c', 'cflags_pch_c'), ('cc', 'cflags_pch_cc'),
870
+ ('m', 'cflags_pch_objc'), ('mm', 'cflags_pch_objcc')]:
871
+ include = precompiled_header.GetInclude(ext, arch)
872
+ if include: ninja_file.variable(var, include)
873
+
874
+ self.WriteVariableList(ninja_file, 'cflags',
875
+ map(self.ExpandSpecial, cflags))
876
+ self.WriteVariableList(ninja_file, 'cflags_c',
877
+ map(self.ExpandSpecial, cflags_c))
878
+ self.WriteVariableList(ninja_file, 'cflags_cc',
879
+ map(self.ExpandSpecial, cflags_cc))
880
+ if self.flavor == 'mac':
881
+ self.WriteVariableList(ninja_file, 'cflags_objc',
882
+ map(self.ExpandSpecial, cflags_objc))
883
+ self.WriteVariableList(ninja_file, 'cflags_objcc',
884
+ map(self.ExpandSpecial, cflags_objcc))
885
+ ninja_file.newline()
886
+ outputs = []
887
+ has_rc_source = False
888
+ for source in sources:
889
+ filename, ext = os.path.splitext(source)
890
+ ext = ext[1:]
891
+ obj_ext = self.obj_ext
892
+ if ext in ('cc', 'cpp', 'cxx'):
893
+ command = 'cxx'
894
+ self.uses_cpp = True
895
+ elif ext == 'c' or (ext == 'S' and self.flavor != 'win'):
896
+ command = 'cc'
897
+ elif ext == 's' and self.flavor != 'win': # Doesn't generate .o.d files.
898
+ command = 'cc_s'
899
+ elif (self.flavor == 'win' and ext == 'asm' and
900
+ self.msvs_settings.GetArch(config_name) == 'x86' and
901
+ not self.msvs_settings.HasExplicitAsmRules(spec)):
902
+ # Asm files only get auto assembled for x86 (not x64).
903
+ command = 'asm'
904
+ # Add the _asm suffix as msvs is capable of handling .cc and
905
+ # .asm files of the same name without collision.
906
+ obj_ext = '_asm.obj'
907
+ elif self.flavor == 'mac' and ext == 'm':
908
+ command = 'objc'
909
+ elif self.flavor == 'mac' and ext == 'mm':
910
+ command = 'objcxx'
911
+ self.uses_cpp = True
912
+ elif self.flavor == 'win' and ext == 'rc':
913
+ command = 'rc'
914
+ obj_ext = '.res'
915
+ has_rc_source = True
916
+ else:
917
+ # Ignore unhandled extensions.
918
+ continue
919
+ input = self.GypPathToNinja(source)
920
+ output = self.GypPathToUniqueOutput(filename + obj_ext)
921
+ if arch is not None:
922
+ output = AddArch(output, arch)
923
+ implicit = precompiled_header.GetObjDependencies([input], [output], arch)
924
+ variables = []
925
+ if self.flavor == 'win':
926
+ variables, output, implicit = precompiled_header.GetFlagsModifications(
927
+ input, output, implicit, command, cflags_c, cflags_cc,
928
+ self.ExpandSpecial)
929
+ ninja_file.build(output, command, input,
930
+ implicit=[gch for _, _, gch in implicit],
931
+ order_only=predepends, variables=variables)
932
+ outputs.append(output)
933
+
934
+ if has_rc_source:
935
+ resource_include_dirs = config.get('resource_include_dirs', include_dirs)
936
+ self.WriteVariableList(ninja_file, 'resource_includes',
937
+ [QuoteShellArgument('-I' + self.GypPathToNinja(i, env), self.flavor)
938
+ for i in resource_include_dirs])
939
+
940
+ self.WritePchTargets(ninja_file, pch_commands)
941
+
942
+ ninja_file.newline()
943
+ return outputs
944
+
945
+ def WritePchTargets(self, ninja_file, pch_commands):
946
+ """Writes ninja rules to compile prefix headers."""
947
+ if not pch_commands:
948
+ return
949
+
950
+ for gch, lang_flag, lang, input in pch_commands:
951
+ var_name = {
952
+ 'c': 'cflags_pch_c',
953
+ 'cc': 'cflags_pch_cc',
954
+ 'm': 'cflags_pch_objc',
955
+ 'mm': 'cflags_pch_objcc',
956
+ }[lang]
957
+
958
+ map = { 'c': 'cc', 'cc': 'cxx', 'm': 'objc', 'mm': 'objcxx', }
959
+ cmd = map.get(lang)
960
+ ninja_file.build(gch, cmd, input, variables=[(var_name, lang_flag)])
961
+
962
+ def WriteLink(self, spec, config_name, config, link_deps):
963
+ """Write out a link step. Fills out target.binary. """
964
+ if self.flavor != 'mac' or len(self.archs) == 1:
965
+ return self.WriteLinkForArch(
966
+ self.ninja, spec, config_name, config, link_deps)
967
+ else:
968
+ output = self.ComputeOutput(spec)
969
+ inputs = [self.WriteLinkForArch(self.arch_subninjas[arch], spec,
970
+ config_name, config, link_deps[arch],
971
+ arch=arch)
972
+ for arch in self.archs]
973
+ extra_bindings = []
974
+ if not self.is_mac_bundle:
975
+ self.AppendPostbuildVariable(extra_bindings, spec, output, output)
976
+ self.ninja.build(output, 'lipo', inputs, variables=extra_bindings)
977
+ return output
978
+
979
+ def WriteLinkForArch(self, ninja_file, spec, config_name, config,
980
+ link_deps, arch=None):
981
+ """Write out a link step. Fills out target.binary. """
982
+ command = {
983
+ 'executable': 'link',
984
+ 'loadable_module': 'solink_module',
985
+ 'shared_library': 'solink',
986
+ }[spec['type']]
987
+ command_suffix = ''
988
+
989
+ implicit_deps = set()
990
+ solibs = set()
991
+
992
+ if 'dependencies' in spec:
993
+ # Two kinds of dependencies:
994
+ # - Linkable dependencies (like a .a or a .so): add them to the link line.
995
+ # - Non-linkable dependencies (like a rule that generates a file
996
+ # and writes a stamp file): add them to implicit_deps
997
+ extra_link_deps = set()
998
+ for dep in spec['dependencies']:
999
+ target = self.target_outputs.get(dep)
1000
+ if not target:
1001
+ continue
1002
+ linkable = target.Linkable()
1003
+ if linkable:
1004
+ new_deps = []
1005
+ if (self.flavor == 'win' and
1006
+ target.component_objs and
1007
+ self.msvs_settings.IsUseLibraryDependencyInputs(config_name)):
1008
+ new_deps = target.component_objs
1009
+ elif self.flavor == 'win' and target.import_lib:
1010
+ new_deps = [target.import_lib]
1011
+ elif target.UsesToc(self.flavor):
1012
+ solibs.add(target.binary)
1013
+ implicit_deps.add(target.binary + '.TOC')
1014
+ else:
1015
+ new_deps = [target.binary]
1016
+ for new_dep in new_deps:
1017
+ if new_dep not in extra_link_deps:
1018
+ extra_link_deps.add(new_dep)
1019
+ link_deps.append(new_dep)
1020
+
1021
+ final_output = target.FinalOutput()
1022
+ if not linkable or final_output != target.binary:
1023
+ implicit_deps.add(final_output)
1024
+
1025
+ extra_bindings = []
1026
+ if self.uses_cpp and self.flavor != 'win':
1027
+ extra_bindings.append(('ld', '$ldxx'))
1028
+
1029
+ output = self.ComputeOutput(spec, arch)
1030
+ if arch is None and not self.is_mac_bundle:
1031
+ self.AppendPostbuildVariable(extra_bindings, spec, output, output)
1032
+
1033
+ is_executable = spec['type'] == 'executable'
1034
+ # The ldflags config key is not used on mac or win. On those platforms
1035
+ # linker flags are set via xcode_settings and msvs_settings, respectively.
1036
+ env_ldflags = os.environ.get('LDFLAGS', '').split()
1037
+ if self.flavor == 'mac':
1038
+ ldflags = self.xcode_settings.GetLdflags(config_name,
1039
+ self.ExpandSpecial(generator_default_variables['PRODUCT_DIR']),
1040
+ self.GypPathToNinja, arch)
1041
+ ldflags = env_ldflags + ldflags
1042
+ elif self.flavor == 'win':
1043
+ manifest_base_name = self.GypPathToUniqueOutput(
1044
+ self.ComputeOutputFileName(spec))
1045
+ ldflags, intermediate_manifest, manifest_files = \
1046
+ self.msvs_settings.GetLdflags(config_name, self.GypPathToNinja,
1047
+ self.ExpandSpecial, manifest_base_name,
1048
+ output, is_executable,
1049
+ self.toplevel_build)
1050
+ ldflags = env_ldflags + ldflags
1051
+ self.WriteVariableList(ninja_file, 'manifests', manifest_files)
1052
+ implicit_deps = implicit_deps.union(manifest_files)
1053
+ if intermediate_manifest:
1054
+ self.WriteVariableList(
1055
+ ninja_file, 'intermediatemanifest', [intermediate_manifest])
1056
+ command_suffix = _GetWinLinkRuleNameSuffix(
1057
+ self.msvs_settings.IsEmbedManifest(config_name))
1058
+ def_file = self.msvs_settings.GetDefFile(self.GypPathToNinja)
1059
+ if def_file:
1060
+ implicit_deps.add(def_file)
1061
+ else:
1062
+ # Respect environment variables related to build, but target-specific
1063
+ # flags can still override them.
1064
+ ldflags = env_ldflags + config.get('ldflags', [])
1065
+ if is_executable and len(solibs):
1066
+ rpath = 'lib/'
1067
+ if self.toolset != 'target':
1068
+ rpath += self.toolset
1069
+ ldflags.append('-Wl,-rpath=\$$ORIGIN/%s' % rpath)
1070
+ ldflags.append('-Wl,-rpath-link=%s' % rpath)
1071
+ self.WriteVariableList(ninja_file, 'ldflags',
1072
+ gyp.common.uniquer(map(self.ExpandSpecial, ldflags)))
1073
+
1074
+ library_dirs = config.get('library_dirs', [])
1075
+ if self.flavor == 'win':
1076
+ library_dirs = [self.msvs_settings.ConvertVSMacros(l, config_name)
1077
+ for l in library_dirs]
1078
+ library_dirs = ['/LIBPATH:' + QuoteShellArgument(self.GypPathToNinja(l),
1079
+ self.flavor)
1080
+ for l in library_dirs]
1081
+ else:
1082
+ library_dirs = [QuoteShellArgument('-L' + self.GypPathToNinja(l),
1083
+ self.flavor)
1084
+ for l in library_dirs]
1085
+
1086
+ libraries = gyp.common.uniquer(map(self.ExpandSpecial,
1087
+ spec.get('libraries', [])))
1088
+ if self.flavor == 'mac':
1089
+ libraries = self.xcode_settings.AdjustLibraries(libraries, config_name)
1090
+ elif self.flavor == 'win':
1091
+ libraries = self.msvs_settings.AdjustLibraries(libraries)
1092
+
1093
+ self.WriteVariableList(ninja_file, 'libs', library_dirs + libraries)
1094
+
1095
+ linked_binary = output
1096
+
1097
+ if command in ('solink', 'solink_module'):
1098
+ extra_bindings.append(('soname', os.path.split(output)[1]))
1099
+ extra_bindings.append(('lib',
1100
+ gyp.common.EncodePOSIXShellArgument(output)))
1101
+ if self.flavor == 'win':
1102
+ extra_bindings.append(('binary', output))
1103
+ if '/NOENTRY' not in ldflags:
1104
+ self.target.import_lib = output + '.lib'
1105
+ extra_bindings.append(('implibflag',
1106
+ '/IMPLIB:%s' % self.target.import_lib))
1107
+ pdbname = self.msvs_settings.GetPDBName(
1108
+ config_name, self.ExpandSpecial, output + '.pdb')
1109
+ output = [output, self.target.import_lib]
1110
+ if pdbname:
1111
+ output.append(pdbname)
1112
+ elif not self.is_mac_bundle:
1113
+ output = [output, output + '.TOC']
1114
+ else:
1115
+ command = command + '_notoc'
1116
+ elif self.flavor == 'win':
1117
+ extra_bindings.append(('binary', output))
1118
+ pdbname = self.msvs_settings.GetPDBName(
1119
+ config_name, self.ExpandSpecial, output + '.pdb')
1120
+ if pdbname:
1121
+ output = [output, pdbname]
1122
+
1123
+
1124
+ if len(solibs):
1125
+ extra_bindings.append(('solibs', gyp.common.EncodePOSIXShellList(solibs)))
1126
+
1127
+ ninja_file.build(output, command + command_suffix, link_deps,
1128
+ implicit=list(implicit_deps),
1129
+ variables=extra_bindings)
1130
+ return linked_binary
1131
+
1132
+ def WriteTarget(self, spec, config_name, config, link_deps, compile_deps):
1133
+ extra_link_deps = any(self.target_outputs.get(dep).Linkable()
1134
+ for dep in spec.get('dependencies', [])
1135
+ if dep in self.target_outputs)
1136
+ if spec['type'] == 'none' or (not link_deps and not extra_link_deps):
1137
+ # TODO(evan): don't call this function for 'none' target types, as
1138
+ # it doesn't do anything, and we fake out a 'binary' with a stamp file.
1139
+ self.target.binary = compile_deps
1140
+ self.target.type = 'none'
1141
+ elif spec['type'] == 'static_library':
1142
+ self.target.binary = self.ComputeOutput(spec)
1143
+ if (self.flavor not in ('mac', 'openbsd', 'win') and not
1144
+ self.is_standalone_static_library):
1145
+ self.ninja.build(self.target.binary, 'alink_thin', link_deps,
1146
+ order_only=compile_deps)
1147
+ else:
1148
+ variables = []
1149
+ if self.xcode_settings:
1150
+ libtool_flags = self.xcode_settings.GetLibtoolflags(config_name)
1151
+ if libtool_flags:
1152
+ variables.append(('libtool_flags', libtool_flags))
1153
+ if self.msvs_settings:
1154
+ libflags = self.msvs_settings.GetLibFlags(config_name,
1155
+ self.GypPathToNinja)
1156
+ variables.append(('libflags', libflags))
1157
+
1158
+ if self.flavor != 'mac' or len(self.archs) == 1:
1159
+ self.AppendPostbuildVariable(variables, spec,
1160
+ self.target.binary, self.target.binary)
1161
+ self.ninja.build(self.target.binary, 'alink', link_deps,
1162
+ order_only=compile_deps, variables=variables)
1163
+ else:
1164
+ inputs = []
1165
+ for arch in self.archs:
1166
+ output = self.ComputeOutput(spec, arch)
1167
+ self.arch_subninjas[arch].build(output, 'alink', link_deps[arch],
1168
+ order_only=compile_deps,
1169
+ variables=variables)
1170
+ inputs.append(output)
1171
+ # TODO: It's not clear if libtool_flags should be passed to the alink
1172
+ # call that combines single-arch .a files into a fat .a file.
1173
+ self.AppendPostbuildVariable(variables, spec,
1174
+ self.target.binary, self.target.binary)
1175
+ self.ninja.build(self.target.binary, 'alink', inputs,
1176
+ # FIXME: test proving order_only=compile_deps isn't
1177
+ # needed.
1178
+ variables=variables)
1179
+ else:
1180
+ self.target.binary = self.WriteLink(spec, config_name, config, link_deps)
1181
+ return self.target.binary
1182
+
1183
+ def WriteMacBundle(self, spec, mac_bundle_depends, is_empty):
1184
+ assert self.is_mac_bundle
1185
+ package_framework = spec['type'] in ('shared_library', 'loadable_module')
1186
+ output = self.ComputeMacBundleOutput()
1187
+ if is_empty:
1188
+ output += '.stamp'
1189
+ variables = []
1190
+ self.AppendPostbuildVariable(variables, spec, output, self.target.binary,
1191
+ is_command_start=not package_framework)
1192
+ if package_framework and not is_empty:
1193
+ variables.append(('version', self.xcode_settings.GetFrameworkVersion()))
1194
+ self.ninja.build(output, 'package_framework', mac_bundle_depends,
1195
+ variables=variables)
1196
+ else:
1197
+ self.ninja.build(output, 'stamp', mac_bundle_depends,
1198
+ variables=variables)
1199
+ self.target.bundle = output
1200
+ return output
1201
+
1202
+ def GetSortedXcodeEnv(self, additional_settings=None):
1203
+ """Returns the variables Xcode would set for build steps."""
1204
+ assert self.abs_build_dir
1205
+ abs_build_dir = self.abs_build_dir
1206
+ return gyp.xcode_emulation.GetSortedXcodeEnv(
1207
+ self.xcode_settings, abs_build_dir,
1208
+ os.path.join(abs_build_dir, self.build_to_base), self.config_name,
1209
+ additional_settings)
1210
+
1211
+ def GetSortedXcodePostbuildEnv(self):
1212
+ """Returns the variables Xcode would set for postbuild steps."""
1213
+ postbuild_settings = {}
1214
+ # CHROMIUM_STRIP_SAVE_FILE is a chromium-specific hack.
1215
+ # TODO(thakis): It would be nice to have some general mechanism instead.
1216
+ strip_save_file = self.xcode_settings.GetPerTargetSetting(
1217
+ 'CHROMIUM_STRIP_SAVE_FILE')
1218
+ if strip_save_file:
1219
+ postbuild_settings['CHROMIUM_STRIP_SAVE_FILE'] = strip_save_file
1220
+ return self.GetSortedXcodeEnv(additional_settings=postbuild_settings)
1221
+
1222
+ def AppendPostbuildVariable(self, variables, spec, output, binary,
1223
+ is_command_start=False):
1224
+ """Adds a 'postbuild' variable if there is a postbuild for |output|."""
1225
+ postbuild = self.GetPostbuildCommand(spec, output, binary, is_command_start)
1226
+ if postbuild:
1227
+ variables.append(('postbuilds', postbuild))
1228
+
1229
+ def GetPostbuildCommand(self, spec, output, output_binary, is_command_start):
1230
+ """Returns a shell command that runs all the postbuilds, and removes
1231
+ |output| if any of them fails. If |is_command_start| is False, then the
1232
+ returned string will start with ' && '."""
1233
+ if not self.xcode_settings or spec['type'] == 'none' or not output:
1234
+ return ''
1235
+ output = QuoteShellArgument(output, self.flavor)
1236
+ postbuilds = gyp.xcode_emulation.GetSpecPostbuildCommands(spec, quiet=True)
1237
+ if output_binary is not None:
1238
+ postbuilds = self.xcode_settings.AddImplicitPostbuilds(
1239
+ self.config_name,
1240
+ os.path.normpath(os.path.join(self.base_to_build, output)),
1241
+ QuoteShellArgument(
1242
+ os.path.normpath(os.path.join(self.base_to_build, output_binary)),
1243
+ self.flavor),
1244
+ postbuilds, quiet=True)
1245
+
1246
+ if not postbuilds:
1247
+ return ''
1248
+ # Postbuilds expect to be run in the gyp file's directory, so insert an
1249
+ # implicit postbuild to cd to there.
1250
+ postbuilds.insert(0, gyp.common.EncodePOSIXShellList(
1251
+ ['cd', self.build_to_base]))
1252
+ env = self.ComputeExportEnvString(self.GetSortedXcodePostbuildEnv())
1253
+ # G will be non-null if any postbuild fails. Run all postbuilds in a
1254
+ # subshell.
1255
+ commands = env + ' (' + \
1256
+ ' && '.join([ninja_syntax.escape(command) for command in postbuilds])
1257
+ command_string = (commands + '); G=$$?; '
1258
+ # Remove the final output if any postbuild failed.
1259
+ '((exit $$G) || rm -rf %s) ' % output + '&& exit $$G)')
1260
+ if is_command_start:
1261
+ return '(' + command_string + ' && '
1262
+ else:
1263
+ return '$ && (' + command_string
1264
+
1265
+ def ComputeExportEnvString(self, env):
1266
+ """Given an environment, returns a string looking like
1267
+ 'export FOO=foo; export BAR="${FOO} bar;'
1268
+ that exports |env| to the shell."""
1269
+ export_str = []
1270
+ for k, v in env:
1271
+ export_str.append('export %s=%s;' %
1272
+ (k, ninja_syntax.escape(gyp.common.EncodePOSIXShellArgument(v))))
1273
+ return ' '.join(export_str)
1274
+
1275
+ def ComputeMacBundleOutput(self):
1276
+ """Return the 'output' (full output path) to a bundle output directory."""
1277
+ assert self.is_mac_bundle
1278
+ path = generator_default_variables['PRODUCT_DIR']
1279
+ return self.ExpandSpecial(
1280
+ os.path.join(path, self.xcode_settings.GetWrapperName()))
1281
+
1282
+ def ComputeOutputFileName(self, spec, type=None):
1283
+ """Compute the filename of the final output for the current target."""
1284
+ if not type:
1285
+ type = spec['type']
1286
+
1287
+ default_variables = copy.copy(generator_default_variables)
1288
+ CalculateVariables(default_variables, {'flavor': self.flavor})
1289
+
1290
+ # Compute filename prefix: the product prefix, or a default for
1291
+ # the product type.
1292
+ DEFAULT_PREFIX = {
1293
+ 'loadable_module': default_variables['SHARED_LIB_PREFIX'],
1294
+ 'shared_library': default_variables['SHARED_LIB_PREFIX'],
1295
+ 'static_library': default_variables['STATIC_LIB_PREFIX'],
1296
+ 'executable': default_variables['EXECUTABLE_PREFIX'],
1297
+ }
1298
+ prefix = spec.get('product_prefix', DEFAULT_PREFIX.get(type, ''))
1299
+
1300
+ # Compute filename extension: the product extension, or a default
1301
+ # for the product type.
1302
+ DEFAULT_EXTENSION = {
1303
+ 'loadable_module': default_variables['SHARED_LIB_SUFFIX'],
1304
+ 'shared_library': default_variables['SHARED_LIB_SUFFIX'],
1305
+ 'static_library': default_variables['STATIC_LIB_SUFFIX'],
1306
+ 'executable': default_variables['EXECUTABLE_SUFFIX'],
1307
+ }
1308
+ extension = spec.get('product_extension')
1309
+ if extension:
1310
+ extension = '.' + extension
1311
+ else:
1312
+ extension = DEFAULT_EXTENSION.get(type, '')
1313
+
1314
+ if 'product_name' in spec:
1315
+ # If we were given an explicit name, use that.
1316
+ target = spec['product_name']
1317
+ else:
1318
+ # Otherwise, derive a name from the target name.
1319
+ target = spec['target_name']
1320
+ if prefix == 'lib':
1321
+ # Snip out an extra 'lib' from libs if appropriate.
1322
+ target = StripPrefix(target, 'lib')
1323
+
1324
+ if type in ('static_library', 'loadable_module', 'shared_library',
1325
+ 'executable'):
1326
+ return '%s%s%s' % (prefix, target, extension)
1327
+ elif type == 'none':
1328
+ return '%s.stamp' % target
1329
+ else:
1330
+ raise Exception('Unhandled output type %s' % type)
1331
+
1332
+ def ComputeOutput(self, spec, arch=None):
1333
+ """Compute the path for the final output of the spec."""
1334
+ type = spec['type']
1335
+
1336
+ if self.flavor == 'win':
1337
+ override = self.msvs_settings.GetOutputName(self.config_name,
1338
+ self.ExpandSpecial)
1339
+ if override:
1340
+ return override
1341
+
1342
+ if arch is None and self.flavor == 'mac' and type in (
1343
+ 'static_library', 'executable', 'shared_library', 'loadable_module'):
1344
+ filename = self.xcode_settings.GetExecutablePath()
1345
+ else:
1346
+ filename = self.ComputeOutputFileName(spec, type)
1347
+
1348
+ if arch is None and 'product_dir' in spec:
1349
+ path = os.path.join(spec['product_dir'], filename)
1350
+ return self.ExpandSpecial(path)
1351
+
1352
+ # Some products go into the output root, libraries go into shared library
1353
+ # dir, and everything else goes into the normal place.
1354
+ type_in_output_root = ['executable', 'loadable_module']
1355
+ if self.flavor == 'mac' and self.toolset == 'target':
1356
+ type_in_output_root += ['shared_library', 'static_library']
1357
+ elif self.flavor == 'win' and self.toolset == 'target':
1358
+ type_in_output_root += ['shared_library']
1359
+
1360
+ if arch is not None:
1361
+ # Make sure partial executables don't end up in a bundle or the regular
1362
+ # output directory.
1363
+ archdir = 'arch'
1364
+ if self.toolset != 'target':
1365
+ archdir = os.path.join('arch', '%s' % self.toolset)
1366
+ return os.path.join(archdir, AddArch(filename, arch))
1367
+ elif type in type_in_output_root or self.is_standalone_static_library:
1368
+ return filename
1369
+ elif type == 'shared_library':
1370
+ libdir = 'lib'
1371
+ if self.toolset != 'target':
1372
+ libdir = os.path.join('lib', '%s' % self.toolset)
1373
+ return os.path.join(libdir, filename)
1374
+ else:
1375
+ return self.GypPathToUniqueOutput(filename, qualified=False)
1376
+
1377
+ def WriteVariableList(self, ninja_file, var, values):
1378
+ assert not isinstance(values, str)
1379
+ if values is None:
1380
+ values = []
1381
+ ninja_file.variable(var, ' '.join(values))
1382
+
1383
+ def WriteNewNinjaRule(self, name, args, description, is_cygwin, env):
1384
+ """Write out a new ninja "rule" statement for a given command.
1385
+
1386
+ Returns the name of the new rule, and a copy of |args| with variables
1387
+ expanded."""
1388
+
1389
+ if self.flavor == 'win':
1390
+ args = [self.msvs_settings.ConvertVSMacros(
1391
+ arg, self.base_to_build, config=self.config_name)
1392
+ for arg in args]
1393
+ description = self.msvs_settings.ConvertVSMacros(
1394
+ description, config=self.config_name)
1395
+ elif self.flavor == 'mac':
1396
+ # |env| is an empty list on non-mac.
1397
+ args = [gyp.xcode_emulation.ExpandEnvVars(arg, env) for arg in args]
1398
+ description = gyp.xcode_emulation.ExpandEnvVars(description, env)
1399
+
1400
+ # TODO: we shouldn't need to qualify names; we do it because
1401
+ # currently the ninja rule namespace is global, but it really
1402
+ # should be scoped to the subninja.
1403
+ rule_name = self.name
1404
+ if self.toolset == 'target':
1405
+ rule_name += '.' + self.toolset
1406
+ rule_name += '.' + name
1407
+ rule_name = re.sub('[^a-zA-Z0-9_]', '_', rule_name)
1408
+
1409
+ # Remove variable references, but not if they refer to the magic rule
1410
+ # variables. This is not quite right, as it also protects these for
1411
+ # actions, not just for rules where they are valid. Good enough.
1412
+ protect = [ '${root}', '${dirname}', '${source}', '${ext}', '${name}' ]
1413
+ protect = '(?!' + '|'.join(map(re.escape, protect)) + ')'
1414
+ description = re.sub(protect + r'\$', '_', description)
1415
+
1416
+ # gyp dictates that commands are run from the base directory.
1417
+ # cd into the directory before running, and adjust paths in
1418
+ # the arguments to point to the proper locations.
1419
+ rspfile = None
1420
+ rspfile_content = None
1421
+ args = [self.ExpandSpecial(arg, self.base_to_build) for arg in args]
1422
+ if self.flavor == 'win':
1423
+ rspfile = rule_name + '.$unique_name.rsp'
1424
+ # The cygwin case handles this inside the bash sub-shell.
1425
+ run_in = '' if is_cygwin else ' ' + self.build_to_base
1426
+ if is_cygwin:
1427
+ rspfile_content = self.msvs_settings.BuildCygwinBashCommandLine(
1428
+ args, self.build_to_base)
1429
+ else:
1430
+ rspfile_content = gyp.msvs_emulation.EncodeRspFileList(args)
1431
+ command = ('%s gyp-win-tool action-wrapper $arch ' % sys.executable +
1432
+ rspfile + run_in)
1433
+ else:
1434
+ env = self.ComputeExportEnvString(env)
1435
+ command = gyp.common.EncodePOSIXShellList(args)
1436
+ command = 'cd %s; ' % self.build_to_base + env + command
1437
+
1438
+ # GYP rules/actions express being no-ops by not touching their outputs.
1439
+ # Avoid executing downstream dependencies in this case by specifying
1440
+ # restat=1 to ninja.
1441
+ self.ninja.rule(rule_name, command, description, restat=True,
1442
+ rspfile=rspfile, rspfile_content=rspfile_content)
1443
+ self.ninja.newline()
1444
+
1445
+ return rule_name, args
1446
+
1447
+
1448
+ def CalculateVariables(default_variables, params):
1449
+ """Calculate additional variables for use in the build (called by gyp)."""
1450
+ global generator_additional_non_configuration_keys
1451
+ global generator_additional_path_sections
1452
+ flavor = gyp.common.GetFlavor(params)
1453
+ if flavor == 'mac':
1454
+ default_variables.setdefault('OS', 'mac')
1455
+ default_variables.setdefault('SHARED_LIB_SUFFIX', '.dylib')
1456
+ default_variables.setdefault('SHARED_LIB_DIR',
1457
+ generator_default_variables['PRODUCT_DIR'])
1458
+ default_variables.setdefault('LIB_DIR',
1459
+ generator_default_variables['PRODUCT_DIR'])
1460
+
1461
+ # Copy additional generator configuration data from Xcode, which is shared
1462
+ # by the Mac Ninja generator.
1463
+ import gyp.generator.xcode as xcode_generator
1464
+ generator_additional_non_configuration_keys = getattr(xcode_generator,
1465
+ 'generator_additional_non_configuration_keys', [])
1466
+ generator_additional_path_sections = getattr(xcode_generator,
1467
+ 'generator_additional_path_sections', [])
1468
+ global generator_extra_sources_for_rules
1469
+ generator_extra_sources_for_rules = getattr(xcode_generator,
1470
+ 'generator_extra_sources_for_rules', [])
1471
+ elif flavor == 'win':
1472
+ default_variables.setdefault('OS', 'win')
1473
+ default_variables['EXECUTABLE_SUFFIX'] = '.exe'
1474
+ default_variables['STATIC_LIB_PREFIX'] = ''
1475
+ default_variables['STATIC_LIB_SUFFIX'] = '.lib'
1476
+ default_variables['SHARED_LIB_PREFIX'] = ''
1477
+ default_variables['SHARED_LIB_SUFFIX'] = '.dll'
1478
+
1479
+ # Copy additional generator configuration data from VS, which is shared
1480
+ # by the Windows Ninja generator.
1481
+ import gyp.generator.msvs as msvs_generator
1482
+ generator_additional_non_configuration_keys = getattr(msvs_generator,
1483
+ 'generator_additional_non_configuration_keys', [])
1484
+ generator_additional_path_sections = getattr(msvs_generator,
1485
+ 'generator_additional_path_sections', [])
1486
+
1487
+ gyp.msvs_emulation.CalculateCommonVariables(default_variables, params)
1488
+ else:
1489
+ operating_system = flavor
1490
+ if flavor == 'android':
1491
+ operating_system = 'linux' # Keep this legacy behavior for now.
1492
+ default_variables.setdefault('OS', operating_system)
1493
+ default_variables.setdefault('SHARED_LIB_SUFFIX', '.so')
1494
+ default_variables.setdefault('SHARED_LIB_DIR',
1495
+ os.path.join('$!PRODUCT_DIR', 'lib'))
1496
+ default_variables.setdefault('LIB_DIR',
1497
+ os.path.join('$!PRODUCT_DIR', 'obj'))
1498
+
1499
+ def ComputeOutputDir(params):
1500
+ """Returns the path from the toplevel_dir to the build output directory."""
1501
+ # generator_dir: relative path from pwd to where make puts build files.
1502
+ # Makes migrating from make to ninja easier, ninja doesn't put anything here.
1503
+ generator_dir = os.path.relpath(params['options'].generator_output or '.')
1504
+
1505
+ # output_dir: relative path from generator_dir to the build directory.
1506
+ output_dir = params.get('generator_flags', {}).get('output_dir', 'out')
1507
+
1508
+ # Relative path from source root to our output files. e.g. "out"
1509
+ return os.path.normpath(os.path.join(generator_dir, output_dir))
1510
+
1511
+
1512
+ def CalculateGeneratorInputInfo(params):
1513
+ """Called by __init__ to initialize generator values based on params."""
1514
+ # E.g. "out/gypfiles"
1515
+ toplevel = params['options'].toplevel_dir
1516
+ qualified_out_dir = os.path.normpath(os.path.join(
1517
+ toplevel, ComputeOutputDir(params), 'gypfiles'))
1518
+
1519
+ global generator_filelist_paths
1520
+ generator_filelist_paths = {
1521
+ 'toplevel': toplevel,
1522
+ 'qualified_out_dir': qualified_out_dir,
1523
+ }
1524
+
1525
+
1526
+ def OpenOutput(path, mode='w'):
1527
+ """Open |path| for writing, creating directories if necessary."""
1528
+ gyp.common.EnsureDirExists(path)
1529
+ return open(path, mode)
1530
+
1531
+
1532
+ def CommandWithWrapper(cmd, wrappers, prog):
1533
+ wrapper = wrappers.get(cmd, '')
1534
+ if wrapper:
1535
+ return wrapper + ' ' + prog
1536
+ return prog
1537
+
1538
+
1539
+ def GetDefaultConcurrentLinks():
1540
+ """Returns a best-guess for a number of concurrent links."""
1541
+ if sys.platform in ('win32', 'cygwin'):
1542
+ import ctypes
1543
+
1544
+ class MEMORYSTATUSEX(ctypes.Structure):
1545
+ _fields_ = [
1546
+ ("dwLength", ctypes.c_ulong),
1547
+ ("dwMemoryLoad", ctypes.c_ulong),
1548
+ ("ullTotalPhys", ctypes.c_ulonglong),
1549
+ ("ullAvailPhys", ctypes.c_ulonglong),
1550
+ ("ullTotalPageFile", ctypes.c_ulonglong),
1551
+ ("ullAvailPageFile", ctypes.c_ulonglong),
1552
+ ("ullTotalVirtual", ctypes.c_ulonglong),
1553
+ ("ullAvailVirtual", ctypes.c_ulonglong),
1554
+ ("sullAvailExtendedVirtual", ctypes.c_ulonglong),
1555
+ ]
1556
+
1557
+ stat = MEMORYSTATUSEX()
1558
+ stat.dwLength = ctypes.sizeof(stat)
1559
+ ctypes.windll.kernel32.GlobalMemoryStatusEx(ctypes.byref(stat))
1560
+
1561
+ mem_limit = max(1, stat.ullTotalPhys / (4 * (2 ** 30))) # total / 4GB
1562
+ hard_cap = max(1, int(os.getenv('GYP_LINK_CONCURRENCY_MAX', 2**32)))
1563
+ return min(mem_limit, hard_cap)
1564
+ elif sys.platform.startswith('linux'):
1565
+ if os.path.exists("/proc/meminfo"):
1566
+ with open("/proc/meminfo") as meminfo:
1567
+ memtotal_re = re.compile(r'^MemTotal:\s*(\d*)\s*kB')
1568
+ for line in meminfo:
1569
+ match = memtotal_re.match(line)
1570
+ if not match:
1571
+ continue
1572
+ # Allow 8Gb per link on Linux because Gold is quite memory hungry
1573
+ return max(1, int(match.group(1)) / (8 * (2 ** 20)))
1574
+ return 1
1575
+ elif sys.platform == 'darwin':
1576
+ try:
1577
+ avail_bytes = int(subprocess.check_output(['sysctl', '-n', 'hw.memsize']))
1578
+ # A static library debug build of Chromium's unit_tests takes ~2.7GB, so
1579
+ # 4GB per ld process allows for some more bloat.
1580
+ return max(1, avail_bytes / (4 * (2 ** 30))) # total / 4GB
1581
+ except:
1582
+ return 1
1583
+ else:
1584
+ # TODO(scottmg): Implement this for other platforms.
1585
+ return 1
1586
+
1587
+
1588
+ def _GetWinLinkRuleNameSuffix(embed_manifest):
1589
+ """Returns the suffix used to select an appropriate linking rule depending on
1590
+ whether the manifest embedding is enabled."""
1591
+ return '_embed' if embed_manifest else ''
1592
+
1593
+
1594
+ def _AddWinLinkRules(master_ninja, embed_manifest):
1595
+ """Adds link rules for Windows platform to |master_ninja|."""
1596
+ def FullLinkCommand(ldcmd, out, binary_type):
1597
+ resource_name = {
1598
+ 'exe': '1',
1599
+ 'dll': '2',
1600
+ }[binary_type]
1601
+ return '%(python)s gyp-win-tool link-with-manifests $arch %(embed)s ' \
1602
+ '%(out)s "%(ldcmd)s" %(resname)s $mt $rc "$intermediatemanifest" ' \
1603
+ '$manifests' % {
1604
+ 'python': sys.executable,
1605
+ 'out': out,
1606
+ 'ldcmd': ldcmd,
1607
+ 'resname': resource_name,
1608
+ 'embed': embed_manifest }
1609
+ rule_name_suffix = _GetWinLinkRuleNameSuffix(embed_manifest)
1610
+ use_separate_mspdbsrv = (
1611
+ int(os.environ.get('GYP_USE_SEPARATE_MSPDBSRV', '0')) != 0)
1612
+ dlldesc = 'LINK%s(DLL) $binary' % rule_name_suffix.upper()
1613
+ dllcmd = ('%s gyp-win-tool link-wrapper $arch %s '
1614
+ '$ld /nologo $implibflag /DLL /OUT:$binary '
1615
+ '@$binary.rsp' % (sys.executable, use_separate_mspdbsrv))
1616
+ dllcmd = FullLinkCommand(dllcmd, '$binary', 'dll')
1617
+ master_ninja.rule('solink' + rule_name_suffix,
1618
+ description=dlldesc, command=dllcmd,
1619
+ rspfile='$binary.rsp',
1620
+ rspfile_content='$libs $in_newline $ldflags',
1621
+ restat=True,
1622
+ pool='link_pool')
1623
+ master_ninja.rule('solink_module' + rule_name_suffix,
1624
+ description=dlldesc, command=dllcmd,
1625
+ rspfile='$binary.rsp',
1626
+ rspfile_content='$libs $in_newline $ldflags',
1627
+ restat=True,
1628
+ pool='link_pool')
1629
+ # Note that ldflags goes at the end so that it has the option of
1630
+ # overriding default settings earlier in the command line.
1631
+ exe_cmd = ('%s gyp-win-tool link-wrapper $arch %s '
1632
+ '$ld /nologo /OUT:$binary @$binary.rsp' %
1633
+ (sys.executable, use_separate_mspdbsrv))
1634
+ exe_cmd = FullLinkCommand(exe_cmd, '$binary', 'exe')
1635
+ master_ninja.rule('link' + rule_name_suffix,
1636
+ description='LINK%s $binary' % rule_name_suffix.upper(),
1637
+ command=exe_cmd,
1638
+ rspfile='$binary.rsp',
1639
+ rspfile_content='$in_newline $libs $ldflags',
1640
+ pool='link_pool')
1641
+
1642
+
1643
+ def GenerateOutputForConfig(target_list, target_dicts, data, params,
1644
+ config_name):
1645
+ options = params['options']
1646
+ flavor = gyp.common.GetFlavor(params)
1647
+ generator_flags = params.get('generator_flags', {})
1648
+
1649
+ # build_dir: relative path from source root to our output files.
1650
+ # e.g. "out/Debug"
1651
+ build_dir = os.path.normpath(
1652
+ os.path.join(ComputeOutputDir(params), config_name))
1653
+
1654
+ toplevel_build = os.path.join(options.toplevel_dir, build_dir)
1655
+
1656
+ master_ninja_file = OpenOutput(os.path.join(toplevel_build, 'build.ninja'))
1657
+ master_ninja = ninja_syntax.Writer(master_ninja_file, width=120)
1658
+
1659
+ # Put build-time support tools in out/{config_name}.
1660
+ gyp.common.CopyTool(flavor, toplevel_build)
1661
+
1662
+ # Grab make settings for CC/CXX.
1663
+ # The rules are
1664
+ # - The priority from low to high is gcc/g++, the 'make_global_settings' in
1665
+ # gyp, the environment variable.
1666
+ # - If there is no 'make_global_settings' for CC.host/CXX.host or
1667
+ # 'CC_host'/'CXX_host' enviroment variable, cc_host/cxx_host should be set
1668
+ # to cc/cxx.
1669
+ if flavor == 'win':
1670
+ # Overridden by local arch choice in the use_deps case.
1671
+ # Chromium's ffmpeg c99conv.py currently looks for a 'cc =' line in
1672
+ # build.ninja so needs something valid here. http://crbug.com/233985
1673
+ cc = 'cl.exe'
1674
+ cxx = 'cl.exe'
1675
+ ld = 'link.exe'
1676
+ ld_host = '$ld'
1677
+ else:
1678
+ cc = 'cc'
1679
+ cxx = 'c++'
1680
+ ld = '$cc'
1681
+ ldxx = '$cxx'
1682
+ ld_host = '$cc_host'
1683
+ ldxx_host = '$cxx_host'
1684
+
1685
+ cc_host = None
1686
+ cxx_host = None
1687
+ cc_host_global_setting = None
1688
+ cxx_host_global_setting = None
1689
+ clang_cl = None
1690
+
1691
+ build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0])
1692
+ make_global_settings = data[build_file].get('make_global_settings', [])
1693
+ build_to_root = gyp.common.InvertRelativePath(build_dir,
1694
+ options.toplevel_dir)
1695
+ wrappers = {}
1696
+ for key, value in make_global_settings:
1697
+ if key == 'CC':
1698
+ cc = os.path.join(build_to_root, value)
1699
+ if cc.endswith('clang-cl'):
1700
+ clang_cl = cc
1701
+ if key == 'CXX':
1702
+ cxx = os.path.join(build_to_root, value)
1703
+ if key == 'CC.host':
1704
+ cc_host = os.path.join(build_to_root, value)
1705
+ cc_host_global_setting = value
1706
+ if key == 'CXX.host':
1707
+ cxx_host = os.path.join(build_to_root, value)
1708
+ cxx_host_global_setting = value
1709
+ if key.endswith('_wrapper'):
1710
+ wrappers[key[:-len('_wrapper')]] = os.path.join(build_to_root, value)
1711
+
1712
+ # Support wrappers from environment variables too.
1713
+ for key, value in os.environ.iteritems():
1714
+ if key.lower().endswith('_wrapper'):
1715
+ key_prefix = key[:-len('_wrapper')]
1716
+ key_prefix = re.sub(r'\.HOST$', '.host', key_prefix)
1717
+ wrappers[key_prefix] = os.path.join(build_to_root, value)
1718
+
1719
+ if flavor == 'win':
1720
+ cl_paths = gyp.msvs_emulation.GenerateEnvironmentFiles(
1721
+ toplevel_build, generator_flags, OpenOutput)
1722
+ for arch, path in cl_paths.iteritems():
1723
+ if clang_cl:
1724
+ # If we have selected clang-cl, use that instead.
1725
+ path = clang_cl
1726
+ command = CommandWithWrapper('CC', wrappers,
1727
+ QuoteShellArgument(path, 'win'))
1728
+ if clang_cl:
1729
+ # Use clang-cl to cross-compile for x86 or x86_64.
1730
+ command += (' -m32' if arch == 'x86' else ' -m64')
1731
+ master_ninja.variable('cl_' + arch, command)
1732
+
1733
+ cc = GetEnvironFallback(['CC_target', 'CC'], cc)
1734
+ master_ninja.variable('cc', CommandWithWrapper('CC', wrappers, cc))
1735
+ cxx = GetEnvironFallback(['CXX_target', 'CXX'], cxx)
1736
+ master_ninja.variable('cxx', CommandWithWrapper('CXX', wrappers, cxx))
1737
+
1738
+ if flavor == 'win':
1739
+ master_ninja.variable('ld', ld)
1740
+ master_ninja.variable('idl', 'midl.exe')
1741
+ master_ninja.variable('ar', 'lib.exe')
1742
+ master_ninja.variable('rc', 'rc.exe')
1743
+ master_ninja.variable('asm', 'ml.exe')
1744
+ master_ninja.variable('mt', 'mt.exe')
1745
+ else:
1746
+ master_ninja.variable('ld', CommandWithWrapper('LINK', wrappers, ld))
1747
+ master_ninja.variable('ldxx', CommandWithWrapper('LINK', wrappers, ldxx))
1748
+ master_ninja.variable('ar', GetEnvironFallback(['AR_target', 'AR'], 'ar'))
1749
+
1750
+ if generator_supports_multiple_toolsets:
1751
+ if not cc_host:
1752
+ cc_host = cc
1753
+ if not cxx_host:
1754
+ cxx_host = cxx
1755
+
1756
+ master_ninja.variable('ar_host', GetEnvironFallback(['AR_host'], 'ar'))
1757
+ cc_host = GetEnvironFallback(['CC_host'], cc_host)
1758
+ cxx_host = GetEnvironFallback(['CXX_host'], cxx_host)
1759
+
1760
+ # The environment variable could be used in 'make_global_settings', like
1761
+ # ['CC.host', '$(CC)'] or ['CXX.host', '$(CXX)'], transform them here.
1762
+ if '$(CC)' in cc_host and cc_host_global_setting:
1763
+ cc_host = cc_host_global_setting.replace('$(CC)', cc)
1764
+ if '$(CXX)' in cxx_host and cxx_host_global_setting:
1765
+ cxx_host = cxx_host_global_setting.replace('$(CXX)', cxx)
1766
+ master_ninja.variable('cc_host',
1767
+ CommandWithWrapper('CC.host', wrappers, cc_host))
1768
+ master_ninja.variable('cxx_host',
1769
+ CommandWithWrapper('CXX.host', wrappers, cxx_host))
1770
+ if flavor == 'win':
1771
+ master_ninja.variable('ld_host', ld_host)
1772
+ else:
1773
+ master_ninja.variable('ld_host', CommandWithWrapper(
1774
+ 'LINK', wrappers, ld_host))
1775
+ master_ninja.variable('ldxx_host', CommandWithWrapper(
1776
+ 'LINK', wrappers, ldxx_host))
1777
+
1778
+ master_ninja.newline()
1779
+
1780
+ master_ninja.pool('link_pool', depth=GetDefaultConcurrentLinks())
1781
+ master_ninja.newline()
1782
+
1783
+ deps = 'msvc' if flavor == 'win' else 'gcc'
1784
+
1785
+ if flavor != 'win':
1786
+ master_ninja.rule(
1787
+ 'cc',
1788
+ description='CC $out',
1789
+ command=('$cc -MMD -MF $out.d $defines $includes $cflags $cflags_c '
1790
+ '$cflags_pch_c -c $in -o $out'),
1791
+ depfile='$out.d',
1792
+ deps=deps)
1793
+ master_ninja.rule(
1794
+ 'cc_s',
1795
+ description='CC $out',
1796
+ command=('$cc $defines $includes $cflags $cflags_c '
1797
+ '$cflags_pch_c -c $in -o $out'))
1798
+ master_ninja.rule(
1799
+ 'cxx',
1800
+ description='CXX $out',
1801
+ command=('$cxx -MMD -MF $out.d $defines $includes $cflags $cflags_cc '
1802
+ '$cflags_pch_cc -c $in -o $out'),
1803
+ depfile='$out.d',
1804
+ deps=deps)
1805
+ else:
1806
+ # TODO(scottmg) Separate pdb names is a test to see if it works around
1807
+ # http://crbug.com/142362. It seems there's a race between the creation of
1808
+ # the .pdb by the precompiled header step for .cc and the compilation of
1809
+ # .c files. This should be handled by mspdbsrv, but rarely errors out with
1810
+ # c1xx : fatal error C1033: cannot open program database
1811
+ # By making the rules target separate pdb files this might be avoided.
1812
+ cc_command = ('ninja -t msvc -e $arch ' +
1813
+ '-- '
1814
+ '$cc /nologo /showIncludes /FC '
1815
+ '@$out.rsp /c $in /Fo$out /Fd$pdbname_c ')
1816
+ cxx_command = ('ninja -t msvc -e $arch ' +
1817
+ '-- '
1818
+ '$cxx /nologo /showIncludes /FC '
1819
+ '@$out.rsp /c $in /Fo$out /Fd$pdbname_cc ')
1820
+ master_ninja.rule(
1821
+ 'cc',
1822
+ description='CC $out',
1823
+ command=cc_command,
1824
+ rspfile='$out.rsp',
1825
+ rspfile_content='$defines $includes $cflags $cflags_c',
1826
+ deps=deps)
1827
+ master_ninja.rule(
1828
+ 'cxx',
1829
+ description='CXX $out',
1830
+ command=cxx_command,
1831
+ rspfile='$out.rsp',
1832
+ rspfile_content='$defines $includes $cflags $cflags_cc',
1833
+ deps=deps)
1834
+ master_ninja.rule(
1835
+ 'idl',
1836
+ description='IDL $in',
1837
+ command=('%s gyp-win-tool midl-wrapper $arch $outdir '
1838
+ '$tlb $h $dlldata $iid $proxy $in '
1839
+ '$idlflags' % sys.executable))
1840
+ master_ninja.rule(
1841
+ 'rc',
1842
+ description='RC $in',
1843
+ # Note: $in must be last otherwise rc.exe complains.
1844
+ command=('%s gyp-win-tool rc-wrapper '
1845
+ '$arch $rc $defines $resource_includes $rcflags /fo$out $in' %
1846
+ sys.executable))
1847
+ master_ninja.rule(
1848
+ 'asm',
1849
+ description='ASM $in',
1850
+ command=('%s gyp-win-tool asm-wrapper '
1851
+ '$arch $asm $defines $includes /c /Fo $out $in' %
1852
+ sys.executable))
1853
+
1854
+ if flavor != 'mac' and flavor != 'win':
1855
+ master_ninja.rule(
1856
+ 'alink',
1857
+ description='AR $out',
1858
+ command='rm -f $out && $ar rcs $out $in')
1859
+ master_ninja.rule(
1860
+ 'alink_thin',
1861
+ description='AR $out',
1862
+ command='rm -f $out && $ar rcsT $out $in')
1863
+
1864
+ # This allows targets that only need to depend on $lib's API to declare an
1865
+ # order-only dependency on $lib.TOC and avoid relinking such downstream
1866
+ # dependencies when $lib changes only in non-public ways.
1867
+ # The resulting string leaves an uninterpolated %{suffix} which
1868
+ # is used in the final substitution below.
1869
+ mtime_preserving_solink_base = (
1870
+ 'if [ ! -e $lib -o ! -e $lib.TOC ]; then '
1871
+ '%(solink)s && %(extract_toc)s > $lib.TOC; else '
1872
+ '%(solink)s && %(extract_toc)s > $lib.tmp && '
1873
+ 'if ! cmp -s $lib.tmp $lib.TOC; then mv $lib.tmp $lib.TOC ; '
1874
+ 'fi; fi'
1875
+ % { 'solink':
1876
+ '$ld -shared $ldflags -o $lib -Wl,-soname=$soname %(suffix)s',
1877
+ 'extract_toc':
1878
+ ('{ readelf -d $lib | grep SONAME ; '
1879
+ 'nm -gD -f p $lib | cut -f1-2 -d\' \'; }')})
1880
+
1881
+ master_ninja.rule(
1882
+ 'solink',
1883
+ description='SOLINK $lib',
1884
+ restat=True,
1885
+ command=(mtime_preserving_solink_base % {
1886
+ 'suffix': '-Wl,--whole-archive $in $solibs -Wl,--no-whole-archive '
1887
+ '$libs'}),
1888
+ pool='link_pool')
1889
+ master_ninja.rule(
1890
+ 'solink_module',
1891
+ description='SOLINK(module) $lib',
1892
+ restat=True,
1893
+ command=(mtime_preserving_solink_base % {
1894
+ 'suffix': '-Wl,--start-group $in $solibs -Wl,--end-group '
1895
+ '$libs'}),
1896
+ pool='link_pool')
1897
+ master_ninja.rule(
1898
+ 'link',
1899
+ description='LINK $out',
1900
+ command=('$ld $ldflags -o $out '
1901
+ '-Wl,--start-group $in $solibs -Wl,--end-group $libs'),
1902
+ pool='link_pool')
1903
+ elif flavor == 'win':
1904
+ master_ninja.rule(
1905
+ 'alink',
1906
+ description='LIB $out',
1907
+ command=('%s gyp-win-tool link-wrapper $arch False '
1908
+ '$ar /nologo /ignore:4221 /OUT:$out @$out.rsp' %
1909
+ sys.executable),
1910
+ rspfile='$out.rsp',
1911
+ rspfile_content='$in_newline $libflags')
1912
+ _AddWinLinkRules(master_ninja, embed_manifest=True)
1913
+ _AddWinLinkRules(master_ninja, embed_manifest=False)
1914
+ else:
1915
+ master_ninja.rule(
1916
+ 'objc',
1917
+ description='OBJC $out',
1918
+ command=('$cc -MMD -MF $out.d $defines $includes $cflags $cflags_objc '
1919
+ '$cflags_pch_objc -c $in -o $out'),
1920
+ depfile='$out.d',
1921
+ deps=deps)
1922
+ master_ninja.rule(
1923
+ 'objcxx',
1924
+ description='OBJCXX $out',
1925
+ command=('$cxx -MMD -MF $out.d $defines $includes $cflags $cflags_objcc '
1926
+ '$cflags_pch_objcc -c $in -o $out'),
1927
+ depfile='$out.d',
1928
+ deps=deps)
1929
+ master_ninja.rule(
1930
+ 'alink',
1931
+ description='LIBTOOL-STATIC $out, POSTBUILDS',
1932
+ command='rm -f $out && '
1933
+ './gyp-mac-tool filter-libtool libtool $libtool_flags '
1934
+ '-static -o $out $in'
1935
+ '$postbuilds')
1936
+ master_ninja.rule(
1937
+ 'lipo',
1938
+ description='LIPO $out, POSTBUILDS',
1939
+ command='rm -f $out && lipo -create $in -output $out$postbuilds')
1940
+
1941
+ # Record the public interface of $lib in $lib.TOC. See the corresponding
1942
+ # comment in the posix section above for details.
1943
+ solink_base = '$ld %(type)s $ldflags -o $lib %(suffix)s'
1944
+ mtime_preserving_solink_base = (
1945
+ 'if [ ! -e $lib -o ! -e $lib.TOC ] || '
1946
+ # Always force dependent targets to relink if this library
1947
+ # reexports something. Handling this correctly would require
1948
+ # recursive TOC dumping but this is rare in practice, so punt.
1949
+ 'otool -l $lib | grep -q LC_REEXPORT_DYLIB ; then '
1950
+ '%(solink)s && %(extract_toc)s > $lib.TOC; '
1951
+ 'else '
1952
+ '%(solink)s && %(extract_toc)s > $lib.tmp && '
1953
+ 'if ! cmp -s $lib.tmp $lib.TOC; then '
1954
+ 'mv $lib.tmp $lib.TOC ; '
1955
+ 'fi; '
1956
+ 'fi'
1957
+ % { 'solink': solink_base,
1958
+ 'extract_toc':
1959
+ '{ otool -l $lib | grep LC_ID_DYLIB -A 5; '
1960
+ 'nm -gP $lib | cut -f1-2 -d\' \' | grep -v U$$; true; }'})
1961
+
1962
+ solink_suffix = '$in $solibs $libs$postbuilds'
1963
+ master_ninja.rule(
1964
+ 'solink',
1965
+ description='SOLINK $lib, POSTBUILDS',
1966
+ restat=True,
1967
+ command=mtime_preserving_solink_base % {'suffix': solink_suffix,
1968
+ 'type': '-shared'},
1969
+ pool='link_pool')
1970
+ master_ninja.rule(
1971
+ 'solink_notoc',
1972
+ description='SOLINK $lib, POSTBUILDS',
1973
+ restat=True,
1974
+ command=solink_base % {'suffix':solink_suffix, 'type': '-shared'},
1975
+ pool='link_pool')
1976
+
1977
+ solink_module_suffix = '$in $solibs $libs$postbuilds'
1978
+ master_ninja.rule(
1979
+ 'solink_module',
1980
+ description='SOLINK(module) $lib, POSTBUILDS',
1981
+ restat=True,
1982
+ command=mtime_preserving_solink_base % {'suffix': solink_module_suffix,
1983
+ 'type': '-bundle'},
1984
+ pool='link_pool')
1985
+ master_ninja.rule(
1986
+ 'solink_module_notoc',
1987
+ description='SOLINK(module) $lib, POSTBUILDS',
1988
+ restat=True,
1989
+ command=solink_base % {'suffix': solink_module_suffix, 'type': '-bundle'},
1990
+ pool='link_pool')
1991
+
1992
+ master_ninja.rule(
1993
+ 'link',
1994
+ description='LINK $out, POSTBUILDS',
1995
+ command=('$ld $ldflags -o $out '
1996
+ '$in $solibs $libs$postbuilds'),
1997
+ pool='link_pool')
1998
+ master_ninja.rule(
1999
+ 'preprocess_infoplist',
2000
+ description='PREPROCESS INFOPLIST $out',
2001
+ command=('$cc -E -P -Wno-trigraphs -x c $defines $in -o $out && '
2002
+ 'plutil -convert xml1 $out $out'))
2003
+ master_ninja.rule(
2004
+ 'copy_infoplist',
2005
+ description='COPY INFOPLIST $in',
2006
+ command='$env ./gyp-mac-tool copy-info-plist $in $out $keys')
2007
+ master_ninja.rule(
2008
+ 'mac_tool',
2009
+ description='MACTOOL $mactool_cmd $in',
2010
+ command='$env ./gyp-mac-tool $mactool_cmd $in $out')
2011
+ master_ninja.rule(
2012
+ 'package_framework',
2013
+ description='PACKAGE FRAMEWORK $out, POSTBUILDS',
2014
+ command='./gyp-mac-tool package-framework $out $version$postbuilds '
2015
+ '&& touch $out')
2016
+ if flavor == 'win':
2017
+ master_ninja.rule(
2018
+ 'stamp',
2019
+ description='STAMP $out',
2020
+ command='%s gyp-win-tool stamp $out' % sys.executable)
2021
+ master_ninja.rule(
2022
+ 'copy',
2023
+ description='COPY $in $out',
2024
+ command='%s gyp-win-tool recursive-mirror $in $out' % sys.executable)
2025
+ else:
2026
+ master_ninja.rule(
2027
+ 'stamp',
2028
+ description='STAMP $out',
2029
+ command='${postbuilds}touch $out')
2030
+ master_ninja.rule(
2031
+ 'copy',
2032
+ description='COPY $in $out',
2033
+ command='ln -f $in $out 2>/dev/null || (rm -rf $out && cp -af $in $out)')
2034
+ master_ninja.newline()
2035
+
2036
+ all_targets = set()
2037
+ for build_file in params['build_files']:
2038
+ for target in gyp.common.AllTargets(target_list,
2039
+ target_dicts,
2040
+ os.path.normpath(build_file)):
2041
+ all_targets.add(target)
2042
+ all_outputs = set()
2043
+
2044
+ # target_outputs is a map from qualified target name to a Target object.
2045
+ target_outputs = {}
2046
+ # target_short_names is a map from target short name to a list of Target
2047
+ # objects.
2048
+ target_short_names = {}
2049
+
2050
+ for qualified_target in target_list:
2051
+ # qualified_target is like: third_party/icu/icu.gyp:icui18n#target
2052
+ build_file, name, toolset = \
2053
+ gyp.common.ParseQualifiedTarget(qualified_target)
2054
+
2055
+ this_make_global_settings = data[build_file].get('make_global_settings', [])
2056
+ assert make_global_settings == this_make_global_settings, (
2057
+ "make_global_settings needs to be the same for all targets. %s vs. %s" %
2058
+ (this_make_global_settings, make_global_settings))
2059
+
2060
+ spec = target_dicts[qualified_target]
2061
+ if flavor == 'mac':
2062
+ gyp.xcode_emulation.MergeGlobalXcodeSettingsToSpec(data[build_file], spec)
2063
+
2064
+ build_file = gyp.common.RelativePath(build_file, options.toplevel_dir)
2065
+
2066
+ base_path = os.path.dirname(build_file)
2067
+ obj = 'obj'
2068
+ if toolset != 'target':
2069
+ obj += '.' + toolset
2070
+ output_file = os.path.join(obj, base_path, name + '.ninja')
2071
+
2072
+ ninja_output = StringIO()
2073
+ writer = NinjaWriter(qualified_target, target_outputs, base_path, build_dir,
2074
+ ninja_output,
2075
+ toplevel_build, output_file,
2076
+ flavor, toplevel_dir=options.toplevel_dir)
2077
+
2078
+ target = writer.WriteSpec(spec, config_name, generator_flags)
2079
+
2080
+ if ninja_output.tell() > 0:
2081
+ # Only create files for ninja files that actually have contents.
2082
+ with OpenOutput(os.path.join(toplevel_build, output_file)) as ninja_file:
2083
+ ninja_file.write(ninja_output.getvalue())
2084
+ ninja_output.close()
2085
+ master_ninja.subninja(output_file)
2086
+
2087
+ if target:
2088
+ if name != target.FinalOutput() and spec['toolset'] == 'target':
2089
+ target_short_names.setdefault(name, []).append(target)
2090
+ target_outputs[qualified_target] = target
2091
+ if qualified_target in all_targets:
2092
+ all_outputs.add(target.FinalOutput())
2093
+
2094
+ if target_short_names:
2095
+ # Write a short name to build this target. This benefits both the
2096
+ # "build chrome" case as well as the gyp tests, which expect to be
2097
+ # able to run actions and build libraries by their short name.
2098
+ master_ninja.newline()
2099
+ master_ninja.comment('Short names for targets.')
2100
+ for short_name in target_short_names:
2101
+ master_ninja.build(short_name, 'phony', [x.FinalOutput() for x in
2102
+ target_short_names[short_name]])
2103
+
2104
+ if all_outputs:
2105
+ master_ninja.newline()
2106
+ master_ninja.build('all', 'phony', list(all_outputs))
2107
+ master_ninja.default(generator_flags.get('default_target', 'all'))
2108
+
2109
+ master_ninja_file.close()
2110
+
2111
+
2112
+ def PerformBuild(data, configurations, params):
2113
+ options = params['options']
2114
+ for config in configurations:
2115
+ builddir = os.path.join(options.toplevel_dir, 'out', config)
2116
+ arguments = ['ninja', '-C', builddir]
2117
+ print 'Building [%s]: %s' % (config, arguments)
2118
+ subprocess.check_call(arguments)
2119
+
2120
+
2121
+ def CallGenerateOutputForConfig(arglist):
2122
+ # Ignore the interrupt signal so that the parent process catches it and
2123
+ # kills all multiprocessing children.
2124
+ signal.signal(signal.SIGINT, signal.SIG_IGN)
2125
+
2126
+ (target_list, target_dicts, data, params, config_name) = arglist
2127
+ GenerateOutputForConfig(target_list, target_dicts, data, params, config_name)
2128
+
2129
+
2130
+ def GenerateOutput(target_list, target_dicts, data, params):
2131
+ # Update target_dicts for iOS device builds.
2132
+ target_dicts = gyp.xcode_emulation.CloneConfigurationForDeviceAndEmulator(
2133
+ target_dicts)
2134
+
2135
+ user_config = params.get('generator_flags', {}).get('config', None)
2136
+ if gyp.common.GetFlavor(params) == 'win':
2137
+ target_list, target_dicts = MSVSUtil.ShardTargets(target_list, target_dicts)
2138
+ target_list, target_dicts = MSVSUtil.InsertLargePdbShims(
2139
+ target_list, target_dicts, generator_default_variables)
2140
+
2141
+ if user_config:
2142
+ GenerateOutputForConfig(target_list, target_dicts, data, params,
2143
+ user_config)
2144
+ else:
2145
+ config_names = target_dicts[target_list[0]]['configurations'].keys()
2146
+ if params['parallel']:
2147
+ try:
2148
+ pool = multiprocessing.Pool(len(config_names))
2149
+ arglists = []
2150
+ for config_name in config_names:
2151
+ arglists.append(
2152
+ (target_list, target_dicts, data, params, config_name))
2153
+ pool.map(CallGenerateOutputForConfig, arglists)
2154
+ except KeyboardInterrupt, e:
2155
+ pool.terminate()
2156
+ raise e
2157
+ else:
2158
+ for config_name in config_names:
2159
+ GenerateOutputForConfig(target_list, target_dicts, data, params,
2160
+ config_name)