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,56 @@
1
+ # Copyright (c) 2011 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
+ """gypsh output module
6
+
7
+ gypsh is a GYP shell. It's not really a generator per se. All it does is
8
+ fire up an interactive Python session with a few local variables set to the
9
+ variables passed to the generator. Like gypd, it's intended as a debugging
10
+ aid, to facilitate the exploration of .gyp structures after being processed
11
+ by the input module.
12
+
13
+ The expected usage is "gyp -f gypsh -D OS=desired_os".
14
+ """
15
+
16
+
17
+ import code
18
+ import sys
19
+
20
+
21
+ # All of this stuff about generator variables was lovingly ripped from gypd.py.
22
+ # That module has a much better description of what's going on and why.
23
+ _generator_identity_variables = [
24
+ 'EXECUTABLE_PREFIX',
25
+ 'EXECUTABLE_SUFFIX',
26
+ 'INTERMEDIATE_DIR',
27
+ 'PRODUCT_DIR',
28
+ 'RULE_INPUT_ROOT',
29
+ 'RULE_INPUT_DIRNAME',
30
+ 'RULE_INPUT_EXT',
31
+ 'RULE_INPUT_NAME',
32
+ 'RULE_INPUT_PATH',
33
+ 'SHARED_INTERMEDIATE_DIR',
34
+ ]
35
+
36
+ generator_default_variables = {
37
+ }
38
+
39
+ for v in _generator_identity_variables:
40
+ generator_default_variables[v] = '<(%s)' % v
41
+
42
+
43
+ def GenerateOutput(target_list, target_dicts, data, params):
44
+ locals = {
45
+ 'target_list': target_list,
46
+ 'target_dicts': target_dicts,
47
+ 'data': data,
48
+ }
49
+
50
+ # Use a banner that looks like the stock Python one and like what
51
+ # code.interact uses by default, but tack on something to indicate what
52
+ # locals are available, and identify gypsh.
53
+ banner='Python %s on %s\nlocals.keys() = %s\ngypsh' % \
54
+ (sys.version, sys.platform, repr(sorted(locals.keys())))
55
+
56
+ code.interact(banner, local=locals)
@@ -0,0 +1,2181 @@
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
+ # Notes:
6
+ #
7
+ # This is all roughly based on the Makefile system used by the Linux
8
+ # kernel, but is a non-recursive make -- we put the entire dependency
9
+ # graph in front of make and let it figure it out.
10
+ #
11
+ # The code below generates a separate .mk file for each target, but
12
+ # all are sourced by the top-level Makefile. This means that all
13
+ # variables in .mk-files clobber one another. Be careful to use :=
14
+ # where appropriate for immediate evaluation, and similarly to watch
15
+ # that you're not relying on a variable value to last beween different
16
+ # .mk files.
17
+ #
18
+ # TODOs:
19
+ #
20
+ # Global settings and utility functions are currently stuffed in the
21
+ # toplevel Makefile. It may make sense to generate some .mk files on
22
+ # the side to keep the the files readable.
23
+
24
+ import os
25
+ import re
26
+ import sys
27
+ import subprocess
28
+ import gyp
29
+ import gyp.common
30
+ import gyp.xcode_emulation
31
+ from gyp.common import GetEnvironFallback
32
+
33
+ generator_default_variables = {
34
+ 'EXECUTABLE_PREFIX': '',
35
+ 'EXECUTABLE_SUFFIX': '',
36
+ 'STATIC_LIB_PREFIX': 'lib',
37
+ 'SHARED_LIB_PREFIX': 'lib',
38
+ 'STATIC_LIB_SUFFIX': '.a',
39
+ 'INTERMEDIATE_DIR': '$(obj).$(TOOLSET)/$(TARGET)/geni',
40
+ 'SHARED_INTERMEDIATE_DIR': '$(obj)/gen',
41
+ 'PRODUCT_DIR': '$(builddir)',
42
+ 'RULE_INPUT_ROOT': '%(INPUT_ROOT)s', # This gets expanded by Python.
43
+ 'RULE_INPUT_DIRNAME': '%(INPUT_DIRNAME)s', # This gets expanded by Python.
44
+ 'RULE_INPUT_PATH': '$(abspath $<)',
45
+ 'RULE_INPUT_EXT': '$(suffix $<)',
46
+ 'RULE_INPUT_NAME': '$(notdir $<)',
47
+ 'CONFIGURATION_NAME': '$(BUILDTYPE)',
48
+ }
49
+
50
+ # Make supports multiple toolsets
51
+ generator_supports_multiple_toolsets = True
52
+
53
+ # Request sorted dependencies in the order from dependents to dependencies.
54
+ generator_wants_sorted_dependencies = False
55
+
56
+ # Placates pylint.
57
+ generator_additional_non_configuration_keys = []
58
+ generator_additional_path_sections = []
59
+ generator_extra_sources_for_rules = []
60
+ generator_filelist_paths = None
61
+
62
+
63
+ def CalculateVariables(default_variables, params):
64
+ """Calculate additional variables for use in the build (called by gyp)."""
65
+ flavor = gyp.common.GetFlavor(params)
66
+ if flavor == 'mac':
67
+ default_variables.setdefault('OS', 'mac')
68
+ default_variables.setdefault('SHARED_LIB_SUFFIX', '.dylib')
69
+ default_variables.setdefault('SHARED_LIB_DIR',
70
+ generator_default_variables['PRODUCT_DIR'])
71
+ default_variables.setdefault('LIB_DIR',
72
+ generator_default_variables['PRODUCT_DIR'])
73
+
74
+ # Copy additional generator configuration data from Xcode, which is shared
75
+ # by the Mac Make generator.
76
+ import gyp.generator.xcode as xcode_generator
77
+ global generator_additional_non_configuration_keys
78
+ generator_additional_non_configuration_keys = getattr(xcode_generator,
79
+ 'generator_additional_non_configuration_keys', [])
80
+ global generator_additional_path_sections
81
+ generator_additional_path_sections = getattr(xcode_generator,
82
+ 'generator_additional_path_sections', [])
83
+ global generator_extra_sources_for_rules
84
+ generator_extra_sources_for_rules = getattr(xcode_generator,
85
+ 'generator_extra_sources_for_rules', [])
86
+ COMPILABLE_EXTENSIONS.update({'.m': 'objc', '.mm' : 'objcxx'})
87
+ else:
88
+ operating_system = flavor
89
+ if flavor == 'android':
90
+ operating_system = 'linux' # Keep this legacy behavior for now.
91
+ default_variables.setdefault('OS', operating_system)
92
+ default_variables.setdefault('SHARED_LIB_SUFFIX', '.so')
93
+ default_variables.setdefault('SHARED_LIB_DIR','$(builddir)/lib.$(TOOLSET)')
94
+ default_variables.setdefault('LIB_DIR', '$(obj).$(TOOLSET)')
95
+
96
+
97
+ def CalculateGeneratorInputInfo(params):
98
+ """Calculate the generator specific info that gets fed to input (called by
99
+ gyp)."""
100
+ generator_flags = params.get('generator_flags', {})
101
+ android_ndk_version = generator_flags.get('android_ndk_version', None)
102
+ # Android NDK requires a strict link order.
103
+ if android_ndk_version:
104
+ global generator_wants_sorted_dependencies
105
+ generator_wants_sorted_dependencies = True
106
+
107
+ output_dir = params['options'].generator_output or \
108
+ params['options'].toplevel_dir
109
+ builddir_name = generator_flags.get('output_dir', 'out')
110
+ qualified_out_dir = os.path.normpath(os.path.join(
111
+ output_dir, builddir_name, 'gypfiles'))
112
+
113
+ global generator_filelist_paths
114
+ generator_filelist_paths = {
115
+ 'toplevel': params['options'].toplevel_dir,
116
+ 'qualified_out_dir': qualified_out_dir,
117
+ }
118
+
119
+
120
+ # The .d checking code below uses these functions:
121
+ # wildcard, sort, foreach, shell, wordlist
122
+ # wildcard can handle spaces, the rest can't.
123
+ # Since I could find no way to make foreach work with spaces in filenames
124
+ # correctly, the .d files have spaces replaced with another character. The .d
125
+ # file for
126
+ # Chromium\ Framework.framework/foo
127
+ # is for example
128
+ # out/Release/.deps/out/Release/Chromium?Framework.framework/foo
129
+ # This is the replacement character.
130
+ SPACE_REPLACEMENT = '?'
131
+
132
+
133
+ LINK_COMMANDS_LINUX = """\
134
+ quiet_cmd_alink = AR($(TOOLSET)) $@
135
+ cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
136
+
137
+ quiet_cmd_alink_thin = AR($(TOOLSET)) $@
138
+ cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
139
+
140
+ # Due to circular dependencies between libraries :(, we wrap the
141
+ # special "figure out circular dependencies" flags around the entire
142
+ # input list during linking.
143
+ quiet_cmd_link = LINK($(TOOLSET)) $@
144
+ cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
145
+
146
+ # We support two kinds of shared objects (.so):
147
+ # 1) shared_library, which is just bundling together many dependent libraries
148
+ # into a link line.
149
+ # 2) loadable_module, which is generating a module intended for dlopen().
150
+ #
151
+ # They differ only slightly:
152
+ # In the former case, we want to package all dependent code into the .so.
153
+ # In the latter case, we want to package just the API exposed by the
154
+ # outermost module.
155
+ # This means shared_library uses --whole-archive, while loadable_module doesn't.
156
+ # (Note that --whole-archive is incompatible with the --start-group used in
157
+ # normal linking.)
158
+
159
+ # Other shared-object link notes:
160
+ # - Set SONAME to the library filename so our binaries don't reference
161
+ # the local, absolute paths used on the link command-line.
162
+ quiet_cmd_solink = SOLINK($(TOOLSET)) $@
163
+ cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)
164
+
165
+ quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
166
+ cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
167
+ """
168
+
169
+ LINK_COMMANDS_MAC = """\
170
+ quiet_cmd_alink = LIBTOOL-STATIC $@
171
+ cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^)
172
+
173
+ quiet_cmd_link = LINK($(TOOLSET)) $@
174
+ cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
175
+
176
+ quiet_cmd_solink = SOLINK($(TOOLSET)) $@
177
+ cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
178
+
179
+ quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
180
+ cmd_solink_module = $(LINK.$(TOOLSET)) -bundle $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS)
181
+ """
182
+
183
+ LINK_COMMANDS_ANDROID = """\
184
+ quiet_cmd_alink = AR($(TOOLSET)) $@
185
+ cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
186
+
187
+ quiet_cmd_alink_thin = AR($(TOOLSET)) $@
188
+ cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
189
+
190
+ # Due to circular dependencies between libraries :(, we wrap the
191
+ # special "figure out circular dependencies" flags around the entire
192
+ # input list during linking.
193
+ quiet_cmd_link = LINK($(TOOLSET)) $@
194
+ quiet_cmd_link_host = LINK($(TOOLSET)) $@
195
+ cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
196
+ cmd_link_host = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS)
197
+
198
+ # Other shared-object link notes:
199
+ # - Set SONAME to the library filename so our binaries don't reference
200
+ # the local, absolute paths used on the link command-line.
201
+ quiet_cmd_solink = SOLINK($(TOOLSET)) $@
202
+ cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)
203
+
204
+ quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
205
+ cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
206
+ quiet_cmd_solink_module_host = SOLINK_MODULE($(TOOLSET)) $@
207
+ cmd_solink_module_host = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS)
208
+ """
209
+
210
+
211
+ LINK_COMMANDS_AIX = """\
212
+ quiet_cmd_alink = AR($(TOOLSET)) $@
213
+ cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
214
+
215
+ quiet_cmd_alink_thin = AR($(TOOLSET)) $@
216
+ cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
217
+
218
+ quiet_cmd_link = LINK($(TOOLSET)) $@
219
+ cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS)
220
+
221
+ quiet_cmd_solink = SOLINK($(TOOLSET)) $@
222
+ cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS)
223
+
224
+ quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
225
+ cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS)
226
+ """
227
+
228
+
229
+ # Header of toplevel Makefile.
230
+ # This should go into the build tree, but it's easier to keep it here for now.
231
+ SHARED_HEADER = ("""\
232
+ # We borrow heavily from the kernel build setup, though we are simpler since
233
+ # we don't have Kconfig tweaking settings on us.
234
+
235
+ # The implicit make rules have it looking for RCS files, among other things.
236
+ # We instead explicitly write all the rules we care about.
237
+ # It's even quicker (saves ~200ms) to pass -r on the command line.
238
+ MAKEFLAGS=-r
239
+
240
+ # The source directory tree.
241
+ srcdir := %(srcdir)s
242
+ abs_srcdir := $(abspath $(srcdir))
243
+
244
+ # The name of the builddir.
245
+ builddir_name ?= %(builddir)s
246
+
247
+ # The V=1 flag on command line makes us verbosely print command lines.
248
+ ifdef V
249
+ quiet=
250
+ else
251
+ quiet=quiet_
252
+ endif
253
+
254
+ # Specify BUILDTYPE=Release on the command line for a release build.
255
+ BUILDTYPE ?= %(default_configuration)s
256
+
257
+ # Directory all our build output goes into.
258
+ # Note that this must be two directories beneath src/ for unit tests to pass,
259
+ # as they reach into the src/ directory for data with relative paths.
260
+ builddir ?= $(builddir_name)/$(BUILDTYPE)
261
+ abs_builddir := $(abspath $(builddir))
262
+ depsdir := $(builddir)/.deps
263
+
264
+ # Object output directory.
265
+ obj := $(builddir)/obj
266
+ abs_obj := $(abspath $(obj))
267
+
268
+ # We build up a list of every single one of the targets so we can slurp in the
269
+ # generated dependency rule Makefiles in one pass.
270
+ all_deps :=
271
+
272
+ %(make_global_settings)s
273
+
274
+ CC.target ?= %(CC.target)s
275
+ CFLAGS.target ?= $(CFLAGS)
276
+ CXX.target ?= %(CXX.target)s
277
+ CXXFLAGS.target ?= $(CXXFLAGS)
278
+ LINK.target ?= %(LINK.target)s
279
+ LDFLAGS.target ?= $(LDFLAGS)
280
+ AR.target ?= $(AR)
281
+
282
+ # C++ apps need to be linked with g++.
283
+ #
284
+ # Note: flock is used to seralize linking. Linking is a memory-intensive
285
+ # process so running parallel links can often lead to thrashing. To disable
286
+ # the serialization, override LINK via an envrionment variable as follows:
287
+ #
288
+ # export LINK=g++
289
+ #
290
+ # This will allow make to invoke N linker processes as specified in -jN.
291
+ LINK ?= %(flock)s $(builddir)/linker.lock $(CXX.target)
292
+
293
+ # TODO(evan): move all cross-compilation logic to gyp-time so we don't need
294
+ # to replicate this environment fallback in make as well.
295
+ CC.host ?= %(CC.host)s
296
+ CFLAGS.host ?=
297
+ CXX.host ?= %(CXX.host)s
298
+ CXXFLAGS.host ?=
299
+ LINK.host ?= %(LINK.host)s
300
+ LDFLAGS.host ?=
301
+ AR.host ?= %(AR.host)s
302
+
303
+ # Define a dir function that can handle spaces.
304
+ # http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
305
+ # "leading spaces cannot appear in the text of the first argument as written.
306
+ # These characters can be put into the argument value by variable substitution."
307
+ empty :=
308
+ space := $(empty) $(empty)
309
+
310
+ # http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces
311
+ replace_spaces = $(subst $(space),""" + SPACE_REPLACEMENT + """,$1)
312
+ unreplace_spaces = $(subst """ + SPACE_REPLACEMENT + """,$(space),$1)
313
+ dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))
314
+
315
+ # Flags to make gcc output dependency info. Note that you need to be
316
+ # careful here to use the flags that ccache and distcc can understand.
317
+ # We write to a dep file on the side first and then rename at the end
318
+ # so we can't end up with a broken dep file.
319
+ depfile = $(depsdir)/$(call replace_spaces,$@).d
320
+ DEPFLAGS = -MMD -MF $(depfile).raw
321
+
322
+ # We have to fixup the deps output in a few ways.
323
+ # (1) the file output should mention the proper .o file.
324
+ # ccache or distcc lose the path to the target, so we convert a rule of
325
+ # the form:
326
+ # foobar.o: DEP1 DEP2
327
+ # into
328
+ # path/to/foobar.o: DEP1 DEP2
329
+ # (2) we want missing files not to cause us to fail to build.
330
+ # We want to rewrite
331
+ # foobar.o: DEP1 DEP2 \\
332
+ # DEP3
333
+ # to
334
+ # DEP1:
335
+ # DEP2:
336
+ # DEP3:
337
+ # so if the files are missing, they're just considered phony rules.
338
+ # We have to do some pretty insane escaping to get those backslashes
339
+ # and dollar signs past make, the shell, and sed at the same time.
340
+ # Doesn't work with spaces, but that's fine: .d files have spaces in
341
+ # their names replaced with other characters."""
342
+ r"""
343
+ define fixup_dep
344
+ # The depfile may not exist if the input file didn't have any #includes.
345
+ touch $(depfile).raw
346
+ # Fixup path as in (1).
347
+ sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
348
+ # Add extra rules as in (2).
349
+ # We remove slashes and replace spaces with new lines;
350
+ # remove blank lines;
351
+ # delete the first line and append a colon to the remaining lines.
352
+ sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
353
+ grep -v '^$$' |\
354
+ sed -e 1d -e 's|$$|:|' \
355
+ >> $(depfile)
356
+ rm $(depfile).raw
357
+ endef
358
+ """
359
+ """
360
+ # Command definitions:
361
+ # - cmd_foo is the actual command to run;
362
+ # - quiet_cmd_foo is the brief-output summary of the command.
363
+
364
+ quiet_cmd_cc = CC($(TOOLSET)) $@
365
+ cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $<
366
+
367
+ quiet_cmd_cxx = CXX($(TOOLSET)) $@
368
+ cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
369
+ %(extra_commands)s
370
+ quiet_cmd_touch = TOUCH $@
371
+ cmd_touch = touch $@
372
+
373
+ quiet_cmd_copy = COPY $@
374
+ # send stderr to /dev/null to ignore messages when linking directories.
375
+ cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@")
376
+
377
+ %(link_commands)s
378
+ """
379
+
380
+ r"""
381
+ # Define an escape_quotes function to escape single quotes.
382
+ # This allows us to handle quotes properly as long as we always use
383
+ # use single quotes and escape_quotes.
384
+ escape_quotes = $(subst ','\'',$(1))
385
+ # This comment is here just to include a ' to unconfuse syntax highlighting.
386
+ # Define an escape_vars function to escape '$' variable syntax.
387
+ # This allows us to read/write command lines with shell variables (e.g.
388
+ # $LD_LIBRARY_PATH), without triggering make substitution.
389
+ escape_vars = $(subst $$,$$$$,$(1))
390
+ # Helper that expands to a shell command to echo a string exactly as it is in
391
+ # make. This uses printf instead of echo because printf's behaviour with respect
392
+ # to escape sequences is more portable than echo's across different shells
393
+ # (e.g., dash, bash).
394
+ exact_echo = printf '%%s\n' '$(call escape_quotes,$(1))'
395
+ """
396
+ """
397
+ # Helper to compare the command we're about to run against the command
398
+ # we logged the last time we ran the command. Produces an empty
399
+ # string (false) when the commands match.
400
+ # Tricky point: Make has no string-equality test function.
401
+ # The kernel uses the following, but it seems like it would have false
402
+ # positives, where one string reordered its arguments.
403
+ # arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \\
404
+ # $(filter-out $(cmd_$@), $(cmd_$(1))))
405
+ # We instead substitute each for the empty string into the other, and
406
+ # say they're equal if both substitutions produce the empty string.
407
+ # .d files contain """ + SPACE_REPLACEMENT + \
408
+ """ instead of spaces, take that into account.
409
+ command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\\
410
+ $(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1))))
411
+
412
+ # Helper that is non-empty when a prerequisite changes.
413
+ # Normally make does this implicitly, but we force rules to always run
414
+ # so we can check their command lines.
415
+ # $? -- new prerequisites
416
+ # $| -- order-only dependencies
417
+ prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?))
418
+
419
+ # Helper that executes all postbuilds until one fails.
420
+ define do_postbuilds
421
+ @E=0;\\
422
+ for p in $(POSTBUILDS); do\\
423
+ eval $$p;\\
424
+ E=$$?;\\
425
+ if [ $$E -ne 0 ]; then\\
426
+ break;\\
427
+ fi;\\
428
+ done;\\
429
+ if [ $$E -ne 0 ]; then\\
430
+ rm -rf "$@";\\
431
+ exit $$E;\\
432
+ fi
433
+ endef
434
+
435
+ # do_cmd: run a command via the above cmd_foo names, if necessary.
436
+ # Should always run for a given target to handle command-line changes.
437
+ # Second argument, if non-zero, makes it do asm/C/C++ dependency munging.
438
+ # Third argument, if non-zero, makes it do POSTBUILDS processing.
439
+ # Note: We intentionally do NOT call dirx for depfile, since it contains """ + \
440
+ SPACE_REPLACEMENT + """ for
441
+ # spaces already and dirx strips the """ + SPACE_REPLACEMENT + \
442
+ """ characters.
443
+ define do_cmd
444
+ $(if $(or $(command_changed),$(prereq_changed)),
445
+ @$(call exact_echo, $($(quiet)cmd_$(1)))
446
+ @mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
447
+ $(if $(findstring flock,$(word %(flock_index)d,$(cmd_$1))),
448
+ @$(cmd_$(1))
449
+ @echo " $(quiet_cmd_$(1)): Finished",
450
+ @$(cmd_$(1))
451
+ )
452
+ @$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile)
453
+ @$(if $(2),$(fixup_dep))
454
+ $(if $(and $(3), $(POSTBUILDS)),
455
+ $(call do_postbuilds)
456
+ )
457
+ )
458
+ endef
459
+
460
+ # Declare the "%(default_target)s" target first so it is the default,
461
+ # even though we don't have the deps yet.
462
+ .PHONY: %(default_target)s
463
+ %(default_target)s:
464
+
465
+ # make looks for ways to re-generate included makefiles, but in our case, we
466
+ # don't have a direct way. Explicitly telling make that it has nothing to do
467
+ # for them makes it go faster.
468
+ %%.d: ;
469
+
470
+ # Use FORCE_DO_CMD to force a target to run. Should be coupled with
471
+ # do_cmd.
472
+ .PHONY: FORCE_DO_CMD
473
+ FORCE_DO_CMD:
474
+
475
+ """)
476
+
477
+ SHARED_HEADER_MAC_COMMANDS = """
478
+ quiet_cmd_objc = CXX($(TOOLSET)) $@
479
+ cmd_objc = $(CC.$(TOOLSET)) $(GYP_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $<
480
+
481
+ quiet_cmd_objcxx = CXX($(TOOLSET)) $@
482
+ cmd_objcxx = $(CXX.$(TOOLSET)) $(GYP_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $<
483
+
484
+ # Commands for precompiled header files.
485
+ quiet_cmd_pch_c = CXX($(TOOLSET)) $@
486
+ cmd_pch_c = $(CC.$(TOOLSET)) $(GYP_PCH_CFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
487
+ quiet_cmd_pch_cc = CXX($(TOOLSET)) $@
488
+ cmd_pch_cc = $(CC.$(TOOLSET)) $(GYP_PCH_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
489
+ quiet_cmd_pch_m = CXX($(TOOLSET)) $@
490
+ cmd_pch_m = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $<
491
+ quiet_cmd_pch_mm = CXX($(TOOLSET)) $@
492
+ cmd_pch_mm = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $<
493
+
494
+ # gyp-mac-tool is written next to the root Makefile by gyp.
495
+ # Use $(4) for the command, since $(2) and $(3) are used as flag by do_cmd
496
+ # already.
497
+ quiet_cmd_mac_tool = MACTOOL $(4) $<
498
+ cmd_mac_tool = ./gyp-mac-tool $(4) $< "$@"
499
+
500
+ quiet_cmd_mac_package_framework = PACKAGE FRAMEWORK $@
501
+ cmd_mac_package_framework = ./gyp-mac-tool package-framework "$@" $(4)
502
+
503
+ quiet_cmd_infoplist = INFOPLIST $@
504
+ cmd_infoplist = $(CC.$(TOOLSET)) -E -P -Wno-trigraphs -x c $(INFOPLIST_DEFINES) "$<" -o "$@"
505
+ """
506
+
507
+
508
+ def WriteRootHeaderSuffixRules(writer):
509
+ extensions = sorted(COMPILABLE_EXTENSIONS.keys(), key=str.lower)
510
+
511
+ writer.write('# Suffix rules, putting all outputs into $(obj).\n')
512
+ for ext in extensions:
513
+ writer.write('$(obj).$(TOOLSET)/%%.o: $(srcdir)/%%%s FORCE_DO_CMD\n' % ext)
514
+ writer.write('\t@$(call do_cmd,%s,1)\n' % COMPILABLE_EXTENSIONS[ext])
515
+
516
+ writer.write('\n# Try building from generated source, too.\n')
517
+ for ext in extensions:
518
+ writer.write(
519
+ '$(obj).$(TOOLSET)/%%.o: $(obj).$(TOOLSET)/%%%s FORCE_DO_CMD\n' % ext)
520
+ writer.write('\t@$(call do_cmd,%s,1)\n' % COMPILABLE_EXTENSIONS[ext])
521
+ writer.write('\n')
522
+ for ext in extensions:
523
+ writer.write('$(obj).$(TOOLSET)/%%.o: $(obj)/%%%s FORCE_DO_CMD\n' % ext)
524
+ writer.write('\t@$(call do_cmd,%s,1)\n' % COMPILABLE_EXTENSIONS[ext])
525
+ writer.write('\n')
526
+
527
+
528
+ SHARED_HEADER_SUFFIX_RULES_COMMENT1 = ("""\
529
+ # Suffix rules, putting all outputs into $(obj).
530
+ """)
531
+
532
+
533
+ SHARED_HEADER_SUFFIX_RULES_COMMENT2 = ("""\
534
+ # Try building from generated source, too.
535
+ """)
536
+
537
+
538
+ SHARED_FOOTER = """\
539
+ # "all" is a concatenation of the "all" targets from all the included
540
+ # sub-makefiles. This is just here to clarify.
541
+ all:
542
+
543
+ # Add in dependency-tracking rules. $(all_deps) is the list of every single
544
+ # target in our tree. Only consider the ones with .d (dependency) info:
545
+ d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d))
546
+ ifneq ($(d_files),)
547
+ include $(d_files)
548
+ endif
549
+ """
550
+
551
+ header = """\
552
+ # This file is generated by gyp; do not edit.
553
+
554
+ """
555
+
556
+ # Maps every compilable file extension to the do_cmd that compiles it.
557
+ COMPILABLE_EXTENSIONS = {
558
+ '.c': 'cc',
559
+ '.cc': 'cxx',
560
+ '.cpp': 'cxx',
561
+ '.cxx': 'cxx',
562
+ '.s': 'cc',
563
+ '.S': 'cc',
564
+ }
565
+
566
+ def Compilable(filename):
567
+ """Return true if the file is compilable (should be in OBJS)."""
568
+ for res in (filename.endswith(e) for e in COMPILABLE_EXTENSIONS):
569
+ if res:
570
+ return True
571
+ return False
572
+
573
+
574
+ def Linkable(filename):
575
+ """Return true if the file is linkable (should be on the link line)."""
576
+ return filename.endswith('.o')
577
+
578
+
579
+ def Target(filename):
580
+ """Translate a compilable filename to its .o target."""
581
+ return os.path.splitext(filename)[0] + '.o'
582
+
583
+
584
+ def EscapeShellArgument(s):
585
+ """Quotes an argument so that it will be interpreted literally by a POSIX
586
+ shell. Taken from
587
+ http://stackoverflow.com/questions/35817/whats-the-best-way-to-escape-ossystem-calls-in-python
588
+ """
589
+ return "'" + s.replace("'", "'\\''") + "'"
590
+
591
+
592
+ def EscapeMakeVariableExpansion(s):
593
+ """Make has its own variable expansion syntax using $. We must escape it for
594
+ string to be interpreted literally."""
595
+ return s.replace('$', '$$')
596
+
597
+
598
+ def EscapeCppDefine(s):
599
+ """Escapes a CPP define so that it will reach the compiler unaltered."""
600
+ s = EscapeShellArgument(s)
601
+ s = EscapeMakeVariableExpansion(s)
602
+ # '#' characters must be escaped even embedded in a string, else Make will
603
+ # treat it as the start of a comment.
604
+ return s.replace('#', r'\#')
605
+
606
+
607
+ def QuoteIfNecessary(string):
608
+ """TODO: Should this ideally be replaced with one or more of the above
609
+ functions?"""
610
+ if '"' in string:
611
+ string = '"' + string.replace('"', '\\"') + '"'
612
+ return string
613
+
614
+
615
+ def StringToMakefileVariable(string):
616
+ """Convert a string to a value that is acceptable as a make variable name."""
617
+ return re.sub('[^a-zA-Z0-9_]', '_', string)
618
+
619
+
620
+ srcdir_prefix = ''
621
+ def Sourceify(path):
622
+ """Convert a path to its source directory form."""
623
+ if '$(' in path:
624
+ return path
625
+ if os.path.isabs(path):
626
+ return path
627
+ return srcdir_prefix + path
628
+
629
+
630
+ def QuoteSpaces(s, quote=r'\ '):
631
+ return s.replace(' ', quote)
632
+
633
+
634
+ # Map from qualified target to path to output.
635
+ target_outputs = {}
636
+ # Map from qualified target to any linkable output. A subset
637
+ # of target_outputs. E.g. when mybinary depends on liba, we want to
638
+ # include liba in the linker line; when otherbinary depends on
639
+ # mybinary, we just want to build mybinary first.
640
+ target_link_deps = {}
641
+
642
+
643
+ class MakefileWriter:
644
+ """MakefileWriter packages up the writing of one target-specific foobar.mk.
645
+
646
+ Its only real entry point is Write(), and is mostly used for namespacing.
647
+ """
648
+
649
+ def __init__(self, generator_flags, flavor):
650
+ self.generator_flags = generator_flags
651
+ self.flavor = flavor
652
+
653
+ self.suffix_rules_srcdir = {}
654
+ self.suffix_rules_objdir1 = {}
655
+ self.suffix_rules_objdir2 = {}
656
+
657
+ # Generate suffix rules for all compilable extensions.
658
+ for ext in COMPILABLE_EXTENSIONS.keys():
659
+ # Suffix rules for source folder.
660
+ self.suffix_rules_srcdir.update({ext: ("""\
661
+ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(srcdir)/%%%s FORCE_DO_CMD
662
+ @$(call do_cmd,%s,1)
663
+ """ % (ext, COMPILABLE_EXTENSIONS[ext]))})
664
+
665
+ # Suffix rules for generated source files.
666
+ self.suffix_rules_objdir1.update({ext: ("""\
667
+ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj).$(TOOLSET)/%%%s FORCE_DO_CMD
668
+ @$(call do_cmd,%s,1)
669
+ """ % (ext, COMPILABLE_EXTENSIONS[ext]))})
670
+ self.suffix_rules_objdir2.update({ext: ("""\
671
+ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
672
+ @$(call do_cmd,%s,1)
673
+ """ % (ext, COMPILABLE_EXTENSIONS[ext]))})
674
+
675
+
676
+ def Write(self, qualified_target, base_path, output_filename, spec, configs,
677
+ part_of_all):
678
+ """The main entry point: writes a .mk file for a single target.
679
+
680
+ Arguments:
681
+ qualified_target: target we're generating
682
+ base_path: path relative to source root we're building in, used to resolve
683
+ target-relative paths
684
+ output_filename: output .mk file name to write
685
+ spec, configs: gyp info
686
+ part_of_all: flag indicating this target is part of 'all'
687
+ """
688
+ gyp.common.EnsureDirExists(output_filename)
689
+
690
+ self.fp = open(output_filename, 'w')
691
+
692
+ self.fp.write(header)
693
+
694
+ self.qualified_target = qualified_target
695
+ self.path = base_path
696
+ self.target = spec['target_name']
697
+ self.type = spec['type']
698
+ self.toolset = spec['toolset']
699
+
700
+ self.is_mac_bundle = gyp.xcode_emulation.IsMacBundle(self.flavor, spec)
701
+ if self.flavor == 'mac':
702
+ self.xcode_settings = gyp.xcode_emulation.XcodeSettings(spec)
703
+ else:
704
+ self.xcode_settings = None
705
+
706
+ deps, link_deps = self.ComputeDeps(spec)
707
+
708
+ # Some of the generation below can add extra output, sources, or
709
+ # link dependencies. All of the out params of the functions that
710
+ # follow use names like extra_foo.
711
+ extra_outputs = []
712
+ extra_sources = []
713
+ extra_link_deps = []
714
+ extra_mac_bundle_resources = []
715
+ mac_bundle_deps = []
716
+
717
+ if self.is_mac_bundle:
718
+ self.output = self.ComputeMacBundleOutput(spec)
719
+ self.output_binary = self.ComputeMacBundleBinaryOutput(spec)
720
+ else:
721
+ self.output = self.output_binary = self.ComputeOutput(spec)
722
+
723
+ self.is_standalone_static_library = bool(
724
+ spec.get('standalone_static_library', 0))
725
+ self._INSTALLABLE_TARGETS = ('executable', 'loadable_module',
726
+ 'shared_library')
727
+ if (self.is_standalone_static_library or
728
+ self.type in self._INSTALLABLE_TARGETS):
729
+ self.alias = os.path.basename(self.output)
730
+ install_path = self._InstallableTargetInstallPath()
731
+ else:
732
+ self.alias = self.output
733
+ install_path = self.output
734
+
735
+ self.WriteLn("TOOLSET := " + self.toolset)
736
+ self.WriteLn("TARGET := " + self.target)
737
+
738
+ # Actions must come first, since they can generate more OBJs for use below.
739
+ if 'actions' in spec:
740
+ self.WriteActions(spec['actions'], extra_sources, extra_outputs,
741
+ extra_mac_bundle_resources, part_of_all)
742
+
743
+ # Rules must be early like actions.
744
+ if 'rules' in spec:
745
+ self.WriteRules(spec['rules'], extra_sources, extra_outputs,
746
+ extra_mac_bundle_resources, part_of_all)
747
+
748
+ if 'copies' in spec:
749
+ self.WriteCopies(spec['copies'], extra_outputs, part_of_all)
750
+
751
+ # Bundle resources.
752
+ if self.is_mac_bundle:
753
+ all_mac_bundle_resources = (
754
+ spec.get('mac_bundle_resources', []) + extra_mac_bundle_resources)
755
+ self.WriteMacBundleResources(all_mac_bundle_resources, mac_bundle_deps)
756
+ self.WriteMacInfoPlist(mac_bundle_deps)
757
+
758
+ # Sources.
759
+ all_sources = spec.get('sources', []) + extra_sources
760
+ if all_sources:
761
+ self.WriteSources(
762
+ configs, deps, all_sources, extra_outputs,
763
+ extra_link_deps, part_of_all,
764
+ gyp.xcode_emulation.MacPrefixHeader(
765
+ self.xcode_settings, lambda p: Sourceify(self.Absolutify(p)),
766
+ self.Pchify))
767
+ sources = filter(Compilable, all_sources)
768
+ if sources:
769
+ self.WriteLn(SHARED_HEADER_SUFFIX_RULES_COMMENT1)
770
+ extensions = set([os.path.splitext(s)[1] for s in sources])
771
+ for ext in extensions:
772
+ if ext in self.suffix_rules_srcdir:
773
+ self.WriteLn(self.suffix_rules_srcdir[ext])
774
+ self.WriteLn(SHARED_HEADER_SUFFIX_RULES_COMMENT2)
775
+ for ext in extensions:
776
+ if ext in self.suffix_rules_objdir1:
777
+ self.WriteLn(self.suffix_rules_objdir1[ext])
778
+ for ext in extensions:
779
+ if ext in self.suffix_rules_objdir2:
780
+ self.WriteLn(self.suffix_rules_objdir2[ext])
781
+ self.WriteLn('# End of this set of suffix rules')
782
+
783
+ # Add dependency from bundle to bundle binary.
784
+ if self.is_mac_bundle:
785
+ mac_bundle_deps.append(self.output_binary)
786
+
787
+ self.WriteTarget(spec, configs, deps, extra_link_deps + link_deps,
788
+ mac_bundle_deps, extra_outputs, part_of_all)
789
+
790
+ # Update global list of target outputs, used in dependency tracking.
791
+ target_outputs[qualified_target] = install_path
792
+
793
+ # Update global list of link dependencies.
794
+ if self.type in ('static_library', 'shared_library'):
795
+ target_link_deps[qualified_target] = self.output_binary
796
+
797
+ # Currently any versions have the same effect, but in future the behavior
798
+ # could be different.
799
+ if self.generator_flags.get('android_ndk_version', None):
800
+ self.WriteAndroidNdkModuleRule(self.target, all_sources, link_deps)
801
+
802
+ self.fp.close()
803
+
804
+
805
+ def WriteSubMake(self, output_filename, makefile_path, targets, build_dir):
806
+ """Write a "sub-project" Makefile.
807
+
808
+ This is a small, wrapper Makefile that calls the top-level Makefile to build
809
+ the targets from a single gyp file (i.e. a sub-project).
810
+
811
+ Arguments:
812
+ output_filename: sub-project Makefile name to write
813
+ makefile_path: path to the top-level Makefile
814
+ targets: list of "all" targets for this sub-project
815
+ build_dir: build output directory, relative to the sub-project
816
+ """
817
+ gyp.common.EnsureDirExists(output_filename)
818
+ self.fp = open(output_filename, 'w')
819
+ self.fp.write(header)
820
+ # For consistency with other builders, put sub-project build output in the
821
+ # sub-project dir (see test/subdirectory/gyptest-subdir-all.py).
822
+ self.WriteLn('export builddir_name ?= %s' %
823
+ os.path.join(os.path.dirname(output_filename), build_dir))
824
+ self.WriteLn('.PHONY: all')
825
+ self.WriteLn('all:')
826
+ if makefile_path:
827
+ makefile_path = ' -C ' + makefile_path
828
+ self.WriteLn('\t$(MAKE)%s %s' % (makefile_path, ' '.join(targets)))
829
+ self.fp.close()
830
+
831
+
832
+ def WriteActions(self, actions, extra_sources, extra_outputs,
833
+ extra_mac_bundle_resources, part_of_all):
834
+ """Write Makefile code for any 'actions' from the gyp input.
835
+
836
+ extra_sources: a list that will be filled in with newly generated source
837
+ files, if any
838
+ extra_outputs: a list that will be filled in with any outputs of these
839
+ actions (used to make other pieces dependent on these
840
+ actions)
841
+ part_of_all: flag indicating this target is part of 'all'
842
+ """
843
+ env = self.GetSortedXcodeEnv()
844
+ for action in actions:
845
+ name = StringToMakefileVariable('%s_%s' % (self.qualified_target,
846
+ action['action_name']))
847
+ self.WriteLn('### Rules for action "%s":' % action['action_name'])
848
+ inputs = action['inputs']
849
+ outputs = action['outputs']
850
+
851
+ # Build up a list of outputs.
852
+ # Collect the output dirs we'll need.
853
+ dirs = set()
854
+ for out in outputs:
855
+ dir = os.path.split(out)[0]
856
+ if dir:
857
+ dirs.add(dir)
858
+ if int(action.get('process_outputs_as_sources', False)):
859
+ extra_sources += outputs
860
+ if int(action.get('process_outputs_as_mac_bundle_resources', False)):
861
+ extra_mac_bundle_resources += outputs
862
+
863
+ # Write the actual command.
864
+ action_commands = action['action']
865
+ if self.flavor == 'mac':
866
+ action_commands = [gyp.xcode_emulation.ExpandEnvVars(command, env)
867
+ for command in action_commands]
868
+ command = gyp.common.EncodePOSIXShellList(action_commands)
869
+ if 'message' in action:
870
+ self.WriteLn('quiet_cmd_%s = ACTION %s $@' % (name, action['message']))
871
+ else:
872
+ self.WriteLn('quiet_cmd_%s = ACTION %s $@' % (name, name))
873
+ if len(dirs) > 0:
874
+ command = 'mkdir -p %s' % ' '.join(dirs) + '; ' + command
875
+
876
+ cd_action = 'cd %s; ' % Sourceify(self.path or '.')
877
+
878
+ # command and cd_action get written to a toplevel variable called
879
+ # cmd_foo. Toplevel variables can't handle things that change per
880
+ # makefile like $(TARGET), so hardcode the target.
881
+ command = command.replace('$(TARGET)', self.target)
882
+ cd_action = cd_action.replace('$(TARGET)', self.target)
883
+
884
+ # Set LD_LIBRARY_PATH in case the action runs an executable from this
885
+ # build which links to shared libs from this build.
886
+ # actions run on the host, so they should in theory only use host
887
+ # libraries, but until everything is made cross-compile safe, also use
888
+ # target libraries.
889
+ # TODO(piman): when everything is cross-compile safe, remove lib.target
890
+ self.WriteLn('cmd_%s = LD_LIBRARY_PATH=$(builddir)/lib.host:'
891
+ '$(builddir)/lib.target:$$LD_LIBRARY_PATH; '
892
+ 'export LD_LIBRARY_PATH; '
893
+ '%s%s'
894
+ % (name, cd_action, command))
895
+ self.WriteLn()
896
+ outputs = map(self.Absolutify, outputs)
897
+ # The makefile rules are all relative to the top dir, but the gyp actions
898
+ # are defined relative to their containing dir. This replaces the obj
899
+ # variable for the action rule with an absolute version so that the output
900
+ # goes in the right place.
901
+ # Only write the 'obj' and 'builddir' rules for the "primary" output (:1);
902
+ # it's superfluous for the "extra outputs", and this avoids accidentally
903
+ # writing duplicate dummy rules for those outputs.
904
+ # Same for environment.
905
+ self.WriteLn("%s: obj := $(abs_obj)" % QuoteSpaces(outputs[0]))
906
+ self.WriteLn("%s: builddir := $(abs_builddir)" % QuoteSpaces(outputs[0]))
907
+ self.WriteSortedXcodeEnv(outputs[0], self.GetSortedXcodeEnv())
908
+
909
+ for input in inputs:
910
+ assert ' ' not in input, (
911
+ "Spaces in action input filenames not supported (%s)" % input)
912
+ for output in outputs:
913
+ assert ' ' not in output, (
914
+ "Spaces in action output filenames not supported (%s)" % output)
915
+
916
+ # See the comment in WriteCopies about expanding env vars.
917
+ outputs = [gyp.xcode_emulation.ExpandEnvVars(o, env) for o in outputs]
918
+ inputs = [gyp.xcode_emulation.ExpandEnvVars(i, env) for i in inputs]
919
+
920
+ self.WriteDoCmd(outputs, map(Sourceify, map(self.Absolutify, inputs)),
921
+ part_of_all=part_of_all, command=name)
922
+
923
+ # Stuff the outputs in a variable so we can refer to them later.
924
+ outputs_variable = 'action_%s_outputs' % name
925
+ self.WriteLn('%s := %s' % (outputs_variable, ' '.join(outputs)))
926
+ extra_outputs.append('$(%s)' % outputs_variable)
927
+ self.WriteLn()
928
+
929
+ self.WriteLn()
930
+
931
+
932
+ def WriteRules(self, rules, extra_sources, extra_outputs,
933
+ extra_mac_bundle_resources, part_of_all):
934
+ """Write Makefile code for any 'rules' from the gyp input.
935
+
936
+ extra_sources: a list that will be filled in with newly generated source
937
+ files, if any
938
+ extra_outputs: a list that will be filled in with any outputs of these
939
+ rules (used to make other pieces dependent on these rules)
940
+ part_of_all: flag indicating this target is part of 'all'
941
+ """
942
+ env = self.GetSortedXcodeEnv()
943
+ for rule in rules:
944
+ name = StringToMakefileVariable('%s_%s' % (self.qualified_target,
945
+ rule['rule_name']))
946
+ count = 0
947
+ self.WriteLn('### Generated for rule %s:' % name)
948
+
949
+ all_outputs = []
950
+
951
+ for rule_source in rule.get('rule_sources', []):
952
+ dirs = set()
953
+ (rule_source_dirname, rule_source_basename) = os.path.split(rule_source)
954
+ (rule_source_root, rule_source_ext) = \
955
+ os.path.splitext(rule_source_basename)
956
+
957
+ outputs = [self.ExpandInputRoot(out, rule_source_root,
958
+ rule_source_dirname)
959
+ for out in rule['outputs']]
960
+
961
+ for out in outputs:
962
+ dir = os.path.dirname(out)
963
+ if dir:
964
+ dirs.add(dir)
965
+ if int(rule.get('process_outputs_as_sources', False)):
966
+ extra_sources += outputs
967
+ if int(rule.get('process_outputs_as_mac_bundle_resources', False)):
968
+ extra_mac_bundle_resources += outputs
969
+ inputs = map(Sourceify, map(self.Absolutify, [rule_source] +
970
+ rule.get('inputs', [])))
971
+ actions = ['$(call do_cmd,%s_%d)' % (name, count)]
972
+
973
+ if name == 'resources_grit':
974
+ # HACK: This is ugly. Grit intentionally doesn't touch the
975
+ # timestamp of its output file when the file doesn't change,
976
+ # which is fine in hash-based dependency systems like scons
977
+ # and forge, but not kosher in the make world. After some
978
+ # discussion, hacking around it here seems like the least
979
+ # amount of pain.
980
+ actions += ['@touch --no-create $@']
981
+
982
+ # See the comment in WriteCopies about expanding env vars.
983
+ outputs = [gyp.xcode_emulation.ExpandEnvVars(o, env) for o in outputs]
984
+ inputs = [gyp.xcode_emulation.ExpandEnvVars(i, env) for i in inputs]
985
+
986
+ outputs = map(self.Absolutify, outputs)
987
+ all_outputs += outputs
988
+ # Only write the 'obj' and 'builddir' rules for the "primary" output
989
+ # (:1); it's superfluous for the "extra outputs", and this avoids
990
+ # accidentally writing duplicate dummy rules for those outputs.
991
+ self.WriteLn('%s: obj := $(abs_obj)' % outputs[0])
992
+ self.WriteLn('%s: builddir := $(abs_builddir)' % outputs[0])
993
+ self.WriteMakeRule(outputs, inputs + ['FORCE_DO_CMD'], actions)
994
+ # Spaces in rule filenames are not supported, but rule variables have
995
+ # spaces in them (e.g. RULE_INPUT_PATH expands to '$(abspath $<)').
996
+ # The spaces within the variables are valid, so remove the variables
997
+ # before checking.
998
+ variables_with_spaces = re.compile(r'\$\([^ ]* \$<\)')
999
+ for output in outputs:
1000
+ output = re.sub(variables_with_spaces, '', output)
1001
+ assert ' ' not in output, (
1002
+ "Spaces in rule filenames not yet supported (%s)" % output)
1003
+ self.WriteLn('all_deps += %s' % ' '.join(outputs))
1004
+
1005
+ action = [self.ExpandInputRoot(ac, rule_source_root,
1006
+ rule_source_dirname)
1007
+ for ac in rule['action']]
1008
+ mkdirs = ''
1009
+ if len(dirs) > 0:
1010
+ mkdirs = 'mkdir -p %s; ' % ' '.join(dirs)
1011
+ cd_action = 'cd %s; ' % Sourceify(self.path or '.')
1012
+
1013
+ # action, cd_action, and mkdirs get written to a toplevel variable
1014
+ # called cmd_foo. Toplevel variables can't handle things that change
1015
+ # per makefile like $(TARGET), so hardcode the target.
1016
+ if self.flavor == 'mac':
1017
+ action = [gyp.xcode_emulation.ExpandEnvVars(command, env)
1018
+ for command in action]
1019
+ action = gyp.common.EncodePOSIXShellList(action)
1020
+ action = action.replace('$(TARGET)', self.target)
1021
+ cd_action = cd_action.replace('$(TARGET)', self.target)
1022
+ mkdirs = mkdirs.replace('$(TARGET)', self.target)
1023
+
1024
+ # Set LD_LIBRARY_PATH in case the rule runs an executable from this
1025
+ # build which links to shared libs from this build.
1026
+ # rules run on the host, so they should in theory only use host
1027
+ # libraries, but until everything is made cross-compile safe, also use
1028
+ # target libraries.
1029
+ # TODO(piman): when everything is cross-compile safe, remove lib.target
1030
+ self.WriteLn(
1031
+ "cmd_%(name)s_%(count)d = LD_LIBRARY_PATH="
1032
+ "$(builddir)/lib.host:$(builddir)/lib.target:$$LD_LIBRARY_PATH; "
1033
+ "export LD_LIBRARY_PATH; "
1034
+ "%(cd_action)s%(mkdirs)s%(action)s" % {
1035
+ 'action': action,
1036
+ 'cd_action': cd_action,
1037
+ 'count': count,
1038
+ 'mkdirs': mkdirs,
1039
+ 'name': name,
1040
+ })
1041
+ self.WriteLn(
1042
+ 'quiet_cmd_%(name)s_%(count)d = RULE %(name)s_%(count)d $@' % {
1043
+ 'count': count,
1044
+ 'name': name,
1045
+ })
1046
+ self.WriteLn()
1047
+ count += 1
1048
+
1049
+ outputs_variable = 'rule_%s_outputs' % name
1050
+ self.WriteList(all_outputs, outputs_variable)
1051
+ extra_outputs.append('$(%s)' % outputs_variable)
1052
+
1053
+ self.WriteLn('### Finished generating for rule: %s' % name)
1054
+ self.WriteLn()
1055
+ self.WriteLn('### Finished generating for all rules')
1056
+ self.WriteLn('')
1057
+
1058
+
1059
+ def WriteCopies(self, copies, extra_outputs, part_of_all):
1060
+ """Write Makefile code for any 'copies' from the gyp input.
1061
+
1062
+ extra_outputs: a list that will be filled in with any outputs of this action
1063
+ (used to make other pieces dependent on this action)
1064
+ part_of_all: flag indicating this target is part of 'all'
1065
+ """
1066
+ self.WriteLn('### Generated for copy rule.')
1067
+
1068
+ variable = StringToMakefileVariable(self.qualified_target + '_copies')
1069
+ outputs = []
1070
+ for copy in copies:
1071
+ for path in copy['files']:
1072
+ # Absolutify() may call normpath, and will strip trailing slashes.
1073
+ path = Sourceify(self.Absolutify(path))
1074
+ filename = os.path.split(path)[1]
1075
+ output = Sourceify(self.Absolutify(os.path.join(copy['destination'],
1076
+ filename)))
1077
+
1078
+ # If the output path has variables in it, which happens in practice for
1079
+ # 'copies', writing the environment as target-local doesn't work,
1080
+ # because the variables are already needed for the target name.
1081
+ # Copying the environment variables into global make variables doesn't
1082
+ # work either, because then the .d files will potentially contain spaces
1083
+ # after variable expansion, and .d file handling cannot handle spaces.
1084
+ # As a workaround, manually expand variables at gyp time. Since 'copies'
1085
+ # can't run scripts, there's no need to write the env then.
1086
+ # WriteDoCmd() will escape spaces for .d files.
1087
+ env = self.GetSortedXcodeEnv()
1088
+ output = gyp.xcode_emulation.ExpandEnvVars(output, env)
1089
+ path = gyp.xcode_emulation.ExpandEnvVars(path, env)
1090
+ self.WriteDoCmd([output], [path], 'copy', part_of_all)
1091
+ outputs.append(output)
1092
+ self.WriteLn('%s = %s' % (variable, ' '.join(map(QuoteSpaces, outputs))))
1093
+ extra_outputs.append('$(%s)' % variable)
1094
+ self.WriteLn()
1095
+
1096
+
1097
+ def WriteMacBundleResources(self, resources, bundle_deps):
1098
+ """Writes Makefile code for 'mac_bundle_resources'."""
1099
+ self.WriteLn('### Generated for mac_bundle_resources')
1100
+
1101
+ for output, res in gyp.xcode_emulation.GetMacBundleResources(
1102
+ generator_default_variables['PRODUCT_DIR'], self.xcode_settings,
1103
+ map(Sourceify, map(self.Absolutify, resources))):
1104
+ self.WriteDoCmd([output], [res], 'mac_tool,,,copy-bundle-resource',
1105
+ part_of_all=True)
1106
+ bundle_deps.append(output)
1107
+
1108
+
1109
+ def WriteMacInfoPlist(self, bundle_deps):
1110
+ """Write Makefile code for bundle Info.plist files."""
1111
+ info_plist, out, defines, extra_env = gyp.xcode_emulation.GetMacInfoPlist(
1112
+ generator_default_variables['PRODUCT_DIR'], self.xcode_settings,
1113
+ lambda p: Sourceify(self.Absolutify(p)))
1114
+ if not info_plist:
1115
+ return
1116
+ if defines:
1117
+ # Create an intermediate file to store preprocessed results.
1118
+ intermediate_plist = ('$(obj).$(TOOLSET)/$(TARGET)/' +
1119
+ os.path.basename(info_plist))
1120
+ self.WriteList(defines, intermediate_plist + ': INFOPLIST_DEFINES', '-D',
1121
+ quoter=EscapeCppDefine)
1122
+ self.WriteMakeRule([intermediate_plist], [info_plist],
1123
+ ['$(call do_cmd,infoplist)',
1124
+ # "Convert" the plist so that any weird whitespace changes from the
1125
+ # preprocessor do not affect the XML parser in mac_tool.
1126
+ '@plutil -convert xml1 $@ $@'])
1127
+ info_plist = intermediate_plist
1128
+ # plists can contain envvars and substitute them into the file.
1129
+ self.WriteSortedXcodeEnv(
1130
+ out, self.GetSortedXcodeEnv(additional_settings=extra_env))
1131
+ self.WriteDoCmd([out], [info_plist], 'mac_tool,,,copy-info-plist',
1132
+ part_of_all=True)
1133
+ bundle_deps.append(out)
1134
+
1135
+
1136
+ def WriteSources(self, configs, deps, sources,
1137
+ extra_outputs, extra_link_deps,
1138
+ part_of_all, precompiled_header):
1139
+ """Write Makefile code for any 'sources' from the gyp input.
1140
+ These are source files necessary to build the current target.
1141
+
1142
+ configs, deps, sources: input from gyp.
1143
+ extra_outputs: a list of extra outputs this action should be dependent on;
1144
+ used to serialize action/rules before compilation
1145
+ extra_link_deps: a list that will be filled in with any outputs of
1146
+ compilation (to be used in link lines)
1147
+ part_of_all: flag indicating this target is part of 'all'
1148
+ """
1149
+
1150
+ # Write configuration-specific variables for CFLAGS, etc.
1151
+ for configname in sorted(configs.keys()):
1152
+ config = configs[configname]
1153
+ self.WriteList(config.get('defines'), 'DEFS_%s' % configname, prefix='-D',
1154
+ quoter=EscapeCppDefine)
1155
+
1156
+ if self.flavor == 'mac':
1157
+ cflags = self.xcode_settings.GetCflags(configname)
1158
+ cflags_c = self.xcode_settings.GetCflagsC(configname)
1159
+ cflags_cc = self.xcode_settings.GetCflagsCC(configname)
1160
+ cflags_objc = self.xcode_settings.GetCflagsObjC(configname)
1161
+ cflags_objcc = self.xcode_settings.GetCflagsObjCC(configname)
1162
+ else:
1163
+ cflags = config.get('cflags')
1164
+ cflags_c = config.get('cflags_c')
1165
+ cflags_cc = config.get('cflags_cc')
1166
+
1167
+ self.WriteLn("# Flags passed to all source files.");
1168
+ self.WriteList(cflags, 'CFLAGS_%s' % configname)
1169
+ self.WriteLn("# Flags passed to only C files.");
1170
+ self.WriteList(cflags_c, 'CFLAGS_C_%s' % configname)
1171
+ self.WriteLn("# Flags passed to only C++ files.");
1172
+ self.WriteList(cflags_cc, 'CFLAGS_CC_%s' % configname)
1173
+ if self.flavor == 'mac':
1174
+ self.WriteLn("# Flags passed to only ObjC files.");
1175
+ self.WriteList(cflags_objc, 'CFLAGS_OBJC_%s' % configname)
1176
+ self.WriteLn("# Flags passed to only ObjC++ files.");
1177
+ self.WriteList(cflags_objcc, 'CFLAGS_OBJCC_%s' % configname)
1178
+ includes = config.get('include_dirs')
1179
+ if includes:
1180
+ includes = map(Sourceify, map(self.Absolutify, includes))
1181
+ self.WriteList(includes, 'INCS_%s' % configname, prefix='-I')
1182
+
1183
+ compilable = filter(Compilable, sources)
1184
+ objs = map(self.Objectify, map(self.Absolutify, map(Target, compilable)))
1185
+ self.WriteList(objs, 'OBJS')
1186
+
1187
+ for obj in objs:
1188
+ assert ' ' not in obj, (
1189
+ "Spaces in object filenames not supported (%s)" % obj)
1190
+ self.WriteLn('# Add to the list of files we specially track '
1191
+ 'dependencies for.')
1192
+ self.WriteLn('all_deps += $(OBJS)')
1193
+ self.WriteLn()
1194
+
1195
+ # Make sure our dependencies are built first.
1196
+ if deps:
1197
+ self.WriteMakeRule(['$(OBJS)'], deps,
1198
+ comment = 'Make sure our dependencies are built '
1199
+ 'before any of us.',
1200
+ order_only = True)
1201
+
1202
+ # Make sure the actions and rules run first.
1203
+ # If they generate any extra headers etc., the per-.o file dep tracking
1204
+ # will catch the proper rebuilds, so order only is still ok here.
1205
+ if extra_outputs:
1206
+ self.WriteMakeRule(['$(OBJS)'], extra_outputs,
1207
+ comment = 'Make sure our actions/rules run '
1208
+ 'before any of us.',
1209
+ order_only = True)
1210
+
1211
+ pchdeps = precompiled_header.GetObjDependencies(compilable, objs )
1212
+ if pchdeps:
1213
+ self.WriteLn('# Dependencies from obj files to their precompiled headers')
1214
+ for source, obj, gch in pchdeps:
1215
+ self.WriteLn('%s: %s' % (obj, gch))
1216
+ self.WriteLn('# End precompiled header dependencies')
1217
+
1218
+ if objs:
1219
+ extra_link_deps.append('$(OBJS)')
1220
+ self.WriteLn("""\
1221
+ # CFLAGS et al overrides must be target-local.
1222
+ # See "Target-specific Variable Values" in the GNU Make manual.""")
1223
+ self.WriteLn("$(OBJS): TOOLSET := $(TOOLSET)")
1224
+ self.WriteLn("$(OBJS): GYP_CFLAGS := "
1225
+ "$(DEFS_$(BUILDTYPE)) "
1226
+ "$(INCS_$(BUILDTYPE)) "
1227
+ "%s " % precompiled_header.GetInclude('c') +
1228
+ "$(CFLAGS_$(BUILDTYPE)) "
1229
+ "$(CFLAGS_C_$(BUILDTYPE))")
1230
+ self.WriteLn("$(OBJS): GYP_CXXFLAGS := "
1231
+ "$(DEFS_$(BUILDTYPE)) "
1232
+ "$(INCS_$(BUILDTYPE)) "
1233
+ "%s " % precompiled_header.GetInclude('cc') +
1234
+ "$(CFLAGS_$(BUILDTYPE)) "
1235
+ "$(CFLAGS_CC_$(BUILDTYPE))")
1236
+ if self.flavor == 'mac':
1237
+ self.WriteLn("$(OBJS): GYP_OBJCFLAGS := "
1238
+ "$(DEFS_$(BUILDTYPE)) "
1239
+ "$(INCS_$(BUILDTYPE)) "
1240
+ "%s " % precompiled_header.GetInclude('m') +
1241
+ "$(CFLAGS_$(BUILDTYPE)) "
1242
+ "$(CFLAGS_C_$(BUILDTYPE)) "
1243
+ "$(CFLAGS_OBJC_$(BUILDTYPE))")
1244
+ self.WriteLn("$(OBJS): GYP_OBJCXXFLAGS := "
1245
+ "$(DEFS_$(BUILDTYPE)) "
1246
+ "$(INCS_$(BUILDTYPE)) "
1247
+ "%s " % precompiled_header.GetInclude('mm') +
1248
+ "$(CFLAGS_$(BUILDTYPE)) "
1249
+ "$(CFLAGS_CC_$(BUILDTYPE)) "
1250
+ "$(CFLAGS_OBJCC_$(BUILDTYPE))")
1251
+
1252
+ self.WritePchTargets(precompiled_header.GetPchBuildCommands())
1253
+
1254
+ # If there are any object files in our input file list, link them into our
1255
+ # output.
1256
+ extra_link_deps += filter(Linkable, sources)
1257
+
1258
+ self.WriteLn()
1259
+
1260
+ def WritePchTargets(self, pch_commands):
1261
+ """Writes make rules to compile prefix headers."""
1262
+ if not pch_commands:
1263
+ return
1264
+
1265
+ for gch, lang_flag, lang, input in pch_commands:
1266
+ extra_flags = {
1267
+ 'c': '$(CFLAGS_C_$(BUILDTYPE))',
1268
+ 'cc': '$(CFLAGS_CC_$(BUILDTYPE))',
1269
+ 'm': '$(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE))',
1270
+ 'mm': '$(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE))',
1271
+ }[lang]
1272
+ var_name = {
1273
+ 'c': 'GYP_PCH_CFLAGS',
1274
+ 'cc': 'GYP_PCH_CXXFLAGS',
1275
+ 'm': 'GYP_PCH_OBJCFLAGS',
1276
+ 'mm': 'GYP_PCH_OBJCXXFLAGS',
1277
+ }[lang]
1278
+ self.WriteLn("%s: %s := %s " % (gch, var_name, lang_flag) +
1279
+ "$(DEFS_$(BUILDTYPE)) "
1280
+ "$(INCS_$(BUILDTYPE)) "
1281
+ "$(CFLAGS_$(BUILDTYPE)) " +
1282
+ extra_flags)
1283
+
1284
+ self.WriteLn('%s: %s FORCE_DO_CMD' % (gch, input))
1285
+ self.WriteLn('\t@$(call do_cmd,pch_%s,1)' % lang)
1286
+ self.WriteLn('')
1287
+ assert ' ' not in gch, (
1288
+ "Spaces in gch filenames not supported (%s)" % gch)
1289
+ self.WriteLn('all_deps += %s' % gch)
1290
+ self.WriteLn('')
1291
+
1292
+
1293
+ def ComputeOutputBasename(self, spec):
1294
+ """Return the 'output basename' of a gyp spec.
1295
+
1296
+ E.g., the loadable module 'foobar' in directory 'baz' will produce
1297
+ 'libfoobar.so'
1298
+ """
1299
+ assert not self.is_mac_bundle
1300
+
1301
+ if self.flavor == 'mac' and self.type in (
1302
+ 'static_library', 'executable', 'shared_library', 'loadable_module'):
1303
+ return self.xcode_settings.GetExecutablePath()
1304
+
1305
+ target = spec['target_name']
1306
+ target_prefix = ''
1307
+ target_ext = ''
1308
+ if self.type == 'static_library':
1309
+ if target[:3] == 'lib':
1310
+ target = target[3:]
1311
+ target_prefix = 'lib'
1312
+ target_ext = '.a'
1313
+ elif self.type in ('loadable_module', 'shared_library'):
1314
+ if target[:3] == 'lib':
1315
+ target = target[3:]
1316
+ target_prefix = 'lib'
1317
+ target_ext = '.so'
1318
+ elif self.type == 'none':
1319
+ target = '%s.stamp' % target
1320
+ elif self.type != 'executable':
1321
+ print ("ERROR: What output file should be generated?",
1322
+ "type", self.type, "target", target)
1323
+
1324
+ target_prefix = spec.get('product_prefix', target_prefix)
1325
+ target = spec.get('product_name', target)
1326
+ product_ext = spec.get('product_extension')
1327
+ if product_ext:
1328
+ target_ext = '.' + product_ext
1329
+
1330
+ return target_prefix + target + target_ext
1331
+
1332
+
1333
+ def _InstallImmediately(self):
1334
+ return self.toolset == 'target' and self.flavor == 'mac' and self.type in (
1335
+ 'static_library', 'executable', 'shared_library', 'loadable_module')
1336
+
1337
+
1338
+ def ComputeOutput(self, spec):
1339
+ """Return the 'output' (full output path) of a gyp spec.
1340
+
1341
+ E.g., the loadable module 'foobar' in directory 'baz' will produce
1342
+ '$(obj)/baz/libfoobar.so'
1343
+ """
1344
+ assert not self.is_mac_bundle
1345
+
1346
+ path = os.path.join('$(obj).' + self.toolset, self.path)
1347
+ if self.type == 'executable' or self._InstallImmediately():
1348
+ path = '$(builddir)'
1349
+ path = spec.get('product_dir', path)
1350
+ return os.path.join(path, self.ComputeOutputBasename(spec))
1351
+
1352
+
1353
+ def ComputeMacBundleOutput(self, spec):
1354
+ """Return the 'output' (full output path) to a bundle output directory."""
1355
+ assert self.is_mac_bundle
1356
+ path = generator_default_variables['PRODUCT_DIR']
1357
+ return os.path.join(path, self.xcode_settings.GetWrapperName())
1358
+
1359
+
1360
+ def ComputeMacBundleBinaryOutput(self, spec):
1361
+ """Return the 'output' (full output path) to the binary in a bundle."""
1362
+ path = generator_default_variables['PRODUCT_DIR']
1363
+ return os.path.join(path, self.xcode_settings.GetExecutablePath())
1364
+
1365
+
1366
+ def ComputeDeps(self, spec):
1367
+ """Compute the dependencies of a gyp spec.
1368
+
1369
+ Returns a tuple (deps, link_deps), where each is a list of
1370
+ filenames that will need to be put in front of make for either
1371
+ building (deps) or linking (link_deps).
1372
+ """
1373
+ deps = []
1374
+ link_deps = []
1375
+ if 'dependencies' in spec:
1376
+ deps.extend([target_outputs[dep] for dep in spec['dependencies']
1377
+ if target_outputs[dep]])
1378
+ for dep in spec['dependencies']:
1379
+ if dep in target_link_deps:
1380
+ link_deps.append(target_link_deps[dep])
1381
+ deps.extend(link_deps)
1382
+ # TODO: It seems we need to transitively link in libraries (e.g. -lfoo)?
1383
+ # This hack makes it work:
1384
+ # link_deps.extend(spec.get('libraries', []))
1385
+ return (gyp.common.uniquer(deps), gyp.common.uniquer(link_deps))
1386
+
1387
+
1388
+ def WriteDependencyOnExtraOutputs(self, target, extra_outputs):
1389
+ self.WriteMakeRule([self.output_binary], extra_outputs,
1390
+ comment = 'Build our special outputs first.',
1391
+ order_only = True)
1392
+
1393
+
1394
+ def WriteTarget(self, spec, configs, deps, link_deps, bundle_deps,
1395
+ extra_outputs, part_of_all):
1396
+ """Write Makefile code to produce the final target of the gyp spec.
1397
+
1398
+ spec, configs: input from gyp.
1399
+ deps, link_deps: dependency lists; see ComputeDeps()
1400
+ extra_outputs: any extra outputs that our target should depend on
1401
+ part_of_all: flag indicating this target is part of 'all'
1402
+ """
1403
+
1404
+ self.WriteLn('### Rules for final target.')
1405
+
1406
+ if extra_outputs:
1407
+ self.WriteDependencyOnExtraOutputs(self.output_binary, extra_outputs)
1408
+ self.WriteMakeRule(extra_outputs, deps,
1409
+ comment=('Preserve order dependency of '
1410
+ 'special output on deps.'),
1411
+ order_only = True)
1412
+
1413
+ target_postbuilds = {}
1414
+ if self.type != 'none':
1415
+ for configname in sorted(configs.keys()):
1416
+ config = configs[configname]
1417
+ if self.flavor == 'mac':
1418
+ ldflags = self.xcode_settings.GetLdflags(configname,
1419
+ generator_default_variables['PRODUCT_DIR'],
1420
+ lambda p: Sourceify(self.Absolutify(p)))
1421
+
1422
+ # TARGET_POSTBUILDS_$(BUILDTYPE) is added to postbuilds later on.
1423
+ gyp_to_build = gyp.common.InvertRelativePath(self.path)
1424
+ target_postbuild = self.xcode_settings.AddImplicitPostbuilds(
1425
+ configname,
1426
+ QuoteSpaces(os.path.normpath(os.path.join(gyp_to_build,
1427
+ self.output))),
1428
+ QuoteSpaces(os.path.normpath(os.path.join(gyp_to_build,
1429
+ self.output_binary))))
1430
+ if target_postbuild:
1431
+ target_postbuilds[configname] = target_postbuild
1432
+ else:
1433
+ ldflags = config.get('ldflags', [])
1434
+ # Compute an rpath for this output if needed.
1435
+ if any(dep.endswith('.so') or '.so.' in dep for dep in deps):
1436
+ # We want to get the literal string "$ORIGIN" into the link command,
1437
+ # so we need lots of escaping.
1438
+ ldflags.append(r'-Wl,-rpath=\$$ORIGIN/lib.%s/' % self.toolset)
1439
+ ldflags.append(r'-Wl,-rpath-link=\$(builddir)/lib.%s/' %
1440
+ self.toolset)
1441
+ library_dirs = config.get('library_dirs', [])
1442
+ ldflags += [('-L%s' % library_dir) for library_dir in library_dirs]
1443
+ self.WriteList(ldflags, 'LDFLAGS_%s' % configname)
1444
+ if self.flavor == 'mac':
1445
+ self.WriteList(self.xcode_settings.GetLibtoolflags(configname),
1446
+ 'LIBTOOLFLAGS_%s' % configname)
1447
+ libraries = spec.get('libraries')
1448
+ if libraries:
1449
+ # Remove duplicate entries
1450
+ libraries = gyp.common.uniquer(libraries)
1451
+ if self.flavor == 'mac':
1452
+ libraries = self.xcode_settings.AdjustLibraries(libraries)
1453
+ self.WriteList(libraries, 'LIBS')
1454
+ self.WriteLn('%s: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))' %
1455
+ QuoteSpaces(self.output_binary))
1456
+ self.WriteLn('%s: LIBS := $(LIBS)' % QuoteSpaces(self.output_binary))
1457
+
1458
+ if self.flavor == 'mac':
1459
+ self.WriteLn('%s: GYP_LIBTOOLFLAGS := $(LIBTOOLFLAGS_$(BUILDTYPE))' %
1460
+ QuoteSpaces(self.output_binary))
1461
+
1462
+ # Postbuild actions. Like actions, but implicitly depend on the target's
1463
+ # output.
1464
+ postbuilds = []
1465
+ if self.flavor == 'mac':
1466
+ if target_postbuilds:
1467
+ postbuilds.append('$(TARGET_POSTBUILDS_$(BUILDTYPE))')
1468
+ postbuilds.extend(
1469
+ gyp.xcode_emulation.GetSpecPostbuildCommands(spec))
1470
+
1471
+ if postbuilds:
1472
+ # Envvars may be referenced by TARGET_POSTBUILDS_$(BUILDTYPE),
1473
+ # so we must output its definition first, since we declare variables
1474
+ # using ":=".
1475
+ self.WriteSortedXcodeEnv(self.output, self.GetSortedXcodePostbuildEnv())
1476
+
1477
+ for configname in target_postbuilds:
1478
+ self.WriteLn('%s: TARGET_POSTBUILDS_%s := %s' %
1479
+ (QuoteSpaces(self.output),
1480
+ configname,
1481
+ gyp.common.EncodePOSIXShellList(target_postbuilds[configname])))
1482
+
1483
+ # Postbuilds expect to be run in the gyp file's directory, so insert an
1484
+ # implicit postbuild to cd to there.
1485
+ postbuilds.insert(0, gyp.common.EncodePOSIXShellList(['cd', self.path]))
1486
+ for i in xrange(len(postbuilds)):
1487
+ if not postbuilds[i].startswith('$'):
1488
+ postbuilds[i] = EscapeShellArgument(postbuilds[i])
1489
+ self.WriteLn('%s: builddir := $(abs_builddir)' % QuoteSpaces(self.output))
1490
+ self.WriteLn('%s: POSTBUILDS := %s' % (
1491
+ QuoteSpaces(self.output), ' '.join(postbuilds)))
1492
+
1493
+ # A bundle directory depends on its dependencies such as bundle resources
1494
+ # and bundle binary. When all dependencies have been built, the bundle
1495
+ # needs to be packaged.
1496
+ if self.is_mac_bundle:
1497
+ # If the framework doesn't contain a binary, then nothing depends
1498
+ # on the actions -- make the framework depend on them directly too.
1499
+ self.WriteDependencyOnExtraOutputs(self.output, extra_outputs)
1500
+
1501
+ # Bundle dependencies. Note that the code below adds actions to this
1502
+ # target, so if you move these two lines, move the lines below as well.
1503
+ self.WriteList(map(QuoteSpaces, bundle_deps), 'BUNDLE_DEPS')
1504
+ self.WriteLn('%s: $(BUNDLE_DEPS)' % QuoteSpaces(self.output))
1505
+
1506
+ # After the framework is built, package it. Needs to happen before
1507
+ # postbuilds, since postbuilds depend on this.
1508
+ if self.type in ('shared_library', 'loadable_module'):
1509
+ self.WriteLn('\t@$(call do_cmd,mac_package_framework,,,%s)' %
1510
+ self.xcode_settings.GetFrameworkVersion())
1511
+
1512
+ # Bundle postbuilds can depend on the whole bundle, so run them after
1513
+ # the bundle is packaged, not already after the bundle binary is done.
1514
+ if postbuilds:
1515
+ self.WriteLn('\t@$(call do_postbuilds)')
1516
+ postbuilds = [] # Don't write postbuilds for target's output.
1517
+
1518
+ # Needed by test/mac/gyptest-rebuild.py.
1519
+ self.WriteLn('\t@true # No-op, used by tests')
1520
+
1521
+ # Since this target depends on binary and resources which are in
1522
+ # nested subfolders, the framework directory will be older than
1523
+ # its dependencies usually. To prevent this rule from executing
1524
+ # on every build (expensive, especially with postbuilds), expliclity
1525
+ # update the time on the framework directory.
1526
+ self.WriteLn('\t@touch -c %s' % QuoteSpaces(self.output))
1527
+
1528
+ if postbuilds:
1529
+ assert not self.is_mac_bundle, ('Postbuilds for bundles should be done '
1530
+ 'on the bundle, not the binary (target \'%s\')' % self.target)
1531
+ assert 'product_dir' not in spec, ('Postbuilds do not work with '
1532
+ 'custom product_dir')
1533
+
1534
+ if self.type == 'executable':
1535
+ self.WriteLn('%s: LD_INPUTS := %s' % (
1536
+ QuoteSpaces(self.output_binary),
1537
+ ' '.join(map(QuoteSpaces, link_deps))))
1538
+ if self.toolset == 'host' and self.flavor == 'android':
1539
+ self.WriteDoCmd([self.output_binary], link_deps, 'link_host',
1540
+ part_of_all, postbuilds=postbuilds)
1541
+ else:
1542
+ self.WriteDoCmd([self.output_binary], link_deps, 'link', part_of_all,
1543
+ postbuilds=postbuilds)
1544
+
1545
+ elif self.type == 'static_library':
1546
+ for link_dep in link_deps:
1547
+ assert ' ' not in link_dep, (
1548
+ "Spaces in alink input filenames not supported (%s)" % link_dep)
1549
+ if (self.flavor not in ('mac', 'openbsd', 'win') and not
1550
+ self.is_standalone_static_library):
1551
+ self.WriteDoCmd([self.output_binary], link_deps, 'alink_thin',
1552
+ part_of_all, postbuilds=postbuilds)
1553
+ else:
1554
+ self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all,
1555
+ postbuilds=postbuilds)
1556
+ elif self.type == 'shared_library':
1557
+ self.WriteLn('%s: LD_INPUTS := %s' % (
1558
+ QuoteSpaces(self.output_binary),
1559
+ ' '.join(map(QuoteSpaces, link_deps))))
1560
+ self.WriteDoCmd([self.output_binary], link_deps, 'solink', part_of_all,
1561
+ postbuilds=postbuilds)
1562
+ elif self.type == 'loadable_module':
1563
+ for link_dep in link_deps:
1564
+ assert ' ' not in link_dep, (
1565
+ "Spaces in module input filenames not supported (%s)" % link_dep)
1566
+ if self.toolset == 'host' and self.flavor == 'android':
1567
+ self.WriteDoCmd([self.output_binary], link_deps, 'solink_module_host',
1568
+ part_of_all, postbuilds=postbuilds)
1569
+ else:
1570
+ self.WriteDoCmd(
1571
+ [self.output_binary], link_deps, 'solink_module', part_of_all,
1572
+ postbuilds=postbuilds)
1573
+ elif self.type == 'none':
1574
+ # Write a stamp line.
1575
+ self.WriteDoCmd([self.output_binary], deps, 'touch', part_of_all,
1576
+ postbuilds=postbuilds)
1577
+ else:
1578
+ print "WARNING: no output for", self.type, target
1579
+
1580
+ # Add an alias for each target (if there are any outputs).
1581
+ # Installable target aliases are created below.
1582
+ if ((self.output and self.output != self.target) and
1583
+ (self.type not in self._INSTALLABLE_TARGETS)):
1584
+ self.WriteMakeRule([self.target], [self.output],
1585
+ comment='Add target alias', phony = True)
1586
+ if part_of_all:
1587
+ self.WriteMakeRule(['all'], [self.target],
1588
+ comment = 'Add target alias to "all" target.',
1589
+ phony = True)
1590
+
1591
+ # Add special-case rules for our installable targets.
1592
+ # 1) They need to install to the build dir or "product" dir.
1593
+ # 2) They get shortcuts for building (e.g. "make chrome").
1594
+ # 3) They are part of "make all".
1595
+ if (self.type in self._INSTALLABLE_TARGETS or
1596
+ self.is_standalone_static_library):
1597
+ if self.type == 'shared_library':
1598
+ file_desc = 'shared library'
1599
+ elif self.type == 'static_library':
1600
+ file_desc = 'static library'
1601
+ else:
1602
+ file_desc = 'executable'
1603
+ install_path = self._InstallableTargetInstallPath()
1604
+ installable_deps = [self.output]
1605
+ if (self.flavor == 'mac' and not 'product_dir' in spec and
1606
+ self.toolset == 'target'):
1607
+ # On mac, products are created in install_path immediately.
1608
+ assert install_path == self.output, '%s != %s' % (
1609
+ install_path, self.output)
1610
+
1611
+ # Point the target alias to the final binary output.
1612
+ self.WriteMakeRule([self.target], [install_path],
1613
+ comment='Add target alias', phony = True)
1614
+ if install_path != self.output:
1615
+ assert not self.is_mac_bundle # See comment a few lines above.
1616
+ self.WriteDoCmd([install_path], [self.output], 'copy',
1617
+ comment = 'Copy this to the %s output path.' %
1618
+ file_desc, part_of_all=part_of_all)
1619
+ installable_deps.append(install_path)
1620
+ if self.output != self.alias and self.alias != self.target:
1621
+ self.WriteMakeRule([self.alias], installable_deps,
1622
+ comment = 'Short alias for building this %s.' %
1623
+ file_desc, phony = True)
1624
+ if part_of_all:
1625
+ self.WriteMakeRule(['all'], [install_path],
1626
+ comment = 'Add %s to "all" target.' % file_desc,
1627
+ phony = True)
1628
+
1629
+
1630
+ def WriteList(self, value_list, variable=None, prefix='',
1631
+ quoter=QuoteIfNecessary):
1632
+ """Write a variable definition that is a list of values.
1633
+
1634
+ E.g. WriteList(['a','b'], 'foo', prefix='blah') writes out
1635
+ foo = blaha blahb
1636
+ but in a pretty-printed style.
1637
+ """
1638
+ values = ''
1639
+ if value_list:
1640
+ value_list = [quoter(prefix + l) for l in value_list]
1641
+ values = ' \\\n\t' + ' \\\n\t'.join(value_list)
1642
+ self.fp.write('%s :=%s\n\n' % (variable, values))
1643
+
1644
+
1645
+ def WriteDoCmd(self, outputs, inputs, command, part_of_all, comment=None,
1646
+ postbuilds=False):
1647
+ """Write a Makefile rule that uses do_cmd.
1648
+
1649
+ This makes the outputs dependent on the command line that was run,
1650
+ as well as support the V= make command line flag.
1651
+ """
1652
+ suffix = ''
1653
+ if postbuilds:
1654
+ assert ',' not in command
1655
+ suffix = ',,1' # Tell do_cmd to honor $POSTBUILDS
1656
+ self.WriteMakeRule(outputs, inputs,
1657
+ actions = ['$(call do_cmd,%s%s)' % (command, suffix)],
1658
+ comment = comment,
1659
+ force = True)
1660
+ # Add our outputs to the list of targets we read depfiles from.
1661
+ # all_deps is only used for deps file reading, and for deps files we replace
1662
+ # spaces with ? because escaping doesn't work with make's $(sort) and
1663
+ # other functions.
1664
+ outputs = [QuoteSpaces(o, SPACE_REPLACEMENT) for o in outputs]
1665
+ self.WriteLn('all_deps += %s' % ' '.join(outputs))
1666
+
1667
+
1668
+ def WriteMakeRule(self, outputs, inputs, actions=None, comment=None,
1669
+ order_only=False, force=False, phony=False):
1670
+ """Write a Makefile rule, with some extra tricks.
1671
+
1672
+ outputs: a list of outputs for the rule (note: this is not directly
1673
+ supported by make; see comments below)
1674
+ inputs: a list of inputs for the rule
1675
+ actions: a list of shell commands to run for the rule
1676
+ comment: a comment to put in the Makefile above the rule (also useful
1677
+ for making this Python script's code self-documenting)
1678
+ order_only: if true, makes the dependency order-only
1679
+ force: if true, include FORCE_DO_CMD as an order-only dep
1680
+ phony: if true, the rule does not actually generate the named output, the
1681
+ output is just a name to run the rule
1682
+ """
1683
+ outputs = map(QuoteSpaces, outputs)
1684
+ inputs = map(QuoteSpaces, inputs)
1685
+
1686
+ if comment:
1687
+ self.WriteLn('# ' + comment)
1688
+ if phony:
1689
+ self.WriteLn('.PHONY: ' + ' '.join(outputs))
1690
+ # TODO(evanm): just make order_only a list of deps instead of these hacks.
1691
+ if order_only:
1692
+ order_insert = '| '
1693
+ pick_output = ' '.join(outputs)
1694
+ else:
1695
+ order_insert = ''
1696
+ pick_output = outputs[0]
1697
+ if force:
1698
+ force_append = ' FORCE_DO_CMD'
1699
+ else:
1700
+ force_append = ''
1701
+ if actions:
1702
+ self.WriteLn("%s: TOOLSET := $(TOOLSET)" % outputs[0])
1703
+ self.WriteLn('%s: %s%s%s' % (pick_output, order_insert, ' '.join(inputs),
1704
+ force_append))
1705
+ if actions:
1706
+ for action in actions:
1707
+ self.WriteLn('\t%s' % action)
1708
+ if not order_only and len(outputs) > 1:
1709
+ # If we have more than one output, a rule like
1710
+ # foo bar: baz
1711
+ # that for *each* output we must run the action, potentially
1712
+ # in parallel. That is not what we're trying to write -- what
1713
+ # we want is that we run the action once and it generates all
1714
+ # the files.
1715
+ # http://www.gnu.org/software/hello/manual/automake/Multiple-Outputs.html
1716
+ # discusses this problem and has this solution:
1717
+ # 1) Write the naive rule that would produce parallel runs of
1718
+ # the action.
1719
+ # 2) Make the outputs seralized on each other, so we won't start
1720
+ # a parallel run until the first run finishes, at which point
1721
+ # we'll have generated all the outputs and we're done.
1722
+ self.WriteLn('%s: %s' % (' '.join(outputs[1:]), outputs[0]))
1723
+ # Add a dummy command to the "extra outputs" rule, otherwise make seems to
1724
+ # think these outputs haven't (couldn't have?) changed, and thus doesn't
1725
+ # flag them as changed (i.e. include in '$?') when evaluating dependent
1726
+ # rules, which in turn causes do_cmd() to skip running dependent commands.
1727
+ self.WriteLn('%s: ;' % (' '.join(outputs[1:])))
1728
+ self.WriteLn()
1729
+
1730
+
1731
+ def WriteAndroidNdkModuleRule(self, module_name, all_sources, link_deps):
1732
+ """Write a set of LOCAL_XXX definitions for Android NDK.
1733
+
1734
+ These variable definitions will be used by Android NDK but do nothing for
1735
+ non-Android applications.
1736
+
1737
+ Arguments:
1738
+ module_name: Android NDK module name, which must be unique among all
1739
+ module names.
1740
+ all_sources: A list of source files (will be filtered by Compilable).
1741
+ link_deps: A list of link dependencies, which must be sorted in
1742
+ the order from dependencies to dependents.
1743
+ """
1744
+ if self.type not in ('executable', 'shared_library', 'static_library'):
1745
+ return
1746
+
1747
+ self.WriteLn('# Variable definitions for Android applications')
1748
+ self.WriteLn('include $(CLEAR_VARS)')
1749
+ self.WriteLn('LOCAL_MODULE := ' + module_name)
1750
+ self.WriteLn('LOCAL_CFLAGS := $(CFLAGS_$(BUILDTYPE)) '
1751
+ '$(DEFS_$(BUILDTYPE)) '
1752
+ # LOCAL_CFLAGS is applied to both of C and C++. There is
1753
+ # no way to specify $(CFLAGS_C_$(BUILDTYPE)) only for C
1754
+ # sources.
1755
+ '$(CFLAGS_C_$(BUILDTYPE)) '
1756
+ # $(INCS_$(BUILDTYPE)) includes the prefix '-I' while
1757
+ # LOCAL_C_INCLUDES does not expect it. So put it in
1758
+ # LOCAL_CFLAGS.
1759
+ '$(INCS_$(BUILDTYPE))')
1760
+ # LOCAL_CXXFLAGS is obsolete and LOCAL_CPPFLAGS is preferred.
1761
+ self.WriteLn('LOCAL_CPPFLAGS := $(CFLAGS_CC_$(BUILDTYPE))')
1762
+ self.WriteLn('LOCAL_C_INCLUDES :=')
1763
+ self.WriteLn('LOCAL_LDLIBS := $(LDFLAGS_$(BUILDTYPE)) $(LIBS)')
1764
+
1765
+ # Detect the C++ extension.
1766
+ cpp_ext = {'.cc': 0, '.cpp': 0, '.cxx': 0}
1767
+ default_cpp_ext = '.cpp'
1768
+ for filename in all_sources:
1769
+ ext = os.path.splitext(filename)[1]
1770
+ if ext in cpp_ext:
1771
+ cpp_ext[ext] += 1
1772
+ if cpp_ext[ext] > cpp_ext[default_cpp_ext]:
1773
+ default_cpp_ext = ext
1774
+ self.WriteLn('LOCAL_CPP_EXTENSION := ' + default_cpp_ext)
1775
+
1776
+ self.WriteList(map(self.Absolutify, filter(Compilable, all_sources)),
1777
+ 'LOCAL_SRC_FILES')
1778
+
1779
+ # Filter out those which do not match prefix and suffix and produce
1780
+ # the resulting list without prefix and suffix.
1781
+ def DepsToModules(deps, prefix, suffix):
1782
+ modules = []
1783
+ for filepath in deps:
1784
+ filename = os.path.basename(filepath)
1785
+ if filename.startswith(prefix) and filename.endswith(suffix):
1786
+ modules.append(filename[len(prefix):-len(suffix)])
1787
+ return modules
1788
+
1789
+ # Retrieve the default value of 'SHARED_LIB_SUFFIX'
1790
+ params = {'flavor': 'linux'}
1791
+ default_variables = {}
1792
+ CalculateVariables(default_variables, params)
1793
+
1794
+ self.WriteList(
1795
+ DepsToModules(link_deps,
1796
+ generator_default_variables['SHARED_LIB_PREFIX'],
1797
+ default_variables['SHARED_LIB_SUFFIX']),
1798
+ 'LOCAL_SHARED_LIBRARIES')
1799
+ self.WriteList(
1800
+ DepsToModules(link_deps,
1801
+ generator_default_variables['STATIC_LIB_PREFIX'],
1802
+ generator_default_variables['STATIC_LIB_SUFFIX']),
1803
+ 'LOCAL_STATIC_LIBRARIES')
1804
+
1805
+ if self.type == 'executable':
1806
+ self.WriteLn('include $(BUILD_EXECUTABLE)')
1807
+ elif self.type == 'shared_library':
1808
+ self.WriteLn('include $(BUILD_SHARED_LIBRARY)')
1809
+ elif self.type == 'static_library':
1810
+ self.WriteLn('include $(BUILD_STATIC_LIBRARY)')
1811
+ self.WriteLn()
1812
+
1813
+
1814
+ def WriteLn(self, text=''):
1815
+ self.fp.write(text + '\n')
1816
+
1817
+
1818
+ def GetSortedXcodeEnv(self, additional_settings=None):
1819
+ return gyp.xcode_emulation.GetSortedXcodeEnv(
1820
+ self.xcode_settings, "$(abs_builddir)",
1821
+ os.path.join("$(abs_srcdir)", self.path), "$(BUILDTYPE)",
1822
+ additional_settings)
1823
+
1824
+
1825
+ def GetSortedXcodePostbuildEnv(self):
1826
+ # CHROMIUM_STRIP_SAVE_FILE is a chromium-specific hack.
1827
+ # TODO(thakis): It would be nice to have some general mechanism instead.
1828
+ strip_save_file = self.xcode_settings.GetPerTargetSetting(
1829
+ 'CHROMIUM_STRIP_SAVE_FILE', '')
1830
+ # Even if strip_save_file is empty, explicitly write it. Else a postbuild
1831
+ # might pick up an export from an earlier target.
1832
+ return self.GetSortedXcodeEnv(
1833
+ additional_settings={'CHROMIUM_STRIP_SAVE_FILE': strip_save_file})
1834
+
1835
+
1836
+ def WriteSortedXcodeEnv(self, target, env):
1837
+ for k, v in env:
1838
+ # For
1839
+ # foo := a\ b
1840
+ # the escaped space does the right thing. For
1841
+ # export foo := a\ b
1842
+ # it does not -- the backslash is written to the env as literal character.
1843
+ # So don't escape spaces in |env[k]|.
1844
+ self.WriteLn('%s: export %s := %s' % (QuoteSpaces(target), k, v))
1845
+
1846
+
1847
+ def Objectify(self, path):
1848
+ """Convert a path to its output directory form."""
1849
+ if '$(' in path:
1850
+ path = path.replace('$(obj)/', '$(obj).%s/$(TARGET)/' % self.toolset)
1851
+ if not '$(obj)' in path:
1852
+ path = '$(obj).%s/$(TARGET)/%s' % (self.toolset, path)
1853
+ return path
1854
+
1855
+
1856
+ def Pchify(self, path, lang):
1857
+ """Convert a prefix header path to its output directory form."""
1858
+ path = self.Absolutify(path)
1859
+ if '$(' in path:
1860
+ path = path.replace('$(obj)/', '$(obj).%s/$(TARGET)/pch-%s' %
1861
+ (self.toolset, lang))
1862
+ return path
1863
+ return '$(obj).%s/$(TARGET)/pch-%s/%s' % (self.toolset, lang, path)
1864
+
1865
+
1866
+ def Absolutify(self, path):
1867
+ """Convert a subdirectory-relative path into a base-relative path.
1868
+ Skips over paths that contain variables."""
1869
+ if '$(' in path:
1870
+ # Don't call normpath in this case, as it might collapse the
1871
+ # path too aggressively if it features '..'. However it's still
1872
+ # important to strip trailing slashes.
1873
+ return path.rstrip('/')
1874
+ return os.path.normpath(os.path.join(self.path, path))
1875
+
1876
+
1877
+ def ExpandInputRoot(self, template, expansion, dirname):
1878
+ if '%(INPUT_ROOT)s' not in template and '%(INPUT_DIRNAME)s' not in template:
1879
+ return template
1880
+ path = template % {
1881
+ 'INPUT_ROOT': expansion,
1882
+ 'INPUT_DIRNAME': dirname,
1883
+ }
1884
+ return path
1885
+
1886
+
1887
+ def _InstallableTargetInstallPath(self):
1888
+ """Returns the location of the final output for an installable target."""
1889
+ # Xcode puts shared_library results into PRODUCT_DIR, and some gyp files
1890
+ # rely on this. Emulate this behavior for mac.
1891
+ if (self.type == 'shared_library' and
1892
+ (self.flavor != 'mac' or self.toolset != 'target')):
1893
+ # Install all shared libs into a common directory (per toolset) for
1894
+ # convenient access with LD_LIBRARY_PATH.
1895
+ return '$(builddir)/lib.%s/%s' % (self.toolset, self.alias)
1896
+ return '$(builddir)/' + self.alias
1897
+
1898
+
1899
+ def WriteAutoRegenerationRule(params, root_makefile, makefile_name,
1900
+ build_files):
1901
+ """Write the target to regenerate the Makefile."""
1902
+ options = params['options']
1903
+ build_files_args = [gyp.common.RelativePath(filename, options.toplevel_dir)
1904
+ for filename in params['build_files_arg']]
1905
+
1906
+ gyp_binary = gyp.common.FixIfRelativePath(params['gyp_binary'],
1907
+ options.toplevel_dir)
1908
+ if not gyp_binary.startswith(os.sep):
1909
+ gyp_binary = os.path.join('.', gyp_binary)
1910
+
1911
+ root_makefile.write(
1912
+ "quiet_cmd_regen_makefile = ACTION Regenerating $@\n"
1913
+ "cmd_regen_makefile = cd $(srcdir); %(cmd)s\n"
1914
+ "%(makefile_name)s: %(deps)s\n"
1915
+ "\t$(call do_cmd,regen_makefile)\n\n" % {
1916
+ 'makefile_name': makefile_name,
1917
+ 'deps': ' '.join(map(Sourceify, build_files)),
1918
+ 'cmd': gyp.common.EncodePOSIXShellList(
1919
+ [gyp_binary, '-fmake'] +
1920
+ gyp.RegenerateFlags(options) +
1921
+ build_files_args)})
1922
+
1923
+
1924
+ def PerformBuild(data, configurations, params):
1925
+ options = params['options']
1926
+ for config in configurations:
1927
+ arguments = ['make']
1928
+ if options.toplevel_dir and options.toplevel_dir != '.':
1929
+ arguments += '-C', options.toplevel_dir
1930
+ arguments.append('BUILDTYPE=' + config)
1931
+ print 'Building [%s]: %s' % (config, arguments)
1932
+ subprocess.check_call(arguments)
1933
+
1934
+
1935
+ def GenerateOutput(target_list, target_dicts, data, params):
1936
+ options = params['options']
1937
+ flavor = gyp.common.GetFlavor(params)
1938
+ generator_flags = params.get('generator_flags', {})
1939
+ builddir_name = generator_flags.get('output_dir', 'out')
1940
+ android_ndk_version = generator_flags.get('android_ndk_version', None)
1941
+ default_target = generator_flags.get('default_target', 'all')
1942
+
1943
+ def CalculateMakefilePath(build_file, base_name):
1944
+ """Determine where to write a Makefile for a given gyp file."""
1945
+ # Paths in gyp files are relative to the .gyp file, but we want
1946
+ # paths relative to the source root for the master makefile. Grab
1947
+ # the path of the .gyp file as the base to relativize against.
1948
+ # E.g. "foo/bar" when we're constructing targets for "foo/bar/baz.gyp".
1949
+ base_path = gyp.common.RelativePath(os.path.dirname(build_file),
1950
+ options.depth)
1951
+ # We write the file in the base_path directory.
1952
+ output_file = os.path.join(options.depth, base_path, base_name)
1953
+ if options.generator_output:
1954
+ output_file = os.path.join(
1955
+ options.depth, options.generator_output, base_path, base_name)
1956
+ base_path = gyp.common.RelativePath(os.path.dirname(build_file),
1957
+ options.toplevel_dir)
1958
+ return base_path, output_file
1959
+
1960
+ # TODO: search for the first non-'Default' target. This can go
1961
+ # away when we add verification that all targets have the
1962
+ # necessary configurations.
1963
+ default_configuration = None
1964
+ toolsets = set([target_dicts[target]['toolset'] for target in target_list])
1965
+ for target in target_list:
1966
+ spec = target_dicts[target]
1967
+ if spec['default_configuration'] != 'Default':
1968
+ default_configuration = spec['default_configuration']
1969
+ break
1970
+ if not default_configuration:
1971
+ default_configuration = 'Default'
1972
+
1973
+ srcdir = '.'
1974
+ makefile_name = 'Makefile' + options.suffix
1975
+ makefile_path = os.path.join(options.toplevel_dir, makefile_name)
1976
+ if options.generator_output:
1977
+ global srcdir_prefix
1978
+ makefile_path = os.path.join(
1979
+ options.toplevel_dir, options.generator_output, makefile_name)
1980
+ srcdir = gyp.common.RelativePath(srcdir, options.generator_output)
1981
+ srcdir_prefix = '$(srcdir)/'
1982
+
1983
+ flock_command= 'flock'
1984
+ header_params = {
1985
+ 'default_target': default_target,
1986
+ 'builddir': builddir_name,
1987
+ 'default_configuration': default_configuration,
1988
+ 'flock': flock_command,
1989
+ 'flock_index': 1,
1990
+ 'link_commands': LINK_COMMANDS_LINUX,
1991
+ 'extra_commands': '',
1992
+ 'srcdir': srcdir,
1993
+ }
1994
+ if flavor == 'mac':
1995
+ flock_command = './gyp-mac-tool flock'
1996
+ header_params.update({
1997
+ 'flock': flock_command,
1998
+ 'flock_index': 2,
1999
+ 'link_commands': LINK_COMMANDS_MAC,
2000
+ 'extra_commands': SHARED_HEADER_MAC_COMMANDS,
2001
+ })
2002
+ elif flavor == 'android':
2003
+ header_params.update({
2004
+ 'link_commands': LINK_COMMANDS_ANDROID,
2005
+ })
2006
+ elif flavor == 'solaris':
2007
+ header_params.update({
2008
+ 'flock': './gyp-flock-tool flock',
2009
+ 'flock_index': 2,
2010
+ })
2011
+ elif flavor == 'freebsd':
2012
+ # Note: OpenBSD has sysutils/flock. lockf seems to be FreeBSD specific.
2013
+ header_params.update({
2014
+ 'flock': 'lockf',
2015
+ })
2016
+ elif flavor == 'aix':
2017
+ header_params.update({
2018
+ 'link_commands': LINK_COMMANDS_AIX,
2019
+ 'flock': './gyp-flock-tool flock',
2020
+ 'flock_index': 2,
2021
+ })
2022
+
2023
+ header_params.update({
2024
+ 'CC.target': GetEnvironFallback(('CC_target', 'CC'), '$(CC)'),
2025
+ 'AR.target': GetEnvironFallback(('AR_target', 'AR'), '$(AR)'),
2026
+ 'CXX.target': GetEnvironFallback(('CXX_target', 'CXX'), '$(CXX)'),
2027
+ 'LINK.target': GetEnvironFallback(('LINK_target', 'LINK'), '$(LINK)'),
2028
+ 'CC.host': GetEnvironFallback(('CC_host',), 'gcc'),
2029
+ 'AR.host': GetEnvironFallback(('AR_host',), 'ar'),
2030
+ 'CXX.host': GetEnvironFallback(('CXX_host',), 'g++'),
2031
+ 'LINK.host': GetEnvironFallback(('LINK_host',), '$(CXX.host)'),
2032
+ })
2033
+
2034
+ build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0])
2035
+ make_global_settings_array = data[build_file].get('make_global_settings', [])
2036
+ wrappers = {}
2037
+ wrappers['LINK'] = '%s $(builddir)/linker.lock' % flock_command
2038
+ for key, value in make_global_settings_array:
2039
+ if key.endswith('_wrapper'):
2040
+ wrappers[key[:-len('_wrapper')]] = '$(abspath %s)' % value
2041
+ make_global_settings = ''
2042
+ for key, value in make_global_settings_array:
2043
+ if re.match('.*_wrapper', key):
2044
+ continue
2045
+ if value[0] != '$':
2046
+ value = '$(abspath %s)' % value
2047
+ wrapper = wrappers.get(key)
2048
+ if wrapper:
2049
+ value = '%s %s' % (wrapper, value)
2050
+ del wrappers[key]
2051
+ if key in ('CC', 'CC.host', 'CXX', 'CXX.host'):
2052
+ make_global_settings += (
2053
+ 'ifneq (,$(filter $(origin %s), undefined default))\n' % key)
2054
+ # Let gyp-time envvars win over global settings.
2055
+ env_key = key.replace('.', '_') # CC.host -> CC_host
2056
+ if env_key in os.environ:
2057
+ value = os.environ[env_key]
2058
+ make_global_settings += ' %s = %s\n' % (key, value)
2059
+ make_global_settings += 'endif\n'
2060
+ else:
2061
+ make_global_settings += '%s ?= %s\n' % (key, value)
2062
+ # TODO(ukai): define cmd when only wrapper is specified in
2063
+ # make_global_settings.
2064
+
2065
+ header_params['make_global_settings'] = make_global_settings
2066
+
2067
+ gyp.common.EnsureDirExists(makefile_path)
2068
+ root_makefile = open(makefile_path, 'w')
2069
+ root_makefile.write(SHARED_HEADER % header_params)
2070
+ # Currently any versions have the same effect, but in future the behavior
2071
+ # could be different.
2072
+ if android_ndk_version:
2073
+ root_makefile.write(
2074
+ '# Define LOCAL_PATH for build of Android applications.\n'
2075
+ 'LOCAL_PATH := $(call my-dir)\n'
2076
+ '\n')
2077
+ for toolset in toolsets:
2078
+ root_makefile.write('TOOLSET := %s\n' % toolset)
2079
+ WriteRootHeaderSuffixRules(root_makefile)
2080
+
2081
+ # Put build-time support tools next to the root Makefile.
2082
+ dest_path = os.path.dirname(makefile_path)
2083
+ gyp.common.CopyTool(flavor, dest_path)
2084
+
2085
+ # Find the list of targets that derive from the gyp file(s) being built.
2086
+ needed_targets = set()
2087
+ for build_file in params['build_files']:
2088
+ for target in gyp.common.AllTargets(target_list, target_dicts, build_file):
2089
+ needed_targets.add(target)
2090
+
2091
+ build_files = set()
2092
+ include_list = set()
2093
+ for qualified_target in target_list:
2094
+ build_file, target, toolset = gyp.common.ParseQualifiedTarget(
2095
+ qualified_target)
2096
+
2097
+ this_make_global_settings = data[build_file].get('make_global_settings', [])
2098
+ assert make_global_settings_array == this_make_global_settings, (
2099
+ "make_global_settings needs to be the same for all targets. %s vs. %s" %
2100
+ (this_make_global_settings, make_global_settings))
2101
+
2102
+ build_files.add(gyp.common.RelativePath(build_file, options.toplevel_dir))
2103
+ included_files = data[build_file]['included_files']
2104
+ for included_file in included_files:
2105
+ # The included_files entries are relative to the dir of the build file
2106
+ # that included them, so we have to undo that and then make them relative
2107
+ # to the root dir.
2108
+ relative_include_file = gyp.common.RelativePath(
2109
+ gyp.common.UnrelativePath(included_file, build_file),
2110
+ options.toplevel_dir)
2111
+ abs_include_file = os.path.abspath(relative_include_file)
2112
+ # If the include file is from the ~/.gyp dir, we should use absolute path
2113
+ # so that relocating the src dir doesn't break the path.
2114
+ if (params['home_dot_gyp'] and
2115
+ abs_include_file.startswith(params['home_dot_gyp'])):
2116
+ build_files.add(abs_include_file)
2117
+ else:
2118
+ build_files.add(relative_include_file)
2119
+
2120
+ base_path, output_file = CalculateMakefilePath(build_file,
2121
+ target + '.' + toolset + options.suffix + '.mk')
2122
+
2123
+ spec = target_dicts[qualified_target]
2124
+ configs = spec['configurations']
2125
+
2126
+ if flavor == 'mac':
2127
+ gyp.xcode_emulation.MergeGlobalXcodeSettingsToSpec(data[build_file], spec)
2128
+
2129
+ writer = MakefileWriter(generator_flags, flavor)
2130
+ writer.Write(qualified_target, base_path, output_file, spec, configs,
2131
+ part_of_all=qualified_target in needed_targets)
2132
+
2133
+ # Our root_makefile lives at the source root. Compute the relative path
2134
+ # from there to the output_file for including.
2135
+ mkfile_rel_path = gyp.common.RelativePath(output_file,
2136
+ os.path.dirname(makefile_path))
2137
+ include_list.add(mkfile_rel_path)
2138
+
2139
+ # Write out per-gyp (sub-project) Makefiles.
2140
+ depth_rel_path = gyp.common.RelativePath(options.depth, os.getcwd())
2141
+ for build_file in build_files:
2142
+ # The paths in build_files were relativized above, so undo that before
2143
+ # testing against the non-relativized items in target_list and before
2144
+ # calculating the Makefile path.
2145
+ build_file = os.path.join(depth_rel_path, build_file)
2146
+ gyp_targets = [target_dicts[target]['target_name'] for target in target_list
2147
+ if target.startswith(build_file) and
2148
+ target in needed_targets]
2149
+ # Only generate Makefiles for gyp files with targets.
2150
+ if not gyp_targets:
2151
+ continue
2152
+ base_path, output_file = CalculateMakefilePath(build_file,
2153
+ os.path.splitext(os.path.basename(build_file))[0] + '.Makefile')
2154
+ makefile_rel_path = gyp.common.RelativePath(os.path.dirname(makefile_path),
2155
+ os.path.dirname(output_file))
2156
+ writer.WriteSubMake(output_file, makefile_rel_path, gyp_targets,
2157
+ builddir_name)
2158
+
2159
+
2160
+ # Write out the sorted list of includes.
2161
+ root_makefile.write('\n')
2162
+ for include_file in sorted(include_list):
2163
+ # We wrap each .mk include in an if statement so users can tell make to
2164
+ # not load a file by setting NO_LOAD. The below make code says, only
2165
+ # load the .mk file if the .mk filename doesn't start with a token in
2166
+ # NO_LOAD.
2167
+ root_makefile.write(
2168
+ "ifeq ($(strip $(foreach prefix,$(NO_LOAD),\\\n"
2169
+ " $(findstring $(join ^,$(prefix)),\\\n"
2170
+ " $(join ^," + include_file + ")))),)\n")
2171
+ root_makefile.write(" include " + include_file + "\n")
2172
+ root_makefile.write("endif\n")
2173
+ root_makefile.write('\n')
2174
+
2175
+ if (not generator_flags.get('standalone')
2176
+ and generator_flags.get('auto_regeneration', True)):
2177
+ WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files)
2178
+
2179
+ root_makefile.write(SHARED_FOOTER)
2180
+
2181
+ root_makefile.close()