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,23 @@
1
+ #!/usr/bin/env python
2
+
3
+ # Copyright (c) 2013 Google Inc. All rights reserved.
4
+ # Use of this source code is governed by a BSD-style license that can be
5
+ # found in the LICENSE file.
6
+
7
+ """ Unit tests for the xcode.py file. """
8
+
9
+ import gyp.generator.xcode as xcode
10
+ import unittest
11
+ import sys
12
+
13
+
14
+ class TestEscapeXcodeDefine(unittest.TestCase):
15
+ if sys.platform == 'darwin':
16
+ def test_InheritedRemainsUnescaped(self):
17
+ self.assertEqual(xcode.EscapeXcodeDefine('$(inherited)'), '$(inherited)')
18
+
19
+ def test_Escaping(self):
20
+ self.assertEqual(xcode.EscapeXcodeDefine('a b"c\\'), 'a\\ b\\"c\\\\')
21
+
22
+ if __name__ == '__main__':
23
+ unittest.main()
@@ -0,0 +1,2809 @@
1
+ # Copyright (c) 2012 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
+ from compiler.ast import Const
6
+ from compiler.ast import Dict
7
+ from compiler.ast import Discard
8
+ from compiler.ast import List
9
+ from compiler.ast import Module
10
+ from compiler.ast import Node
11
+ from compiler.ast import Stmt
12
+ import compiler
13
+ import copy
14
+ import gyp.common
15
+ import multiprocessing
16
+ import optparse
17
+ import os.path
18
+ import re
19
+ import shlex
20
+ import signal
21
+ import subprocess
22
+ import sys
23
+ import threading
24
+ import time
25
+ import traceback
26
+ from gyp.common import GypError
27
+
28
+
29
+ # A list of types that are treated as linkable.
30
+ linkable_types = ['executable', 'shared_library', 'loadable_module']
31
+
32
+ # A list of sections that contain links to other targets.
33
+ dependency_sections = ['dependencies', 'export_dependent_settings']
34
+
35
+ # base_path_sections is a list of sections defined by GYP that contain
36
+ # pathnames. The generators can provide more keys, the two lists are merged
37
+ # into path_sections, but you should call IsPathSection instead of using either
38
+ # list directly.
39
+ base_path_sections = [
40
+ 'destination',
41
+ 'files',
42
+ 'include_dirs',
43
+ 'inputs',
44
+ 'libraries',
45
+ 'outputs',
46
+ 'sources',
47
+ ]
48
+ path_sections = []
49
+
50
+ is_path_section_charset = set('=+?!')
51
+ is_path_section_match_re = re.compile('_(dir|file|path)s?$')
52
+
53
+ def IsPathSection(section):
54
+ # If section ends in one of these characters, it's applied to a section
55
+ # without the trailing characters. '/' is notably absent from this list,
56
+ # because there's no way for a regular expression to be treated as a path.
57
+ while section[-1:] in is_path_section_charset:
58
+ section = section[:-1]
59
+ return section in path_sections or is_path_section_match_re.search(section)
60
+
61
+ # base_non_configuration_keys is a list of key names that belong in the target
62
+ # itself and should not be propagated into its configurations. It is merged
63
+ # with a list that can come from the generator to
64
+ # create non_configuration_keys.
65
+ base_non_configuration_keys = [
66
+ # Sections that must exist inside targets and not configurations.
67
+ 'actions',
68
+ 'configurations',
69
+ 'copies',
70
+ 'default_configuration',
71
+ 'dependencies',
72
+ 'dependencies_original',
73
+ 'libraries',
74
+ 'postbuilds',
75
+ 'product_dir',
76
+ 'product_extension',
77
+ 'product_name',
78
+ 'product_prefix',
79
+ 'rules',
80
+ 'run_as',
81
+ 'sources',
82
+ 'standalone_static_library',
83
+ 'suppress_wildcard',
84
+ 'target_name',
85
+ 'toolset',
86
+ 'toolsets',
87
+ 'type',
88
+
89
+ # Sections that can be found inside targets or configurations, but that
90
+ # should not be propagated from targets into their configurations.
91
+ 'variables',
92
+ ]
93
+ non_configuration_keys = []
94
+
95
+ # Keys that do not belong inside a configuration dictionary.
96
+ invalid_configuration_keys = [
97
+ 'actions',
98
+ 'all_dependent_settings',
99
+ 'configurations',
100
+ 'dependencies',
101
+ 'direct_dependent_settings',
102
+ 'libraries',
103
+ 'link_settings',
104
+ 'sources',
105
+ 'standalone_static_library',
106
+ 'target_name',
107
+ 'type',
108
+ ]
109
+
110
+ # Controls whether or not the generator supports multiple toolsets.
111
+ multiple_toolsets = False
112
+
113
+ # Paths for converting filelist paths to output paths: {
114
+ # toplevel,
115
+ # qualified_output_dir,
116
+ # }
117
+ generator_filelist_paths = None
118
+
119
+ def GetIncludedBuildFiles(build_file_path, aux_data, included=None):
120
+ """Return a list of all build files included into build_file_path.
121
+
122
+ The returned list will contain build_file_path as well as all other files
123
+ that it included, either directly or indirectly. Note that the list may
124
+ contain files that were included into a conditional section that evaluated
125
+ to false and was not merged into build_file_path's dict.
126
+
127
+ aux_data is a dict containing a key for each build file or included build
128
+ file. Those keys provide access to dicts whose "included" keys contain
129
+ lists of all other files included by the build file.
130
+
131
+ included should be left at its default None value by external callers. It
132
+ is used for recursion.
133
+
134
+ The returned list will not contain any duplicate entries. Each build file
135
+ in the list will be relative to the current directory.
136
+ """
137
+
138
+ if included == None:
139
+ included = []
140
+
141
+ if build_file_path in included:
142
+ return included
143
+
144
+ included.append(build_file_path)
145
+
146
+ for included_build_file in aux_data[build_file_path].get('included', []):
147
+ GetIncludedBuildFiles(included_build_file, aux_data, included)
148
+
149
+ return included
150
+
151
+
152
+ def CheckedEval(file_contents):
153
+ """Return the eval of a gyp file.
154
+
155
+ The gyp file is restricted to dictionaries and lists only, and
156
+ repeated keys are not allowed.
157
+
158
+ Note that this is slower than eval() is.
159
+ """
160
+
161
+ ast = compiler.parse(file_contents)
162
+ assert isinstance(ast, Module)
163
+ c1 = ast.getChildren()
164
+ assert c1[0] is None
165
+ assert isinstance(c1[1], Stmt)
166
+ c2 = c1[1].getChildren()
167
+ assert isinstance(c2[0], Discard)
168
+ c3 = c2[0].getChildren()
169
+ assert len(c3) == 1
170
+ return CheckNode(c3[0], [])
171
+
172
+
173
+ def CheckNode(node, keypath):
174
+ if isinstance(node, Dict):
175
+ c = node.getChildren()
176
+ dict = {}
177
+ for n in range(0, len(c), 2):
178
+ assert isinstance(c[n], Const)
179
+ key = c[n].getChildren()[0]
180
+ if key in dict:
181
+ raise GypError("Key '" + key + "' repeated at level " +
182
+ repr(len(keypath) + 1) + " with key path '" +
183
+ '.'.join(keypath) + "'")
184
+ kp = list(keypath) # Make a copy of the list for descending this node.
185
+ kp.append(key)
186
+ dict[key] = CheckNode(c[n + 1], kp)
187
+ return dict
188
+ elif isinstance(node, List):
189
+ c = node.getChildren()
190
+ children = []
191
+ for index, child in enumerate(c):
192
+ kp = list(keypath) # Copy list.
193
+ kp.append(repr(index))
194
+ children.append(CheckNode(child, kp))
195
+ return children
196
+ elif isinstance(node, Const):
197
+ return node.getChildren()[0]
198
+ else:
199
+ raise TypeError, "Unknown AST node at key path '" + '.'.join(keypath) + \
200
+ "': " + repr(node)
201
+
202
+
203
+ def LoadOneBuildFile(build_file_path, data, aux_data, variables, includes,
204
+ is_target, check):
205
+ if build_file_path in data:
206
+ return data[build_file_path]
207
+
208
+ if os.path.exists(build_file_path):
209
+ build_file_contents = open(build_file_path).read()
210
+ else:
211
+ raise GypError("%s not found (cwd: %s)" % (build_file_path, os.getcwd()))
212
+
213
+ build_file_data = None
214
+ try:
215
+ if check:
216
+ build_file_data = CheckedEval(build_file_contents)
217
+ else:
218
+ build_file_data = eval(build_file_contents, {'__builtins__': None},
219
+ None)
220
+ except SyntaxError, e:
221
+ e.filename = build_file_path
222
+ raise
223
+ except Exception, e:
224
+ gyp.common.ExceptionAppend(e, 'while reading ' + build_file_path)
225
+ raise
226
+
227
+ if not isinstance(build_file_data, dict):
228
+ raise GypError("%s does not evaluate to a dictionary." % build_file_path)
229
+
230
+ data[build_file_path] = build_file_data
231
+ aux_data[build_file_path] = {}
232
+
233
+ # Scan for includes and merge them in.
234
+ if ('skip_includes' not in build_file_data or
235
+ not build_file_data['skip_includes']):
236
+ try:
237
+ if is_target:
238
+ LoadBuildFileIncludesIntoDict(build_file_data, build_file_path, data,
239
+ aux_data, variables, includes, check)
240
+ else:
241
+ LoadBuildFileIncludesIntoDict(build_file_data, build_file_path, data,
242
+ aux_data, variables, None, check)
243
+ except Exception, e:
244
+ gyp.common.ExceptionAppend(e,
245
+ 'while reading includes of ' + build_file_path)
246
+ raise
247
+
248
+ return build_file_data
249
+
250
+
251
+ def LoadBuildFileIncludesIntoDict(subdict, subdict_path, data, aux_data,
252
+ variables, includes, check):
253
+ includes_list = []
254
+ if includes != None:
255
+ includes_list.extend(includes)
256
+ if 'includes' in subdict:
257
+ for include in subdict['includes']:
258
+ # "include" is specified relative to subdict_path, so compute the real
259
+ # path to include by appending the provided "include" to the directory
260
+ # in which subdict_path resides.
261
+ relative_include = \
262
+ os.path.normpath(os.path.join(os.path.dirname(subdict_path), include))
263
+ includes_list.append(relative_include)
264
+ # Unhook the includes list, it's no longer needed.
265
+ del subdict['includes']
266
+
267
+ # Merge in the included files.
268
+ for include in includes_list:
269
+ if not 'included' in aux_data[subdict_path]:
270
+ aux_data[subdict_path]['included'] = []
271
+ aux_data[subdict_path]['included'].append(include)
272
+
273
+ gyp.DebugOutput(gyp.DEBUG_INCLUDES, "Loading Included File: '%s'", include)
274
+
275
+ MergeDicts(subdict,
276
+ LoadOneBuildFile(include, data, aux_data, variables, None,
277
+ False, check),
278
+ subdict_path, include)
279
+
280
+ # Recurse into subdictionaries.
281
+ for k, v in subdict.iteritems():
282
+ if v.__class__ == dict:
283
+ LoadBuildFileIncludesIntoDict(v, subdict_path, data, aux_data, variables,
284
+ None, check)
285
+ elif v.__class__ == list:
286
+ LoadBuildFileIncludesIntoList(v, subdict_path, data, aux_data, variables,
287
+ check)
288
+
289
+
290
+ # This recurses into lists so that it can look for dicts.
291
+ def LoadBuildFileIncludesIntoList(sublist, sublist_path, data, aux_data,
292
+ variables, check):
293
+ for item in sublist:
294
+ if item.__class__ == dict:
295
+ LoadBuildFileIncludesIntoDict(item, sublist_path, data, aux_data,
296
+ variables, None, check)
297
+ elif item.__class__ == list:
298
+ LoadBuildFileIncludesIntoList(item, sublist_path, data, aux_data,
299
+ variables, check)
300
+
301
+ # Processes toolsets in all the targets. This recurses into condition entries
302
+ # since they can contain toolsets as well.
303
+ def ProcessToolsetsInDict(data):
304
+ if 'targets' in data:
305
+ target_list = data['targets']
306
+ new_target_list = []
307
+ for target in target_list:
308
+ # If this target already has an explicit 'toolset', and no 'toolsets'
309
+ # list, don't modify it further.
310
+ if 'toolset' in target and 'toolsets' not in target:
311
+ new_target_list.append(target)
312
+ continue
313
+ if multiple_toolsets:
314
+ toolsets = target.get('toolsets', ['target'])
315
+ else:
316
+ toolsets = ['target']
317
+ # Make sure this 'toolsets' definition is only processed once.
318
+ if 'toolsets' in target:
319
+ del target['toolsets']
320
+ if len(toolsets) > 0:
321
+ # Optimization: only do copies if more than one toolset is specified.
322
+ for build in toolsets[1:]:
323
+ new_target = copy.deepcopy(target)
324
+ new_target['toolset'] = build
325
+ new_target_list.append(new_target)
326
+ target['toolset'] = toolsets[0]
327
+ new_target_list.append(target)
328
+ data['targets'] = new_target_list
329
+ if 'conditions' in data:
330
+ for condition in data['conditions']:
331
+ if isinstance(condition, list):
332
+ for condition_dict in condition[1:]:
333
+ ProcessToolsetsInDict(condition_dict)
334
+
335
+
336
+ # TODO(mark): I don't love this name. It just means that it's going to load
337
+ # a build file that contains targets and is expected to provide a targets dict
338
+ # that contains the targets...
339
+ def LoadTargetBuildFile(build_file_path, data, aux_data, variables, includes,
340
+ depth, check, load_dependencies):
341
+ # If depth is set, predefine the DEPTH variable to be a relative path from
342
+ # this build file's directory to the directory identified by depth.
343
+ if depth:
344
+ # TODO(dglazkov) The backslash/forward-slash replacement at the end is a
345
+ # temporary measure. This should really be addressed by keeping all paths
346
+ # in POSIX until actual project generation.
347
+ d = gyp.common.RelativePath(depth, os.path.dirname(build_file_path))
348
+ if d == '':
349
+ variables['DEPTH'] = '.'
350
+ else:
351
+ variables['DEPTH'] = d.replace('\\', '/')
352
+
353
+ if build_file_path in data['target_build_files']:
354
+ # Already loaded.
355
+ return False
356
+ data['target_build_files'].add(build_file_path)
357
+
358
+ gyp.DebugOutput(gyp.DEBUG_INCLUDES,
359
+ "Loading Target Build File '%s'", build_file_path)
360
+
361
+ build_file_data = LoadOneBuildFile(build_file_path, data, aux_data, variables,
362
+ includes, True, check)
363
+
364
+ # Store DEPTH for later use in generators.
365
+ build_file_data['_DEPTH'] = depth
366
+
367
+ # Set up the included_files key indicating which .gyp files contributed to
368
+ # this target dict.
369
+ if 'included_files' in build_file_data:
370
+ raise GypError(build_file_path + ' must not contain included_files key')
371
+
372
+ included = GetIncludedBuildFiles(build_file_path, aux_data)
373
+ build_file_data['included_files'] = []
374
+ for included_file in included:
375
+ # included_file is relative to the current directory, but it needs to
376
+ # be made relative to build_file_path's directory.
377
+ included_relative = \
378
+ gyp.common.RelativePath(included_file,
379
+ os.path.dirname(build_file_path))
380
+ build_file_data['included_files'].append(included_relative)
381
+
382
+ # Do a first round of toolsets expansion so that conditions can be defined
383
+ # per toolset.
384
+ ProcessToolsetsInDict(build_file_data)
385
+
386
+ # Apply "pre"/"early" variable expansions and condition evaluations.
387
+ ProcessVariablesAndConditionsInDict(
388
+ build_file_data, PHASE_EARLY, variables, build_file_path)
389
+
390
+ # Since some toolsets might have been defined conditionally, perform
391
+ # a second round of toolsets expansion now.
392
+ ProcessToolsetsInDict(build_file_data)
393
+
394
+ # Look at each project's target_defaults dict, and merge settings into
395
+ # targets.
396
+ if 'target_defaults' in build_file_data:
397
+ if 'targets' not in build_file_data:
398
+ raise GypError("Unable to find targets in build file %s" %
399
+ build_file_path)
400
+
401
+ index = 0
402
+ while index < len(build_file_data['targets']):
403
+ # This procedure needs to give the impression that target_defaults is
404
+ # used as defaults, and the individual targets inherit from that.
405
+ # The individual targets need to be merged into the defaults. Make
406
+ # a deep copy of the defaults for each target, merge the target dict
407
+ # as found in the input file into that copy, and then hook up the
408
+ # copy with the target-specific data merged into it as the replacement
409
+ # target dict.
410
+ old_target_dict = build_file_data['targets'][index]
411
+ new_target_dict = copy.deepcopy(build_file_data['target_defaults'])
412
+ MergeDicts(new_target_dict, old_target_dict,
413
+ build_file_path, build_file_path)
414
+ build_file_data['targets'][index] = new_target_dict
415
+ index += 1
416
+
417
+ # No longer needed.
418
+ del build_file_data['target_defaults']
419
+
420
+ # Look for dependencies. This means that dependency resolution occurs
421
+ # after "pre" conditionals and variable expansion, but before "post" -
422
+ # in other words, you can't put a "dependencies" section inside a "post"
423
+ # conditional within a target.
424
+
425
+ dependencies = []
426
+ if 'targets' in build_file_data:
427
+ for target_dict in build_file_data['targets']:
428
+ if 'dependencies' not in target_dict:
429
+ continue
430
+ for dependency in target_dict['dependencies']:
431
+ dependencies.append(
432
+ gyp.common.ResolveTarget(build_file_path, dependency, None)[0])
433
+
434
+ if load_dependencies:
435
+ for dependency in dependencies:
436
+ try:
437
+ LoadTargetBuildFile(dependency, data, aux_data, variables,
438
+ includes, depth, check, load_dependencies)
439
+ except Exception, e:
440
+ gyp.common.ExceptionAppend(
441
+ e, 'while loading dependencies of %s' % build_file_path)
442
+ raise
443
+ else:
444
+ return (build_file_path, dependencies)
445
+
446
+
447
+ def CallLoadTargetBuildFile(global_flags,
448
+ build_file_path, data,
449
+ aux_data, variables,
450
+ includes, depth, check,
451
+ generator_input_info):
452
+ """Wrapper around LoadTargetBuildFile for parallel processing.
453
+
454
+ This wrapper is used when LoadTargetBuildFile is executed in
455
+ a worker process.
456
+ """
457
+
458
+ try:
459
+ signal.signal(signal.SIGINT, signal.SIG_IGN)
460
+
461
+ # Apply globals so that the worker process behaves the same.
462
+ for key, value in global_flags.iteritems():
463
+ globals()[key] = value
464
+
465
+ # Save the keys so we can return data that changed.
466
+ data_keys = set(data)
467
+ aux_data_keys = set(aux_data)
468
+
469
+ SetGeneratorGlobals(generator_input_info)
470
+ result = LoadTargetBuildFile(build_file_path, data,
471
+ aux_data, variables,
472
+ includes, depth, check, False)
473
+ if not result:
474
+ return result
475
+
476
+ (build_file_path, dependencies) = result
477
+
478
+ data_out = {}
479
+ for key in data:
480
+ if key == 'target_build_files':
481
+ continue
482
+ if key not in data_keys:
483
+ data_out[key] = data[key]
484
+ aux_data_out = {}
485
+ for key in aux_data:
486
+ if key not in aux_data_keys:
487
+ aux_data_out[key] = aux_data[key]
488
+
489
+ # This gets serialized and sent back to the main process via a pipe.
490
+ # It's handled in LoadTargetBuildFileCallback.
491
+ return (build_file_path,
492
+ data_out,
493
+ aux_data_out,
494
+ dependencies)
495
+ except GypError, e:
496
+ sys.stderr.write("gyp: %s\n" % e)
497
+ return None
498
+ except Exception, e:
499
+ print >>sys.stderr, 'Exception:', e
500
+ print >>sys.stderr, traceback.format_exc()
501
+ return None
502
+
503
+
504
+ class ParallelProcessingError(Exception):
505
+ pass
506
+
507
+
508
+ class ParallelState(object):
509
+ """Class to keep track of state when processing input files in parallel.
510
+
511
+ If build files are loaded in parallel, use this to keep track of
512
+ state during farming out and processing parallel jobs. It's stored
513
+ in a global so that the callback function can have access to it.
514
+ """
515
+
516
+ def __init__(self):
517
+ # The multiprocessing pool.
518
+ self.pool = None
519
+ # The condition variable used to protect this object and notify
520
+ # the main loop when there might be more data to process.
521
+ self.condition = None
522
+ # The "data" dict that was passed to LoadTargetBuildFileParallel
523
+ self.data = None
524
+ # The "aux_data" dict that was passed to LoadTargetBuildFileParallel
525
+ self.aux_data = None
526
+ # The number of parallel calls outstanding; decremented when a response
527
+ # was received.
528
+ self.pending = 0
529
+ # The set of all build files that have been scheduled, so we don't
530
+ # schedule the same one twice.
531
+ self.scheduled = set()
532
+ # A list of dependency build file paths that haven't been scheduled yet.
533
+ self.dependencies = []
534
+ # Flag to indicate if there was an error in a child process.
535
+ self.error = False
536
+
537
+ def LoadTargetBuildFileCallback(self, result):
538
+ """Handle the results of running LoadTargetBuildFile in another process.
539
+ """
540
+ self.condition.acquire()
541
+ if not result:
542
+ self.error = True
543
+ self.condition.notify()
544
+ self.condition.release()
545
+ return
546
+ (build_file_path0, data0, aux_data0, dependencies0) = result
547
+ self.data['target_build_files'].add(build_file_path0)
548
+ for key in data0:
549
+ self.data[key] = data0[key]
550
+ for key in aux_data0:
551
+ self.aux_data[key] = aux_data0[key]
552
+ for new_dependency in dependencies0:
553
+ if new_dependency not in self.scheduled:
554
+ self.scheduled.add(new_dependency)
555
+ self.dependencies.append(new_dependency)
556
+ self.pending -= 1
557
+ self.condition.notify()
558
+ self.condition.release()
559
+
560
+
561
+ def LoadTargetBuildFilesParallel(build_files, data, aux_data,
562
+ variables, includes, depth, check,
563
+ generator_input_info):
564
+ parallel_state = ParallelState()
565
+ parallel_state.condition = threading.Condition()
566
+ # Make copies of the build_files argument that we can modify while working.
567
+ parallel_state.dependencies = list(build_files)
568
+ parallel_state.scheduled = set(build_files)
569
+ parallel_state.pending = 0
570
+ parallel_state.data = data
571
+ parallel_state.aux_data = aux_data
572
+
573
+ try:
574
+ parallel_state.condition.acquire()
575
+ while parallel_state.dependencies or parallel_state.pending:
576
+ if parallel_state.error:
577
+ break
578
+ if not parallel_state.dependencies:
579
+ parallel_state.condition.wait()
580
+ continue
581
+
582
+ dependency = parallel_state.dependencies.pop()
583
+
584
+ parallel_state.pending += 1
585
+ data_in = {}
586
+ data_in['target_build_files'] = data['target_build_files']
587
+ aux_data_in = {}
588
+ global_flags = {
589
+ 'path_sections': globals()['path_sections'],
590
+ 'non_configuration_keys': globals()['non_configuration_keys'],
591
+ 'multiple_toolsets': globals()['multiple_toolsets']}
592
+
593
+ if not parallel_state.pool:
594
+ parallel_state.pool = multiprocessing.Pool(8)
595
+ parallel_state.pool.apply_async(
596
+ CallLoadTargetBuildFile,
597
+ args = (global_flags, dependency,
598
+ data_in, aux_data_in,
599
+ variables, includes, depth, check, generator_input_info),
600
+ callback = parallel_state.LoadTargetBuildFileCallback)
601
+ except KeyboardInterrupt, e:
602
+ parallel_state.pool.terminate()
603
+ raise e
604
+
605
+ parallel_state.condition.release()
606
+
607
+ parallel_state.pool.close()
608
+ parallel_state.pool.join()
609
+ parallel_state.pool = None
610
+
611
+ if parallel_state.error:
612
+ sys.exit(1)
613
+
614
+ # Look for the bracket that matches the first bracket seen in a
615
+ # string, and return the start and end as a tuple. For example, if
616
+ # the input is something like "<(foo <(bar)) blah", then it would
617
+ # return (1, 13), indicating the entire string except for the leading
618
+ # "<" and trailing " blah".
619
+ LBRACKETS= set('{[(')
620
+ BRACKETS = {'}': '{', ']': '[', ')': '('}
621
+ def FindEnclosingBracketGroup(input_str):
622
+ stack = []
623
+ start = -1
624
+ for index, char in enumerate(input_str):
625
+ if char in LBRACKETS:
626
+ stack.append(char)
627
+ if start == -1:
628
+ start = index
629
+ elif char in BRACKETS:
630
+ if not stack:
631
+ return (-1, -1)
632
+ if stack.pop() != BRACKETS[char]:
633
+ return (-1, -1)
634
+ if not stack:
635
+ return (start, index + 1)
636
+ return (-1, -1)
637
+
638
+
639
+ canonical_int_re = re.compile('(0|-?[1-9][0-9]*)$')
640
+
641
+
642
+ def IsStrCanonicalInt(string):
643
+ """Returns True if |string| is in its canonical integer form.
644
+
645
+ The canonical form is such that str(int(string)) == string.
646
+ """
647
+ return isinstance(string, str) and canonical_int_re.match(string)
648
+
649
+
650
+ # This matches things like "<(asdf)", "<!(cmd)", "<!@(cmd)", "<|(list)",
651
+ # "<!interpreter(arguments)", "<([list])", and even "<([)" and "<(<())".
652
+ # In the last case, the inner "<()" is captured in match['content'].
653
+ early_variable_re = re.compile(
654
+ '(?P<replace>(?P<type><(?:(?:!?@?)|\|)?)'
655
+ '(?P<command_string>[-a-zA-Z0-9_.]+)?'
656
+ '\((?P<is_array>\s*\[?)'
657
+ '(?P<content>.*?)(\]?)\))')
658
+
659
+ # This matches the same as early_variable_re, but with '>' instead of '<'.
660
+ late_variable_re = re.compile(
661
+ '(?P<replace>(?P<type>>(?:(?:!?@?)|\|)?)'
662
+ '(?P<command_string>[-a-zA-Z0-9_.]+)?'
663
+ '\((?P<is_array>\s*\[?)'
664
+ '(?P<content>.*?)(\]?)\))')
665
+
666
+ # This matches the same as early_variable_re, but with '^' instead of '<'.
667
+ latelate_variable_re = re.compile(
668
+ '(?P<replace>(?P<type>[\^](?:(?:!?@?)|\|)?)'
669
+ '(?P<command_string>[-a-zA-Z0-9_.]+)?'
670
+ '\((?P<is_array>\s*\[?)'
671
+ '(?P<content>.*?)(\]?)\))')
672
+
673
+ # Global cache of results from running commands so they don't have to be run
674
+ # more then once.
675
+ cached_command_results = {}
676
+
677
+
678
+ def FixupPlatformCommand(cmd):
679
+ if sys.platform == 'win32':
680
+ if type(cmd) == list:
681
+ cmd = [re.sub('^cat ', 'type ', cmd[0])] + cmd[1:]
682
+ else:
683
+ cmd = re.sub('^cat ', 'type ', cmd)
684
+ return cmd
685
+
686
+
687
+ PHASE_EARLY = 0
688
+ PHASE_LATE = 1
689
+ PHASE_LATELATE = 2
690
+
691
+
692
+ def ExpandVariables(input, phase, variables, build_file):
693
+ # Look for the pattern that gets expanded into variables
694
+ if phase == PHASE_EARLY:
695
+ variable_re = early_variable_re
696
+ expansion_symbol = '<'
697
+ elif phase == PHASE_LATE:
698
+ variable_re = late_variable_re
699
+ expansion_symbol = '>'
700
+ elif phase == PHASE_LATELATE:
701
+ variable_re = latelate_variable_re
702
+ expansion_symbol = '^'
703
+ else:
704
+ assert False
705
+
706
+ input_str = str(input)
707
+ if IsStrCanonicalInt(input_str):
708
+ return int(input_str)
709
+
710
+ # Do a quick scan to determine if an expensive regex search is warranted.
711
+ if expansion_symbol not in input_str:
712
+ return input_str
713
+
714
+ # Get the entire list of matches as a list of MatchObject instances.
715
+ # (using findall here would return strings instead of MatchObjects).
716
+ matches = list(variable_re.finditer(input_str))
717
+ if not matches:
718
+ return input_str
719
+
720
+ output = input_str
721
+ # Reverse the list of matches so that replacements are done right-to-left.
722
+ # That ensures that earlier replacements won't mess up the string in a
723
+ # way that causes later calls to find the earlier substituted text instead
724
+ # of what's intended for replacement.
725
+ matches.reverse()
726
+ for match_group in matches:
727
+ match = match_group.groupdict()
728
+ gyp.DebugOutput(gyp.DEBUG_VARIABLES, "Matches: %r", match)
729
+ # match['replace'] is the substring to look for, match['type']
730
+ # is the character code for the replacement type (< > <! >! <| >| <@
731
+ # >@ <!@ >!@), match['is_array'] contains a '[' for command
732
+ # arrays, and match['content'] is the name of the variable (< >)
733
+ # or command to run (<! >!). match['command_string'] is an optional
734
+ # command string. Currently, only 'pymod_do_main' is supported.
735
+
736
+ # run_command is true if a ! variant is used.
737
+ run_command = '!' in match['type']
738
+ command_string = match['command_string']
739
+
740
+ # file_list is true if a | variant is used.
741
+ file_list = '|' in match['type']
742
+
743
+ # Capture these now so we can adjust them later.
744
+ replace_start = match_group.start('replace')
745
+ replace_end = match_group.end('replace')
746
+
747
+ # Find the ending paren, and re-evaluate the contained string.
748
+ (c_start, c_end) = FindEnclosingBracketGroup(input_str[replace_start:])
749
+
750
+ # Adjust the replacement range to match the entire command
751
+ # found by FindEnclosingBracketGroup (since the variable_re
752
+ # probably doesn't match the entire command if it contained
753
+ # nested variables).
754
+ replace_end = replace_start + c_end
755
+
756
+ # Find the "real" replacement, matching the appropriate closing
757
+ # paren, and adjust the replacement start and end.
758
+ replacement = input_str[replace_start:replace_end]
759
+
760
+ # Figure out what the contents of the variable parens are.
761
+ contents_start = replace_start + c_start + 1
762
+ contents_end = replace_end - 1
763
+ contents = input_str[contents_start:contents_end]
764
+
765
+ # Do filter substitution now for <|().
766
+ # Admittedly, this is different than the evaluation order in other
767
+ # contexts. However, since filtration has no chance to run on <|(),
768
+ # this seems like the only obvious way to give them access to filters.
769
+ if file_list:
770
+ processed_variables = copy.deepcopy(variables)
771
+ ProcessListFiltersInDict(contents, processed_variables)
772
+ # Recurse to expand variables in the contents
773
+ contents = ExpandVariables(contents, phase,
774
+ processed_variables, build_file)
775
+ else:
776
+ # Recurse to expand variables in the contents
777
+ contents = ExpandVariables(contents, phase, variables, build_file)
778
+
779
+ # Strip off leading/trailing whitespace so that variable matches are
780
+ # simpler below (and because they are rarely needed).
781
+ contents = contents.strip()
782
+
783
+ # expand_to_list is true if an @ variant is used. In that case,
784
+ # the expansion should result in a list. Note that the caller
785
+ # is to be expecting a list in return, and not all callers do
786
+ # because not all are working in list context. Also, for list
787
+ # expansions, there can be no other text besides the variable
788
+ # expansion in the input string.
789
+ expand_to_list = '@' in match['type'] and input_str == replacement
790
+
791
+ if run_command or file_list:
792
+ # Find the build file's directory, so commands can be run or file lists
793
+ # generated relative to it.
794
+ build_file_dir = os.path.dirname(build_file)
795
+ if build_file_dir == '' and not file_list:
796
+ # If build_file is just a leaf filename indicating a file in the
797
+ # current directory, build_file_dir might be an empty string. Set
798
+ # it to None to signal to subprocess.Popen that it should run the
799
+ # command in the current directory.
800
+ build_file_dir = None
801
+
802
+ # Support <|(listfile.txt ...) which generates a file
803
+ # containing items from a gyp list, generated at gyp time.
804
+ # This works around actions/rules which have more inputs than will
805
+ # fit on the command line.
806
+ if file_list:
807
+ if type(contents) == list:
808
+ contents_list = contents
809
+ else:
810
+ contents_list = contents.split(' ')
811
+ replacement = contents_list[0]
812
+ if os.path.isabs(replacement):
813
+ raise GypError('| cannot handle absolute paths, got "%s"' % replacement)
814
+
815
+ if not generator_filelist_paths:
816
+ path = os.path.join(build_file_dir, replacement)
817
+ else:
818
+ if os.path.isabs(build_file_dir):
819
+ toplevel = generator_filelist_paths['toplevel']
820
+ rel_build_file_dir = gyp.common.RelativePath(build_file_dir, toplevel)
821
+ else:
822
+ rel_build_file_dir = build_file_dir
823
+ qualified_out_dir = generator_filelist_paths['qualified_out_dir']
824
+ path = os.path.join(qualified_out_dir, rel_build_file_dir, replacement)
825
+ gyp.common.EnsureDirExists(path)
826
+
827
+ replacement = gyp.common.RelativePath(path, build_file_dir)
828
+ f = gyp.common.WriteOnDiff(path)
829
+ for i in contents_list[1:]:
830
+ f.write('%s\n' % i)
831
+ f.close()
832
+
833
+ elif run_command:
834
+ use_shell = True
835
+ if match['is_array']:
836
+ contents = eval(contents)
837
+ use_shell = False
838
+
839
+ # Check for a cached value to avoid executing commands, or generating
840
+ # file lists more than once.
841
+ # TODO(http://code.google.com/p/gyp/issues/detail?id=112): It is
842
+ # possible that the command being invoked depends on the current
843
+ # directory. For that case the syntax needs to be extended so that the
844
+ # directory is also used in cache_key (it becomes a tuple).
845
+ # TODO(http://code.google.com/p/gyp/issues/detail?id=111): In theory,
846
+ # someone could author a set of GYP files where each time the command
847
+ # is invoked it produces different output by design. When the need
848
+ # arises, the syntax should be extended to support no caching off a
849
+ # command's output so it is run every time.
850
+ cache_key = str(contents)
851
+ cached_value = cached_command_results.get(cache_key, None)
852
+ if cached_value is None:
853
+ gyp.DebugOutput(gyp.DEBUG_VARIABLES,
854
+ "Executing command '%s' in directory '%s'",
855
+ contents, build_file_dir)
856
+
857
+ replacement = ''
858
+
859
+ if command_string == 'pymod_do_main':
860
+ # <!pymod_do_main(modulename param eters) loads |modulename| as a
861
+ # python module and then calls that module's DoMain() function,
862
+ # passing ["param", "eters"] as a single list argument. For modules
863
+ # that don't load quickly, this can be faster than
864
+ # <!(python modulename param eters). Do this in |build_file_dir|.
865
+ oldwd = os.getcwd() # Python doesn't like os.open('.'): no fchdir.
866
+ if build_file_dir: # build_file_dir may be None (see above).
867
+ os.chdir(build_file_dir)
868
+ try:
869
+
870
+ parsed_contents = shlex.split(contents)
871
+ try:
872
+ py_module = __import__(parsed_contents[0])
873
+ except ImportError as e:
874
+ raise GypError("Error importing pymod_do_main"
875
+ "module (%s): %s" % (parsed_contents[0], e))
876
+ replacement = str(py_module.DoMain(parsed_contents[1:])).rstrip()
877
+ finally:
878
+ os.chdir(oldwd)
879
+ assert replacement != None
880
+ elif command_string:
881
+ raise GypError("Unknown command string '%s' in '%s'." %
882
+ (command_string, contents))
883
+ else:
884
+ # Fix up command with platform specific workarounds.
885
+ contents = FixupPlatformCommand(contents)
886
+ p = subprocess.Popen(contents, shell=use_shell,
887
+ stdout=subprocess.PIPE,
888
+ stderr=subprocess.PIPE,
889
+ stdin=subprocess.PIPE,
890
+ cwd=build_file_dir)
891
+
892
+ p_stdout, p_stderr = p.communicate('')
893
+
894
+ if p.wait() != 0 or p_stderr:
895
+ sys.stderr.write(p_stderr)
896
+ # Simulate check_call behavior, since check_call only exists
897
+ # in python 2.5 and later.
898
+ raise GypError("Call to '%s' returned exit status %d." %
899
+ (contents, p.returncode))
900
+ replacement = p_stdout.rstrip()
901
+
902
+ cached_command_results[cache_key] = replacement
903
+ else:
904
+ gyp.DebugOutput(gyp.DEBUG_VARIABLES,
905
+ "Had cache value for command '%s' in directory '%s'",
906
+ contents,build_file_dir)
907
+ replacement = cached_value
908
+
909
+ else:
910
+ if not contents in variables:
911
+ if contents[-1] in ['!', '/']:
912
+ # In order to allow cross-compiles (nacl) to happen more naturally,
913
+ # we will allow references to >(sources/) etc. to resolve to
914
+ # and empty list if undefined. This allows actions to:
915
+ # 'action!': [
916
+ # '>@(_sources!)',
917
+ # ],
918
+ # 'action/': [
919
+ # '>@(_sources/)',
920
+ # ],
921
+ replacement = []
922
+ else:
923
+ raise GypError('Undefined variable ' + contents +
924
+ ' in ' + build_file)
925
+ else:
926
+ replacement = variables[contents]
927
+
928
+ if isinstance(replacement, list):
929
+ for item in replacement:
930
+ if (not contents[-1] == '/' and
931
+ not isinstance(item, str) and not isinstance(item, int)):
932
+ raise GypError('Variable ' + contents +
933
+ ' must expand to a string or list of strings; ' +
934
+ 'list contains a ' +
935
+ item.__class__.__name__)
936
+ # Run through the list and handle variable expansions in it. Since
937
+ # the list is guaranteed not to contain dicts, this won't do anything
938
+ # with conditions sections.
939
+ ProcessVariablesAndConditionsInList(replacement, phase, variables,
940
+ build_file)
941
+ elif not isinstance(replacement, str) and \
942
+ not isinstance(replacement, int):
943
+ raise GypError('Variable ' + contents +
944
+ ' must expand to a string or list of strings; ' +
945
+ 'found a ' + replacement.__class__.__name__)
946
+
947
+ if expand_to_list:
948
+ # Expanding in list context. It's guaranteed that there's only one
949
+ # replacement to do in |input_str| and that it's this replacement. See
950
+ # above.
951
+ if isinstance(replacement, list):
952
+ # If it's already a list, make a copy.
953
+ output = replacement[:]
954
+ else:
955
+ # Split it the same way sh would split arguments.
956
+ output = shlex.split(str(replacement))
957
+ else:
958
+ # Expanding in string context.
959
+ encoded_replacement = ''
960
+ if isinstance(replacement, list):
961
+ # When expanding a list into string context, turn the list items
962
+ # into a string in a way that will work with a subprocess call.
963
+ #
964
+ # TODO(mark): This isn't completely correct. This should
965
+ # call a generator-provided function that observes the
966
+ # proper list-to-argument quoting rules on a specific
967
+ # platform instead of just calling the POSIX encoding
968
+ # routine.
969
+ encoded_replacement = gyp.common.EncodePOSIXShellList(replacement)
970
+ else:
971
+ encoded_replacement = replacement
972
+
973
+ output = output[:replace_start] + str(encoded_replacement) + \
974
+ output[replace_end:]
975
+ # Prepare for the next match iteration.
976
+ input_str = output
977
+
978
+ # Look for more matches now that we've replaced some, to deal with
979
+ # expanding local variables (variables defined in the same
980
+ # variables block as this one).
981
+ gyp.DebugOutput(gyp.DEBUG_VARIABLES, "Found output %r, recursing.", output)
982
+ if isinstance(output, list):
983
+ if output and isinstance(output[0], list):
984
+ # Leave output alone if it's a list of lists.
985
+ # We don't want such lists to be stringified.
986
+ pass
987
+ else:
988
+ new_output = []
989
+ for item in output:
990
+ new_output.append(
991
+ ExpandVariables(item, phase, variables, build_file))
992
+ output = new_output
993
+ else:
994
+ output = ExpandVariables(output, phase, variables, build_file)
995
+
996
+ # Convert all strings that are canonically-represented integers into integers.
997
+ if isinstance(output, list):
998
+ for index in xrange(0, len(output)):
999
+ if IsStrCanonicalInt(output[index]):
1000
+ output[index] = int(output[index])
1001
+ elif IsStrCanonicalInt(output):
1002
+ output = int(output)
1003
+
1004
+ return output
1005
+
1006
+
1007
+ def ProcessConditionsInDict(the_dict, phase, variables, build_file):
1008
+ # Process a 'conditions' or 'target_conditions' section in the_dict,
1009
+ # depending on phase.
1010
+ # early -> conditions
1011
+ # late -> target_conditions
1012
+ # latelate -> no conditions
1013
+ #
1014
+ # Each item in a conditions list consists of cond_expr, a string expression
1015
+ # evaluated as the condition, and true_dict, a dict that will be merged into
1016
+ # the_dict if cond_expr evaluates to true. Optionally, a third item,
1017
+ # false_dict, may be present. false_dict is merged into the_dict if
1018
+ # cond_expr evaluates to false.
1019
+ #
1020
+ # Any dict merged into the_dict will be recursively processed for nested
1021
+ # conditionals and other expansions, also according to phase, immediately
1022
+ # prior to being merged.
1023
+
1024
+ if phase == PHASE_EARLY:
1025
+ conditions_key = 'conditions'
1026
+ elif phase == PHASE_LATE:
1027
+ conditions_key = 'target_conditions'
1028
+ elif phase == PHASE_LATELATE:
1029
+ return
1030
+ else:
1031
+ assert False
1032
+
1033
+ if not conditions_key in the_dict:
1034
+ return
1035
+
1036
+ conditions_list = the_dict[conditions_key]
1037
+ # Unhook the conditions list, it's no longer needed.
1038
+ del the_dict[conditions_key]
1039
+
1040
+ for condition in conditions_list:
1041
+ if not isinstance(condition, list):
1042
+ raise GypError(conditions_key + ' must be a list')
1043
+ if len(condition) != 2 and len(condition) != 3:
1044
+ # It's possible that condition[0] won't work in which case this
1045
+ # attempt will raise its own IndexError. That's probably fine.
1046
+ raise GypError(conditions_key + ' ' + condition[0] +
1047
+ ' must be length 2 or 3, not ' + str(len(condition)))
1048
+
1049
+ [cond_expr, true_dict] = condition[0:2]
1050
+ false_dict = None
1051
+ if len(condition) == 3:
1052
+ false_dict = condition[2]
1053
+
1054
+ # Do expansions on the condition itself. Since the conditon can naturally
1055
+ # contain variable references without needing to resort to GYP expansion
1056
+ # syntax, this is of dubious value for variables, but someone might want to
1057
+ # use a command expansion directly inside a condition.
1058
+ cond_expr_expanded = ExpandVariables(cond_expr, phase, variables,
1059
+ build_file)
1060
+ if not isinstance(cond_expr_expanded, str) and \
1061
+ not isinstance(cond_expr_expanded, int):
1062
+ raise ValueError, \
1063
+ 'Variable expansion in this context permits str and int ' + \
1064
+ 'only, found ' + expanded.__class__.__name__
1065
+
1066
+ try:
1067
+ ast_code = compile(cond_expr_expanded, '<string>', 'eval')
1068
+
1069
+ if eval(ast_code, {'__builtins__': None}, variables):
1070
+ merge_dict = true_dict
1071
+ else:
1072
+ merge_dict = false_dict
1073
+ except SyntaxError, e:
1074
+ syntax_error = SyntaxError('%s while evaluating condition \'%s\' in %s '
1075
+ 'at character %d.' %
1076
+ (str(e.args[0]), e.text, build_file, e.offset),
1077
+ e.filename, e.lineno, e.offset, e.text)
1078
+ raise syntax_error
1079
+ except NameError, e:
1080
+ gyp.common.ExceptionAppend(e, 'while evaluating condition \'%s\' in %s' %
1081
+ (cond_expr_expanded, build_file))
1082
+ raise GypError(e)
1083
+
1084
+ if merge_dict != None:
1085
+ # Expand variables and nested conditinals in the merge_dict before
1086
+ # merging it.
1087
+ ProcessVariablesAndConditionsInDict(merge_dict, phase,
1088
+ variables, build_file)
1089
+
1090
+ MergeDicts(the_dict, merge_dict, build_file, build_file)
1091
+
1092
+
1093
+ def LoadAutomaticVariablesFromDict(variables, the_dict):
1094
+ # Any keys with plain string values in the_dict become automatic variables.
1095
+ # The variable name is the key name with a "_" character prepended.
1096
+ for key, value in the_dict.iteritems():
1097
+ if isinstance(value, str) or isinstance(value, int) or \
1098
+ isinstance(value, list):
1099
+ variables['_' + key] = value
1100
+
1101
+
1102
+ def LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key):
1103
+ # Any keys in the_dict's "variables" dict, if it has one, becomes a
1104
+ # variable. The variable name is the key name in the "variables" dict.
1105
+ # Variables that end with the % character are set only if they are unset in
1106
+ # the variables dict. the_dict_key is the name of the key that accesses
1107
+ # the_dict in the_dict's parent dict. If the_dict's parent is not a dict
1108
+ # (it could be a list or it could be parentless because it is a root dict),
1109
+ # the_dict_key will be None.
1110
+ for key, value in the_dict.get('variables', {}).iteritems():
1111
+ if not isinstance(value, str) and not isinstance(value, int) and \
1112
+ not isinstance(value, list):
1113
+ continue
1114
+
1115
+ if key.endswith('%'):
1116
+ variable_name = key[:-1]
1117
+ if variable_name in variables:
1118
+ # If the variable is already set, don't set it.
1119
+ continue
1120
+ if the_dict_key is 'variables' and variable_name in the_dict:
1121
+ # If the variable is set without a % in the_dict, and the_dict is a
1122
+ # variables dict (making |variables| a varaibles sub-dict of a
1123
+ # variables dict), use the_dict's definition.
1124
+ value = the_dict[variable_name]
1125
+ else:
1126
+ variable_name = key
1127
+
1128
+ variables[variable_name] = value
1129
+
1130
+
1131
+ def ProcessVariablesAndConditionsInDict(the_dict, phase, variables_in,
1132
+ build_file, the_dict_key=None):
1133
+ """Handle all variable and command expansion and conditional evaluation.
1134
+
1135
+ This function is the public entry point for all variable expansions and
1136
+ conditional evaluations. The variables_in dictionary will not be modified
1137
+ by this function.
1138
+ """
1139
+
1140
+ # Make a copy of the variables_in dict that can be modified during the
1141
+ # loading of automatics and the loading of the variables dict.
1142
+ variables = variables_in.copy()
1143
+ LoadAutomaticVariablesFromDict(variables, the_dict)
1144
+
1145
+ if 'variables' in the_dict:
1146
+ # Make sure all the local variables are added to the variables
1147
+ # list before we process them so that you can reference one
1148
+ # variable from another. They will be fully expanded by recursion
1149
+ # in ExpandVariables.
1150
+ for key, value in the_dict['variables'].iteritems():
1151
+ variables[key] = value
1152
+
1153
+ # Handle the associated variables dict first, so that any variable
1154
+ # references within can be resolved prior to using them as variables.
1155
+ # Pass a copy of the variables dict to avoid having it be tainted.
1156
+ # Otherwise, it would have extra automatics added for everything that
1157
+ # should just be an ordinary variable in this scope.
1158
+ ProcessVariablesAndConditionsInDict(the_dict['variables'], phase,
1159
+ variables, build_file, 'variables')
1160
+
1161
+ LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key)
1162
+
1163
+ for key, value in the_dict.iteritems():
1164
+ # Skip "variables", which was already processed if present.
1165
+ if key != 'variables' and isinstance(value, str):
1166
+ expanded = ExpandVariables(value, phase, variables, build_file)
1167
+ if not isinstance(expanded, str) and not isinstance(expanded, int):
1168
+ raise ValueError, \
1169
+ 'Variable expansion in this context permits str and int ' + \
1170
+ 'only, found ' + expanded.__class__.__name__ + ' for ' + key
1171
+ the_dict[key] = expanded
1172
+
1173
+ # Variable expansion may have resulted in changes to automatics. Reload.
1174
+ # TODO(mark): Optimization: only reload if no changes were made.
1175
+ variables = variables_in.copy()
1176
+ LoadAutomaticVariablesFromDict(variables, the_dict)
1177
+ LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key)
1178
+
1179
+ # Process conditions in this dict. This is done after variable expansion
1180
+ # so that conditions may take advantage of expanded variables. For example,
1181
+ # if the_dict contains:
1182
+ # {'type': '<(library_type)',
1183
+ # 'conditions': [['_type=="static_library"', { ... }]]},
1184
+ # _type, as used in the condition, will only be set to the value of
1185
+ # library_type if variable expansion is performed before condition
1186
+ # processing. However, condition processing should occur prior to recursion
1187
+ # so that variables (both automatic and "variables" dict type) may be
1188
+ # adjusted by conditions sections, merged into the_dict, and have the
1189
+ # intended impact on contained dicts.
1190
+ #
1191
+ # This arrangement means that a "conditions" section containing a "variables"
1192
+ # section will only have those variables effective in subdicts, not in
1193
+ # the_dict. The workaround is to put a "conditions" section within a
1194
+ # "variables" section. For example:
1195
+ # {'conditions': [['os=="mac"', {'variables': {'define': 'IS_MAC'}}]],
1196
+ # 'defines': ['<(define)'],
1197
+ # 'my_subdict': {'defines': ['<(define)']}},
1198
+ # will not result in "IS_MAC" being appended to the "defines" list in the
1199
+ # current scope but would result in it being appended to the "defines" list
1200
+ # within "my_subdict". By comparison:
1201
+ # {'variables': {'conditions': [['os=="mac"', {'define': 'IS_MAC'}]]},
1202
+ # 'defines': ['<(define)'],
1203
+ # 'my_subdict': {'defines': ['<(define)']}},
1204
+ # will append "IS_MAC" to both "defines" lists.
1205
+
1206
+ # Evaluate conditions sections, allowing variable expansions within them
1207
+ # as well as nested conditionals. This will process a 'conditions' or
1208
+ # 'target_conditions' section, perform appropriate merging and recursive
1209
+ # conditional and variable processing, and then remove the conditions section
1210
+ # from the_dict if it is present.
1211
+ ProcessConditionsInDict(the_dict, phase, variables, build_file)
1212
+
1213
+ # Conditional processing may have resulted in changes to automatics or the
1214
+ # variables dict. Reload.
1215
+ variables = variables_in.copy()
1216
+ LoadAutomaticVariablesFromDict(variables, the_dict)
1217
+ LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key)
1218
+
1219
+ # Recurse into child dicts, or process child lists which may result in
1220
+ # further recursion into descendant dicts.
1221
+ for key, value in the_dict.iteritems():
1222
+ # Skip "variables" and string values, which were already processed if
1223
+ # present.
1224
+ if key == 'variables' or isinstance(value, str):
1225
+ continue
1226
+ if isinstance(value, dict):
1227
+ # Pass a copy of the variables dict so that subdicts can't influence
1228
+ # parents.
1229
+ ProcessVariablesAndConditionsInDict(value, phase, variables,
1230
+ build_file, key)
1231
+ elif isinstance(value, list):
1232
+ # The list itself can't influence the variables dict, and
1233
+ # ProcessVariablesAndConditionsInList will make copies of the variables
1234
+ # dict if it needs to pass it to something that can influence it. No
1235
+ # copy is necessary here.
1236
+ ProcessVariablesAndConditionsInList(value, phase, variables,
1237
+ build_file)
1238
+ elif not isinstance(value, int):
1239
+ raise TypeError, 'Unknown type ' + value.__class__.__name__ + \
1240
+ ' for ' + key
1241
+
1242
+
1243
+ def ProcessVariablesAndConditionsInList(the_list, phase, variables,
1244
+ build_file):
1245
+ # Iterate using an index so that new values can be assigned into the_list.
1246
+ index = 0
1247
+ while index < len(the_list):
1248
+ item = the_list[index]
1249
+ if isinstance(item, dict):
1250
+ # Make a copy of the variables dict so that it won't influence anything
1251
+ # outside of its own scope.
1252
+ ProcessVariablesAndConditionsInDict(item, phase, variables, build_file)
1253
+ elif isinstance(item, list):
1254
+ ProcessVariablesAndConditionsInList(item, phase, variables, build_file)
1255
+ elif isinstance(item, str):
1256
+ expanded = ExpandVariables(item, phase, variables, build_file)
1257
+ if isinstance(expanded, str) or isinstance(expanded, int):
1258
+ the_list[index] = expanded
1259
+ elif isinstance(expanded, list):
1260
+ the_list[index:index+1] = expanded
1261
+ index += len(expanded)
1262
+
1263
+ # index now identifies the next item to examine. Continue right now
1264
+ # without falling into the index increment below.
1265
+ continue
1266
+ else:
1267
+ raise ValueError, \
1268
+ 'Variable expansion in this context permits strings and ' + \
1269
+ 'lists only, found ' + expanded.__class__.__name__ + ' at ' + \
1270
+ index
1271
+ elif not isinstance(item, int):
1272
+ raise TypeError, 'Unknown type ' + item.__class__.__name__ + \
1273
+ ' at index ' + index
1274
+ index = index + 1
1275
+
1276
+
1277
+ def BuildTargetsDict(data):
1278
+ """Builds a dict mapping fully-qualified target names to their target dicts.
1279
+
1280
+ |data| is a dict mapping loaded build files by pathname relative to the
1281
+ current directory. Values in |data| are build file contents. For each
1282
+ |data| value with a "targets" key, the value of the "targets" key is taken
1283
+ as a list containing target dicts. Each target's fully-qualified name is
1284
+ constructed from the pathname of the build file (|data| key) and its
1285
+ "target_name" property. These fully-qualified names are used as the keys
1286
+ in the returned dict. These keys provide access to the target dicts,
1287
+ the dicts in the "targets" lists.
1288
+ """
1289
+
1290
+ targets = {}
1291
+ for build_file in data['target_build_files']:
1292
+ for target in data[build_file].get('targets', []):
1293
+ target_name = gyp.common.QualifiedTarget(build_file,
1294
+ target['target_name'],
1295
+ target['toolset'])
1296
+ if target_name in targets:
1297
+ raise GypError('Duplicate target definitions for ' + target_name)
1298
+ targets[target_name] = target
1299
+
1300
+ return targets
1301
+
1302
+
1303
+ def QualifyDependencies(targets):
1304
+ """Make dependency links fully-qualified relative to the current directory.
1305
+
1306
+ |targets| is a dict mapping fully-qualified target names to their target
1307
+ dicts. For each target in this dict, keys known to contain dependency
1308
+ links are examined, and any dependencies referenced will be rewritten
1309
+ so that they are fully-qualified and relative to the current directory.
1310
+ All rewritten dependencies are suitable for use as keys to |targets| or a
1311
+ similar dict.
1312
+ """
1313
+
1314
+ all_dependency_sections = [dep + op
1315
+ for dep in dependency_sections
1316
+ for op in ('', '!', '/')]
1317
+
1318
+ for target, target_dict in targets.iteritems():
1319
+ target_build_file = gyp.common.BuildFile(target)
1320
+ toolset = target_dict['toolset']
1321
+ for dependency_key in all_dependency_sections:
1322
+ dependencies = target_dict.get(dependency_key, [])
1323
+ for index in xrange(0, len(dependencies)):
1324
+ dep_file, dep_target, dep_toolset = gyp.common.ResolveTarget(
1325
+ target_build_file, dependencies[index], toolset)
1326
+ if not multiple_toolsets:
1327
+ # Ignore toolset specification in the dependency if it is specified.
1328
+ dep_toolset = toolset
1329
+ dependency = gyp.common.QualifiedTarget(dep_file,
1330
+ dep_target,
1331
+ dep_toolset)
1332
+ dependencies[index] = dependency
1333
+
1334
+ # Make sure anything appearing in a list other than "dependencies" also
1335
+ # appears in the "dependencies" list.
1336
+ if dependency_key != 'dependencies' and \
1337
+ dependency not in target_dict['dependencies']:
1338
+ raise GypError('Found ' + dependency + ' in ' + dependency_key +
1339
+ ' of ' + target + ', but not in dependencies')
1340
+
1341
+
1342
+ def ExpandWildcardDependencies(targets, data):
1343
+ """Expands dependencies specified as build_file:*.
1344
+
1345
+ For each target in |targets|, examines sections containing links to other
1346
+ targets. If any such section contains a link of the form build_file:*, it
1347
+ is taken as a wildcard link, and is expanded to list each target in
1348
+ build_file. The |data| dict provides access to build file dicts.
1349
+
1350
+ Any target that does not wish to be included by wildcard can provide an
1351
+ optional "suppress_wildcard" key in its target dict. When present and
1352
+ true, a wildcard dependency link will not include such targets.
1353
+
1354
+ All dependency names, including the keys to |targets| and the values in each
1355
+ dependency list, must be qualified when this function is called.
1356
+ """
1357
+
1358
+ for target, target_dict in targets.iteritems():
1359
+ toolset = target_dict['toolset']
1360
+ target_build_file = gyp.common.BuildFile(target)
1361
+ for dependency_key in dependency_sections:
1362
+ dependencies = target_dict.get(dependency_key, [])
1363
+
1364
+ # Loop this way instead of "for dependency in" or "for index in xrange"
1365
+ # because the dependencies list will be modified within the loop body.
1366
+ index = 0
1367
+ while index < len(dependencies):
1368
+ (dependency_build_file, dependency_target, dependency_toolset) = \
1369
+ gyp.common.ParseQualifiedTarget(dependencies[index])
1370
+ if dependency_target != '*' and dependency_toolset != '*':
1371
+ # Not a wildcard. Keep it moving.
1372
+ index = index + 1
1373
+ continue
1374
+
1375
+ if dependency_build_file == target_build_file:
1376
+ # It's an error for a target to depend on all other targets in
1377
+ # the same file, because a target cannot depend on itself.
1378
+ raise GypError('Found wildcard in ' + dependency_key + ' of ' +
1379
+ target + ' referring to same build file')
1380
+
1381
+ # Take the wildcard out and adjust the index so that the next
1382
+ # dependency in the list will be processed the next time through the
1383
+ # loop.
1384
+ del dependencies[index]
1385
+ index = index - 1
1386
+
1387
+ # Loop through the targets in the other build file, adding them to
1388
+ # this target's list of dependencies in place of the removed
1389
+ # wildcard.
1390
+ dependency_target_dicts = data[dependency_build_file]['targets']
1391
+ for dependency_target_dict in dependency_target_dicts:
1392
+ if int(dependency_target_dict.get('suppress_wildcard', False)):
1393
+ continue
1394
+ dependency_target_name = dependency_target_dict['target_name']
1395
+ if (dependency_target != '*' and
1396
+ dependency_target != dependency_target_name):
1397
+ continue
1398
+ dependency_target_toolset = dependency_target_dict['toolset']
1399
+ if (dependency_toolset != '*' and
1400
+ dependency_toolset != dependency_target_toolset):
1401
+ continue
1402
+ dependency = gyp.common.QualifiedTarget(dependency_build_file,
1403
+ dependency_target_name,
1404
+ dependency_target_toolset)
1405
+ index = index + 1
1406
+ dependencies.insert(index, dependency)
1407
+
1408
+ index = index + 1
1409
+
1410
+
1411
+ def Unify(l):
1412
+ """Removes duplicate elements from l, keeping the first element."""
1413
+ seen = {}
1414
+ return [seen.setdefault(e, e) for e in l if e not in seen]
1415
+
1416
+
1417
+ def RemoveDuplicateDependencies(targets):
1418
+ """Makes sure every dependency appears only once in all targets's dependency
1419
+ lists."""
1420
+ for target_name, target_dict in targets.iteritems():
1421
+ for dependency_key in dependency_sections:
1422
+ dependencies = target_dict.get(dependency_key, [])
1423
+ if dependencies:
1424
+ target_dict[dependency_key] = Unify(dependencies)
1425
+
1426
+
1427
+ def Filter(l, item):
1428
+ """Removes item from l."""
1429
+ res = {}
1430
+ return [res.setdefault(e, e) for e in l if e != item]
1431
+
1432
+
1433
+ def RemoveSelfDependencies(targets):
1434
+ """Remove self dependencies from targets that have the prune_self_dependency
1435
+ variable set."""
1436
+ for target_name, target_dict in targets.iteritems():
1437
+ for dependency_key in dependency_sections:
1438
+ dependencies = target_dict.get(dependency_key, [])
1439
+ if dependencies:
1440
+ for t in dependencies:
1441
+ if t == target_name:
1442
+ if targets[t].get('variables', {}).get('prune_self_dependency', 0):
1443
+ target_dict[dependency_key] = Filter(dependencies, target_name)
1444
+
1445
+
1446
+ class DependencyGraphNode(object):
1447
+ """
1448
+
1449
+ Attributes:
1450
+ ref: A reference to an object that this DependencyGraphNode represents.
1451
+ dependencies: List of DependencyGraphNodes on which this one depends.
1452
+ dependents: List of DependencyGraphNodes that depend on this one.
1453
+ """
1454
+
1455
+ class CircularException(GypError):
1456
+ pass
1457
+
1458
+ def __init__(self, ref):
1459
+ self.ref = ref
1460
+ self.dependencies = []
1461
+ self.dependents = []
1462
+
1463
+ def __repr__(self):
1464
+ return '<DependencyGraphNode: %r>' % self.ref
1465
+
1466
+ def FlattenToList(self):
1467
+ # flat_list is the sorted list of dependencies - actually, the list items
1468
+ # are the "ref" attributes of DependencyGraphNodes. Every target will
1469
+ # appear in flat_list after all of its dependencies, and before all of its
1470
+ # dependents.
1471
+ flat_list = []
1472
+
1473
+ # in_degree_zeros is the list of DependencyGraphNodes that have no
1474
+ # dependencies not in flat_list. Initially, it is a copy of the children
1475
+ # of this node, because when the graph was built, nodes with no
1476
+ # dependencies were made implicit dependents of the root node.
1477
+ in_degree_zeros = set(self.dependents[:])
1478
+
1479
+ while in_degree_zeros:
1480
+ # Nodes in in_degree_zeros have no dependencies not in flat_list, so they
1481
+ # can be appended to flat_list. Take these nodes out of in_degree_zeros
1482
+ # as work progresses, so that the next node to process from the list can
1483
+ # always be accessed at a consistent position.
1484
+ node = in_degree_zeros.pop()
1485
+ flat_list.append(node.ref)
1486
+
1487
+ # Look at dependents of the node just added to flat_list. Some of them
1488
+ # may now belong in in_degree_zeros.
1489
+ for node_dependent in node.dependents:
1490
+ is_in_degree_zero = True
1491
+ for node_dependent_dependency in node_dependent.dependencies:
1492
+ if not node_dependent_dependency.ref in flat_list:
1493
+ # The dependent one or more dependencies not in flat_list. There
1494
+ # will be more chances to add it to flat_list when examining
1495
+ # it again as a dependent of those other dependencies, provided
1496
+ # that there are no cycles.
1497
+ is_in_degree_zero = False
1498
+ break
1499
+
1500
+ if is_in_degree_zero:
1501
+ # All of the dependent's dependencies are already in flat_list. Add
1502
+ # it to in_degree_zeros where it will be processed in a future
1503
+ # iteration of the outer loop.
1504
+ in_degree_zeros.add(node_dependent)
1505
+
1506
+ return flat_list
1507
+
1508
+ def FindCycles(self, path=None):
1509
+ """
1510
+ Returns a list of cycles in the graph, where each cycle is its own list.
1511
+ """
1512
+ if path is None:
1513
+ path = [self]
1514
+
1515
+ results = []
1516
+ for node in self.dependents:
1517
+ if node in path:
1518
+ cycle = [node]
1519
+ for part in path:
1520
+ cycle.append(part)
1521
+ if part == node:
1522
+ break
1523
+ results.append(tuple(cycle))
1524
+ else:
1525
+ results.extend(node.FindCycles([node] + path))
1526
+
1527
+ return list(set(results))
1528
+
1529
+ def DirectDependencies(self, dependencies=None):
1530
+ """Returns a list of just direct dependencies."""
1531
+ if dependencies == None:
1532
+ dependencies = []
1533
+
1534
+ for dependency in self.dependencies:
1535
+ # Check for None, corresponding to the root node.
1536
+ if dependency.ref != None and dependency.ref not in dependencies:
1537
+ dependencies.append(dependency.ref)
1538
+
1539
+ return dependencies
1540
+
1541
+ def _AddImportedDependencies(self, targets, dependencies=None):
1542
+ """Given a list of direct dependencies, adds indirect dependencies that
1543
+ other dependencies have declared to export their settings.
1544
+
1545
+ This method does not operate on self. Rather, it operates on the list
1546
+ of dependencies in the |dependencies| argument. For each dependency in
1547
+ that list, if any declares that it exports the settings of one of its
1548
+ own dependencies, those dependencies whose settings are "passed through"
1549
+ are added to the list. As new items are added to the list, they too will
1550
+ be processed, so it is possible to import settings through multiple levels
1551
+ of dependencies.
1552
+
1553
+ This method is not terribly useful on its own, it depends on being
1554
+ "primed" with a list of direct dependencies such as one provided by
1555
+ DirectDependencies. DirectAndImportedDependencies is intended to be the
1556
+ public entry point.
1557
+ """
1558
+
1559
+ if dependencies == None:
1560
+ dependencies = []
1561
+
1562
+ index = 0
1563
+ while index < len(dependencies):
1564
+ dependency = dependencies[index]
1565
+ dependency_dict = targets[dependency]
1566
+ # Add any dependencies whose settings should be imported to the list
1567
+ # if not already present. Newly-added items will be checked for
1568
+ # their own imports when the list iteration reaches them.
1569
+ # Rather than simply appending new items, insert them after the
1570
+ # dependency that exported them. This is done to more closely match
1571
+ # the depth-first method used by DeepDependencies.
1572
+ add_index = 1
1573
+ for imported_dependency in \
1574
+ dependency_dict.get('export_dependent_settings', []):
1575
+ if imported_dependency not in dependencies:
1576
+ dependencies.insert(index + add_index, imported_dependency)
1577
+ add_index = add_index + 1
1578
+ index = index + 1
1579
+
1580
+ return dependencies
1581
+
1582
+ def DirectAndImportedDependencies(self, targets, dependencies=None):
1583
+ """Returns a list of a target's direct dependencies and all indirect
1584
+ dependencies that a dependency has advertised settings should be exported
1585
+ through the dependency for.
1586
+ """
1587
+
1588
+ dependencies = self.DirectDependencies(dependencies)
1589
+ return self._AddImportedDependencies(targets, dependencies)
1590
+
1591
+ def DeepDependencies(self, dependencies=None):
1592
+ """Returns a list of all of a target's dependencies, recursively."""
1593
+ if dependencies == None:
1594
+ dependencies = []
1595
+
1596
+ for dependency in self.dependencies:
1597
+ # Check for None, corresponding to the root node.
1598
+ if dependency.ref != None and dependency.ref not in dependencies:
1599
+ dependencies.append(dependency.ref)
1600
+ dependency.DeepDependencies(dependencies)
1601
+
1602
+ return dependencies
1603
+
1604
+ def _LinkDependenciesInternal(self, targets, include_shared_libraries,
1605
+ dependencies=None, initial=True):
1606
+ """Returns a list of dependency targets that are linked into this target.
1607
+
1608
+ This function has a split personality, depending on the setting of
1609
+ |initial|. Outside callers should always leave |initial| at its default
1610
+ setting.
1611
+
1612
+ When adding a target to the list of dependencies, this function will
1613
+ recurse into itself with |initial| set to False, to collect dependencies
1614
+ that are linked into the linkable target for which the list is being built.
1615
+
1616
+ If |include_shared_libraries| is False, the resulting dependencies will not
1617
+ include shared_library targets that are linked into this target.
1618
+ """
1619
+ if dependencies == None:
1620
+ dependencies = []
1621
+
1622
+ # Check for None, corresponding to the root node.
1623
+ if self.ref == None:
1624
+ return dependencies
1625
+
1626
+ # It's kind of sucky that |targets| has to be passed into this function,
1627
+ # but that's presently the easiest way to access the target dicts so that
1628
+ # this function can find target types.
1629
+
1630
+ if 'target_name' not in targets[self.ref]:
1631
+ raise GypError("Missing 'target_name' field in target.")
1632
+
1633
+ if 'type' not in targets[self.ref]:
1634
+ raise GypError("Missing 'type' field in target %s" %
1635
+ targets[self.ref]['target_name'])
1636
+
1637
+ target_type = targets[self.ref]['type']
1638
+
1639
+ is_linkable = target_type in linkable_types
1640
+
1641
+ if initial and not is_linkable:
1642
+ # If this is the first target being examined and it's not linkable,
1643
+ # return an empty list of link dependencies, because the link
1644
+ # dependencies are intended to apply to the target itself (initial is
1645
+ # True) and this target won't be linked.
1646
+ return dependencies
1647
+
1648
+ # Don't traverse 'none' targets if explicitly excluded.
1649
+ if (target_type == 'none' and
1650
+ not targets[self.ref].get('dependencies_traverse', True)):
1651
+ if self.ref not in dependencies:
1652
+ dependencies.append(self.ref)
1653
+ return dependencies
1654
+
1655
+ # Executables and loadable modules are already fully and finally linked.
1656
+ # Nothing else can be a link dependency of them, there can only be
1657
+ # dependencies in the sense that a dependent target might run an
1658
+ # executable or load the loadable_module.
1659
+ if not initial and target_type in ('executable', 'loadable_module'):
1660
+ return dependencies
1661
+
1662
+ # Shared libraries are already fully linked. They should only be included
1663
+ # in |dependencies| when adjusting static library dependencies (in order to
1664
+ # link against the shared_library's import lib), but should not be included
1665
+ # in |dependencies| when propagating link_settings.
1666
+ # The |include_shared_libraries| flag controls which of these two cases we
1667
+ # are handling.
1668
+ if (not initial and target_type == 'shared_library' and
1669
+ not include_shared_libraries):
1670
+ return dependencies
1671
+
1672
+ # The target is linkable, add it to the list of link dependencies.
1673
+ if self.ref not in dependencies:
1674
+ dependencies.append(self.ref)
1675
+ if initial or not is_linkable:
1676
+ # If this is a subsequent target and it's linkable, don't look any
1677
+ # further for linkable dependencies, as they'll already be linked into
1678
+ # this target linkable. Always look at dependencies of the initial
1679
+ # target, and always look at dependencies of non-linkables.
1680
+ for dependency in self.dependencies:
1681
+ dependency._LinkDependenciesInternal(targets,
1682
+ include_shared_libraries,
1683
+ dependencies, False)
1684
+
1685
+ return dependencies
1686
+
1687
+ def DependenciesForLinkSettings(self, targets):
1688
+ """
1689
+ Returns a list of dependency targets whose link_settings should be merged
1690
+ into this target.
1691
+ """
1692
+
1693
+ # TODO(sbaig) Currently, chrome depends on the bug that shared libraries'
1694
+ # link_settings are propagated. So for now, we will allow it, unless the
1695
+ # 'allow_sharedlib_linksettings_propagation' flag is explicitly set to
1696
+ # False. Once chrome is fixed, we can remove this flag.
1697
+ include_shared_libraries = \
1698
+ targets[self.ref].get('allow_sharedlib_linksettings_propagation', True)
1699
+ return self._LinkDependenciesInternal(targets, include_shared_libraries)
1700
+
1701
+ def DependenciesToLinkAgainst(self, targets):
1702
+ """
1703
+ Returns a list of dependency targets that are linked into this target.
1704
+ """
1705
+ return self._LinkDependenciesInternal(targets, True)
1706
+
1707
+
1708
+ def BuildDependencyList(targets):
1709
+ # Create a DependencyGraphNode for each target. Put it into a dict for easy
1710
+ # access.
1711
+ dependency_nodes = {}
1712
+ for target, spec in targets.iteritems():
1713
+ if target not in dependency_nodes:
1714
+ dependency_nodes[target] = DependencyGraphNode(target)
1715
+
1716
+ # Set up the dependency links. Targets that have no dependencies are treated
1717
+ # as dependent on root_node.
1718
+ root_node = DependencyGraphNode(None)
1719
+ for target, spec in targets.iteritems():
1720
+ target_node = dependency_nodes[target]
1721
+ target_build_file = gyp.common.BuildFile(target)
1722
+ dependencies = spec.get('dependencies')
1723
+ if not dependencies:
1724
+ target_node.dependencies = [root_node]
1725
+ root_node.dependents.append(target_node)
1726
+ else:
1727
+ for dependency in dependencies:
1728
+ dependency_node = dependency_nodes.get(dependency)
1729
+ if not dependency_node:
1730
+ raise GypError("Dependency '%s' not found while "
1731
+ "trying to load target %s" % (dependency, target))
1732
+ target_node.dependencies.append(dependency_node)
1733
+ dependency_node.dependents.append(target_node)
1734
+
1735
+ flat_list = root_node.FlattenToList()
1736
+
1737
+ # If there's anything left unvisited, there must be a circular dependency
1738
+ # (cycle). If you need to figure out what's wrong, look for elements of
1739
+ # targets that are not in flat_list.
1740
+ if len(flat_list) != len(targets):
1741
+ raise DependencyGraphNode.CircularException(
1742
+ 'Some targets not reachable, cycle in dependency graph detected: ' +
1743
+ ' '.join(set(flat_list) ^ set(targets)))
1744
+
1745
+ return [dependency_nodes, flat_list]
1746
+
1747
+
1748
+ def VerifyNoGYPFileCircularDependencies(targets):
1749
+ # Create a DependencyGraphNode for each gyp file containing a target. Put
1750
+ # it into a dict for easy access.
1751
+ dependency_nodes = {}
1752
+ for target in targets.iterkeys():
1753
+ build_file = gyp.common.BuildFile(target)
1754
+ if not build_file in dependency_nodes:
1755
+ dependency_nodes[build_file] = DependencyGraphNode(build_file)
1756
+
1757
+ # Set up the dependency links.
1758
+ for target, spec in targets.iteritems():
1759
+ build_file = gyp.common.BuildFile(target)
1760
+ build_file_node = dependency_nodes[build_file]
1761
+ target_dependencies = spec.get('dependencies', [])
1762
+ for dependency in target_dependencies:
1763
+ try:
1764
+ dependency_build_file = gyp.common.BuildFile(dependency)
1765
+ except GypError, e:
1766
+ gyp.common.ExceptionAppend(
1767
+ e, 'while computing dependencies of .gyp file %s' % build_file)
1768
+ raise
1769
+
1770
+ if dependency_build_file == build_file:
1771
+ # A .gyp file is allowed to refer back to itself.
1772
+ continue
1773
+ dependency_node = dependency_nodes.get(dependency_build_file)
1774
+ if not dependency_node:
1775
+ raise GypError("Dependancy '%s' not found" % dependency_build_file)
1776
+ if dependency_node not in build_file_node.dependencies:
1777
+ build_file_node.dependencies.append(dependency_node)
1778
+ dependency_node.dependents.append(build_file_node)
1779
+
1780
+
1781
+ # Files that have no dependencies are treated as dependent on root_node.
1782
+ root_node = DependencyGraphNode(None)
1783
+ for build_file_node in dependency_nodes.itervalues():
1784
+ if len(build_file_node.dependencies) == 0:
1785
+ build_file_node.dependencies.append(root_node)
1786
+ root_node.dependents.append(build_file_node)
1787
+
1788
+ flat_list = root_node.FlattenToList()
1789
+
1790
+ # If there's anything left unvisited, there must be a circular dependency
1791
+ # (cycle).
1792
+ if len(flat_list) != len(dependency_nodes):
1793
+ bad_files = []
1794
+ for file in dependency_nodes.iterkeys():
1795
+ if not file in flat_list:
1796
+ bad_files.append(file)
1797
+ common_path_prefix = os.path.commonprefix(dependency_nodes)
1798
+ cycles = []
1799
+ for cycle in root_node.FindCycles():
1800
+ simplified_paths = []
1801
+ for node in cycle:
1802
+ assert(node.ref.startswith(common_path_prefix))
1803
+ simplified_paths.append(node.ref[len(common_path_prefix):])
1804
+ cycles.append('Cycle: %s' % ' -> '.join(simplified_paths))
1805
+ raise DependencyGraphNode.CircularException, \
1806
+ 'Cycles in .gyp file dependency graph detected:\n' + '\n'.join(cycles)
1807
+
1808
+
1809
+ def DoDependentSettings(key, flat_list, targets, dependency_nodes):
1810
+ # key should be one of all_dependent_settings, direct_dependent_settings,
1811
+ # or link_settings.
1812
+
1813
+ for target in flat_list:
1814
+ target_dict = targets[target]
1815
+ build_file = gyp.common.BuildFile(target)
1816
+
1817
+ if key == 'all_dependent_settings':
1818
+ dependencies = dependency_nodes[target].DeepDependencies()
1819
+ elif key == 'direct_dependent_settings':
1820
+ dependencies = \
1821
+ dependency_nodes[target].DirectAndImportedDependencies(targets)
1822
+ elif key == 'link_settings':
1823
+ dependencies = \
1824
+ dependency_nodes[target].DependenciesForLinkSettings(targets)
1825
+ else:
1826
+ raise GypError("DoDependentSettings doesn't know how to determine "
1827
+ 'dependencies for ' + key)
1828
+
1829
+ for dependency in dependencies:
1830
+ dependency_dict = targets[dependency]
1831
+ if not key in dependency_dict:
1832
+ continue
1833
+ dependency_build_file = gyp.common.BuildFile(dependency)
1834
+ MergeDicts(target_dict, dependency_dict[key],
1835
+ build_file, dependency_build_file)
1836
+
1837
+
1838
+ def AdjustStaticLibraryDependencies(flat_list, targets, dependency_nodes,
1839
+ sort_dependencies):
1840
+ # Recompute target "dependencies" properties. For each static library
1841
+ # target, remove "dependencies" entries referring to other static libraries,
1842
+ # unless the dependency has the "hard_dependency" attribute set. For each
1843
+ # linkable target, add a "dependencies" entry referring to all of the
1844
+ # target's computed list of link dependencies (including static libraries
1845
+ # if no such entry is already present.
1846
+ for target in flat_list:
1847
+ target_dict = targets[target]
1848
+ target_type = target_dict['type']
1849
+
1850
+ if target_type == 'static_library':
1851
+ if not 'dependencies' in target_dict:
1852
+ continue
1853
+
1854
+ target_dict['dependencies_original'] = target_dict.get(
1855
+ 'dependencies', [])[:]
1856
+
1857
+ # A static library should not depend on another static library unless
1858
+ # the dependency relationship is "hard," which should only be done when
1859
+ # a dependent relies on some side effect other than just the build
1860
+ # product, like a rule or action output. Further, if a target has a
1861
+ # non-hard dependency, but that dependency exports a hard dependency,
1862
+ # the non-hard dependency can safely be removed, but the exported hard
1863
+ # dependency must be added to the target to keep the same dependency
1864
+ # ordering.
1865
+ dependencies = \
1866
+ dependency_nodes[target].DirectAndImportedDependencies(targets)
1867
+ index = 0
1868
+ while index < len(dependencies):
1869
+ dependency = dependencies[index]
1870
+ dependency_dict = targets[dependency]
1871
+
1872
+ # Remove every non-hard static library dependency and remove every
1873
+ # non-static library dependency that isn't a direct dependency.
1874
+ if (dependency_dict['type'] == 'static_library' and \
1875
+ not dependency_dict.get('hard_dependency', False)) or \
1876
+ (dependency_dict['type'] != 'static_library' and \
1877
+ not dependency in target_dict['dependencies']):
1878
+ # Take the dependency out of the list, and don't increment index
1879
+ # because the next dependency to analyze will shift into the index
1880
+ # formerly occupied by the one being removed.
1881
+ del dependencies[index]
1882
+ else:
1883
+ index = index + 1
1884
+
1885
+ # Update the dependencies. If the dependencies list is empty, it's not
1886
+ # needed, so unhook it.
1887
+ if len(dependencies) > 0:
1888
+ target_dict['dependencies'] = dependencies
1889
+ else:
1890
+ del target_dict['dependencies']
1891
+
1892
+ elif target_type in linkable_types:
1893
+ # Get a list of dependency targets that should be linked into this
1894
+ # target. Add them to the dependencies list if they're not already
1895
+ # present.
1896
+
1897
+ link_dependencies = \
1898
+ dependency_nodes[target].DependenciesToLinkAgainst(targets)
1899
+ for dependency in link_dependencies:
1900
+ if dependency == target:
1901
+ continue
1902
+ if not 'dependencies' in target_dict:
1903
+ target_dict['dependencies'] = []
1904
+ if not dependency in target_dict['dependencies']:
1905
+ target_dict['dependencies'].append(dependency)
1906
+ # Sort the dependencies list in the order from dependents to dependencies.
1907
+ # e.g. If A and B depend on C and C depends on D, sort them in A, B, C, D.
1908
+ # Note: flat_list is already sorted in the order from dependencies to
1909
+ # dependents.
1910
+ if sort_dependencies and 'dependencies' in target_dict:
1911
+ target_dict['dependencies'] = [dep for dep in reversed(flat_list)
1912
+ if dep in target_dict['dependencies']]
1913
+
1914
+
1915
+ # Initialize this here to speed up MakePathRelative.
1916
+ exception_re = re.compile(r'''["']?[-/$<>^]''')
1917
+
1918
+
1919
+ def MakePathRelative(to_file, fro_file, item):
1920
+ # If item is a relative path, it's relative to the build file dict that it's
1921
+ # coming from. Fix it up to make it relative to the build file dict that
1922
+ # it's going into.
1923
+ # Exception: any |item| that begins with these special characters is
1924
+ # returned without modification.
1925
+ # / Used when a path is already absolute (shortcut optimization;
1926
+ # such paths would be returned as absolute anyway)
1927
+ # $ Used for build environment variables
1928
+ # - Used for some build environment flags (such as -lapr-1 in a
1929
+ # "libraries" section)
1930
+ # < Used for our own variable and command expansions (see ExpandVariables)
1931
+ # > Used for our own variable and command expansions (see ExpandVariables)
1932
+ # ^ Used for our own variable and command expansions (see ExpandVariables)
1933
+ #
1934
+ # "/' Used when a value is quoted. If these are present, then we
1935
+ # check the second character instead.
1936
+ #
1937
+ if to_file == fro_file or exception_re.match(item):
1938
+ return item
1939
+ else:
1940
+ # TODO(dglazkov) The backslash/forward-slash replacement at the end is a
1941
+ # temporary measure. This should really be addressed by keeping all paths
1942
+ # in POSIX until actual project generation.
1943
+ ret = os.path.normpath(os.path.join(
1944
+ gyp.common.RelativePath(os.path.dirname(fro_file),
1945
+ os.path.dirname(to_file)),
1946
+ item)).replace('\\', '/')
1947
+ if item[-1] == '/':
1948
+ ret += '/'
1949
+ return ret
1950
+
1951
+ def MergeLists(to, fro, to_file, fro_file, is_paths=False, append=True):
1952
+ # Python documentation recommends objects which do not support hash
1953
+ # set this value to None. Python library objects follow this rule.
1954
+ is_hashable = lambda val: val.__hash__
1955
+
1956
+ # If x is hashable, returns whether x is in s. Else returns whether x is in l.
1957
+ def is_in_set_or_list(x, s, l):
1958
+ if is_hashable(x):
1959
+ return x in s
1960
+ return x in l
1961
+
1962
+ prepend_index = 0
1963
+
1964
+ # Make membership testing of hashables in |to| (in particular, strings)
1965
+ # faster.
1966
+ hashable_to_set = set(x for x in to if is_hashable(x))
1967
+ for item in fro:
1968
+ singleton = False
1969
+ if isinstance(item, str) or isinstance(item, int):
1970
+ # The cheap and easy case.
1971
+ if is_paths:
1972
+ to_item = MakePathRelative(to_file, fro_file, item)
1973
+ else:
1974
+ to_item = item
1975
+
1976
+ if not isinstance(item, str) or not item.startswith('-'):
1977
+ # Any string that doesn't begin with a "-" is a singleton - it can
1978
+ # only appear once in a list, to be enforced by the list merge append
1979
+ # or prepend.
1980
+ singleton = True
1981
+ elif isinstance(item, dict):
1982
+ # Make a copy of the dictionary, continuing to look for paths to fix.
1983
+ # The other intelligent aspects of merge processing won't apply because
1984
+ # item is being merged into an empty dict.
1985
+ to_item = {}
1986
+ MergeDicts(to_item, item, to_file, fro_file)
1987
+ elif isinstance(item, list):
1988
+ # Recurse, making a copy of the list. If the list contains any
1989
+ # descendant dicts, path fixing will occur. Note that here, custom
1990
+ # values for is_paths and append are dropped; those are only to be
1991
+ # applied to |to| and |fro|, not sublists of |fro|. append shouldn't
1992
+ # matter anyway because the new |to_item| list is empty.
1993
+ to_item = []
1994
+ MergeLists(to_item, item, to_file, fro_file)
1995
+ else:
1996
+ raise TypeError, \
1997
+ 'Attempt to merge list item of unsupported type ' + \
1998
+ item.__class__.__name__
1999
+
2000
+ if append:
2001
+ # If appending a singleton that's already in the list, don't append.
2002
+ # This ensures that the earliest occurrence of the item will stay put.
2003
+ if not singleton or not is_in_set_or_list(to_item, hashable_to_set, to):
2004
+ to.append(to_item)
2005
+ if is_hashable(to_item):
2006
+ hashable_to_set.add(to_item)
2007
+ else:
2008
+ # If prepending a singleton that's already in the list, remove the
2009
+ # existing instance and proceed with the prepend. This ensures that the
2010
+ # item appears at the earliest possible position in the list.
2011
+ while singleton and to_item in to:
2012
+ to.remove(to_item)
2013
+
2014
+ # Don't just insert everything at index 0. That would prepend the new
2015
+ # items to the list in reverse order, which would be an unwelcome
2016
+ # surprise.
2017
+ to.insert(prepend_index, to_item)
2018
+ if is_hashable(to_item):
2019
+ hashable_to_set.add(to_item)
2020
+ prepend_index = prepend_index + 1
2021
+
2022
+
2023
+ def MergeDicts(to, fro, to_file, fro_file):
2024
+ # I wanted to name the parameter "from" but it's a Python keyword...
2025
+ for k, v in fro.iteritems():
2026
+ # It would be nice to do "if not k in to: to[k] = v" but that wouldn't give
2027
+ # copy semantics. Something else may want to merge from the |fro| dict
2028
+ # later, and having the same dict ref pointed to twice in the tree isn't
2029
+ # what anyone wants considering that the dicts may subsequently be
2030
+ # modified.
2031
+ if k in to:
2032
+ bad_merge = False
2033
+ if isinstance(v, str) or isinstance(v, int):
2034
+ if not (isinstance(to[k], str) or isinstance(to[k], int)):
2035
+ bad_merge = True
2036
+ elif v.__class__ != to[k].__class__:
2037
+ bad_merge = True
2038
+
2039
+ if bad_merge:
2040
+ raise TypeError, \
2041
+ 'Attempt to merge dict value of type ' + v.__class__.__name__ + \
2042
+ ' into incompatible type ' + to[k].__class__.__name__ + \
2043
+ ' for key ' + k
2044
+ if isinstance(v, str) or isinstance(v, int):
2045
+ # Overwrite the existing value, if any. Cheap and easy.
2046
+ is_path = IsPathSection(k)
2047
+ if is_path:
2048
+ to[k] = MakePathRelative(to_file, fro_file, v)
2049
+ else:
2050
+ to[k] = v
2051
+ elif isinstance(v, dict):
2052
+ # Recurse, guaranteeing copies will be made of objects that require it.
2053
+ if not k in to:
2054
+ to[k] = {}
2055
+ MergeDicts(to[k], v, to_file, fro_file)
2056
+ elif isinstance(v, list):
2057
+ # Lists in dicts can be merged with different policies, depending on
2058
+ # how the key in the "from" dict (k, the from-key) is written.
2059
+ #
2060
+ # If the from-key has ...the to-list will have this action
2061
+ # this character appended:... applied when receiving the from-list:
2062
+ # = replace
2063
+ # + prepend
2064
+ # ? set, only if to-list does not yet exist
2065
+ # (none) append
2066
+ #
2067
+ # This logic is list-specific, but since it relies on the associated
2068
+ # dict key, it's checked in this dict-oriented function.
2069
+ ext = k[-1]
2070
+ append = True
2071
+ if ext == '=':
2072
+ list_base = k[:-1]
2073
+ lists_incompatible = [list_base, list_base + '?']
2074
+ to[list_base] = []
2075
+ elif ext == '+':
2076
+ list_base = k[:-1]
2077
+ lists_incompatible = [list_base + '=', list_base + '?']
2078
+ append = False
2079
+ elif ext == '?':
2080
+ list_base = k[:-1]
2081
+ lists_incompatible = [list_base, list_base + '=', list_base + '+']
2082
+ else:
2083
+ list_base = k
2084
+ lists_incompatible = [list_base + '=', list_base + '?']
2085
+
2086
+ # Some combinations of merge policies appearing together are meaningless.
2087
+ # It's stupid to replace and append simultaneously, for example. Append
2088
+ # and prepend are the only policies that can coexist.
2089
+ for list_incompatible in lists_incompatible:
2090
+ if list_incompatible in fro:
2091
+ raise GypError('Incompatible list policies ' + k + ' and ' +
2092
+ list_incompatible)
2093
+
2094
+ if list_base in to:
2095
+ if ext == '?':
2096
+ # If the key ends in "?", the list will only be merged if it doesn't
2097
+ # already exist.
2098
+ continue
2099
+ if not isinstance(to[list_base], list):
2100
+ # This may not have been checked above if merging in a list with an
2101
+ # extension character.
2102
+ raise TypeError, \
2103
+ 'Attempt to merge dict value of type ' + v.__class__.__name__ + \
2104
+ ' into incompatible type ' + to[list_base].__class__.__name__ + \
2105
+ ' for key ' + list_base + '(' + k + ')'
2106
+ else:
2107
+ to[list_base] = []
2108
+
2109
+ # Call MergeLists, which will make copies of objects that require it.
2110
+ # MergeLists can recurse back into MergeDicts, although this will be
2111
+ # to make copies of dicts (with paths fixed), there will be no
2112
+ # subsequent dict "merging" once entering a list because lists are
2113
+ # always replaced, appended to, or prepended to.
2114
+ is_paths = IsPathSection(list_base)
2115
+ MergeLists(to[list_base], v, to_file, fro_file, is_paths, append)
2116
+ else:
2117
+ raise TypeError, \
2118
+ 'Attempt to merge dict value of unsupported type ' + \
2119
+ v.__class__.__name__ + ' for key ' + k
2120
+
2121
+
2122
+ def MergeConfigWithInheritance(new_configuration_dict, build_file,
2123
+ target_dict, configuration, visited):
2124
+ # Skip if previously visted.
2125
+ if configuration in visited:
2126
+ return
2127
+
2128
+ # Look at this configuration.
2129
+ configuration_dict = target_dict['configurations'][configuration]
2130
+
2131
+ # Merge in parents.
2132
+ for parent in configuration_dict.get('inherit_from', []):
2133
+ MergeConfigWithInheritance(new_configuration_dict, build_file,
2134
+ target_dict, parent, visited + [configuration])
2135
+
2136
+ # Merge it into the new config.
2137
+ MergeDicts(new_configuration_dict, configuration_dict,
2138
+ build_file, build_file)
2139
+
2140
+ # Drop abstract.
2141
+ if 'abstract' in new_configuration_dict:
2142
+ del new_configuration_dict['abstract']
2143
+
2144
+
2145
+ def SetUpConfigurations(target, target_dict):
2146
+ # key_suffixes is a list of key suffixes that might appear on key names.
2147
+ # These suffixes are handled in conditional evaluations (for =, +, and ?)
2148
+ # and rules/exclude processing (for ! and /). Keys with these suffixes
2149
+ # should be treated the same as keys without.
2150
+ key_suffixes = ['=', '+', '?', '!', '/']
2151
+
2152
+ build_file = gyp.common.BuildFile(target)
2153
+
2154
+ # Provide a single configuration by default if none exists.
2155
+ # TODO(mark): Signal an error if default_configurations exists but
2156
+ # configurations does not.
2157
+ if not 'configurations' in target_dict:
2158
+ target_dict['configurations'] = {'Default': {}}
2159
+ if not 'default_configuration' in target_dict:
2160
+ concrete = [i for i in target_dict['configurations'].iterkeys()
2161
+ if not target_dict['configurations'][i].get('abstract')]
2162
+ target_dict['default_configuration'] = sorted(concrete)[0]
2163
+
2164
+ for configuration in target_dict['configurations'].keys():
2165
+ old_configuration_dict = target_dict['configurations'][configuration]
2166
+ # Skip abstract configurations (saves work only).
2167
+ if old_configuration_dict.get('abstract'):
2168
+ continue
2169
+ # Configurations inherit (most) settings from the enclosing target scope.
2170
+ # Get the inheritance relationship right by making a copy of the target
2171
+ # dict.
2172
+ new_configuration_dict = copy.deepcopy(target_dict)
2173
+
2174
+ # Take out the bits that don't belong in a "configurations" section.
2175
+ # Since configuration setup is done before conditional, exclude, and rules
2176
+ # processing, be careful with handling of the suffix characters used in
2177
+ # those phases.
2178
+ delete_keys = []
2179
+ for key in new_configuration_dict:
2180
+ key_ext = key[-1:]
2181
+ if key_ext in key_suffixes:
2182
+ key_base = key[:-1]
2183
+ else:
2184
+ key_base = key
2185
+ if key_base in non_configuration_keys:
2186
+ delete_keys.append(key)
2187
+
2188
+ for key in delete_keys:
2189
+ del new_configuration_dict[key]
2190
+
2191
+ # Merge in configuration (with all its parents first).
2192
+ MergeConfigWithInheritance(new_configuration_dict, build_file,
2193
+ target_dict, configuration, [])
2194
+
2195
+ # Put the new result back into the target dict as a configuration.
2196
+ target_dict['configurations'][configuration] = new_configuration_dict
2197
+
2198
+ # Now drop all the abstract ones.
2199
+ for configuration in target_dict['configurations'].keys():
2200
+ old_configuration_dict = target_dict['configurations'][configuration]
2201
+ if old_configuration_dict.get('abstract'):
2202
+ del target_dict['configurations'][configuration]
2203
+
2204
+ # Now that all of the target's configurations have been built, go through
2205
+ # the target dict's keys and remove everything that's been moved into a
2206
+ # "configurations" section.
2207
+ delete_keys = []
2208
+ for key in target_dict:
2209
+ key_ext = key[-1:]
2210
+ if key_ext in key_suffixes:
2211
+ key_base = key[:-1]
2212
+ else:
2213
+ key_base = key
2214
+ if not key_base in non_configuration_keys:
2215
+ delete_keys.append(key)
2216
+ for key in delete_keys:
2217
+ del target_dict[key]
2218
+
2219
+ # Check the configurations to see if they contain invalid keys.
2220
+ for configuration in target_dict['configurations'].keys():
2221
+ configuration_dict = target_dict['configurations'][configuration]
2222
+ for key in configuration_dict.keys():
2223
+ if key in invalid_configuration_keys:
2224
+ raise GypError('%s not allowed in the %s configuration, found in '
2225
+ 'target %s' % (key, configuration, target))
2226
+
2227
+
2228
+
2229
+ def ProcessListFiltersInDict(name, the_dict):
2230
+ """Process regular expression and exclusion-based filters on lists.
2231
+
2232
+ An exclusion list is in a dict key named with a trailing "!", like
2233
+ "sources!". Every item in such a list is removed from the associated
2234
+ main list, which in this example, would be "sources". Removed items are
2235
+ placed into a "sources_excluded" list in the dict.
2236
+
2237
+ Regular expression (regex) filters are contained in dict keys named with a
2238
+ trailing "/", such as "sources/" to operate on the "sources" list. Regex
2239
+ filters in a dict take the form:
2240
+ 'sources/': [ ['exclude', '_(linux|mac|win)\\.cc$'],
2241
+ ['include', '_mac\\.cc$'] ],
2242
+ The first filter says to exclude all files ending in _linux.cc, _mac.cc, and
2243
+ _win.cc. The second filter then includes all files ending in _mac.cc that
2244
+ are now or were once in the "sources" list. Items matching an "exclude"
2245
+ filter are subject to the same processing as would occur if they were listed
2246
+ by name in an exclusion list (ending in "!"). Items matching an "include"
2247
+ filter are brought back into the main list if previously excluded by an
2248
+ exclusion list or exclusion regex filter. Subsequent matching "exclude"
2249
+ patterns can still cause items to be excluded after matching an "include".
2250
+ """
2251
+
2252
+ # Look through the dictionary for any lists whose keys end in "!" or "/".
2253
+ # These are lists that will be treated as exclude lists and regular
2254
+ # expression-based exclude/include lists. Collect the lists that are
2255
+ # needed first, looking for the lists that they operate on, and assemble
2256
+ # then into |lists|. This is done in a separate loop up front, because
2257
+ # the _included and _excluded keys need to be added to the_dict, and that
2258
+ # can't be done while iterating through it.
2259
+
2260
+ lists = []
2261
+ del_lists = []
2262
+ for key, value in the_dict.iteritems():
2263
+ operation = key[-1]
2264
+ if operation != '!' and operation != '/':
2265
+ continue
2266
+
2267
+ if not isinstance(value, list):
2268
+ raise ValueError, name + ' key ' + key + ' must be list, not ' + \
2269
+ value.__class__.__name__
2270
+
2271
+ list_key = key[:-1]
2272
+ if list_key not in the_dict:
2273
+ # This happens when there's a list like "sources!" but no corresponding
2274
+ # "sources" list. Since there's nothing for it to operate on, queue up
2275
+ # the "sources!" list for deletion now.
2276
+ del_lists.append(key)
2277
+ continue
2278
+
2279
+ if not isinstance(the_dict[list_key], list):
2280
+ value = the_dict[list_key]
2281
+ raise ValueError, name + ' key ' + list_key + \
2282
+ ' must be list, not ' + \
2283
+ value.__class__.__name__ + ' when applying ' + \
2284
+ {'!': 'exclusion', '/': 'regex'}[operation]
2285
+
2286
+ if not list_key in lists:
2287
+ lists.append(list_key)
2288
+
2289
+ # Delete the lists that are known to be unneeded at this point.
2290
+ for del_list in del_lists:
2291
+ del the_dict[del_list]
2292
+
2293
+ for list_key in lists:
2294
+ the_list = the_dict[list_key]
2295
+
2296
+ # Initialize the list_actions list, which is parallel to the_list. Each
2297
+ # item in list_actions identifies whether the corresponding item in
2298
+ # the_list should be excluded, unconditionally preserved (included), or
2299
+ # whether no exclusion or inclusion has been applied. Items for which
2300
+ # no exclusion or inclusion has been applied (yet) have value -1, items
2301
+ # excluded have value 0, and items included have value 1. Includes and
2302
+ # excludes override previous actions. All items in list_actions are
2303
+ # initialized to -1 because no excludes or includes have been processed
2304
+ # yet.
2305
+ list_actions = list((-1,) * len(the_list))
2306
+
2307
+ exclude_key = list_key + '!'
2308
+ if exclude_key in the_dict:
2309
+ for exclude_item in the_dict[exclude_key]:
2310
+ for index in xrange(0, len(the_list)):
2311
+ if exclude_item == the_list[index]:
2312
+ # This item matches the exclude_item, so set its action to 0
2313
+ # (exclude).
2314
+ list_actions[index] = 0
2315
+
2316
+ # The "whatever!" list is no longer needed, dump it.
2317
+ del the_dict[exclude_key]
2318
+
2319
+ regex_key = list_key + '/'
2320
+ if regex_key in the_dict:
2321
+ for regex_item in the_dict[regex_key]:
2322
+ [action, pattern] = regex_item
2323
+ pattern_re = re.compile(pattern)
2324
+
2325
+ if action == 'exclude':
2326
+ # This item matches an exclude regex, so set its value to 0 (exclude).
2327
+ action_value = 0
2328
+ elif action == 'include':
2329
+ # This item matches an include regex, so set its value to 1 (include).
2330
+ action_value = 1
2331
+ else:
2332
+ # This is an action that doesn't make any sense.
2333
+ raise ValueError, 'Unrecognized action ' + action + ' in ' + name + \
2334
+ ' key ' + regex_key
2335
+
2336
+ for index in xrange(0, len(the_list)):
2337
+ list_item = the_list[index]
2338
+ if list_actions[index] == action_value:
2339
+ # Even if the regex matches, nothing will change so continue (regex
2340
+ # searches are expensive).
2341
+ continue
2342
+ if pattern_re.search(list_item):
2343
+ # Regular expression match.
2344
+ list_actions[index] = action_value
2345
+
2346
+ # The "whatever/" list is no longer needed, dump it.
2347
+ del the_dict[regex_key]
2348
+
2349
+ # Add excluded items to the excluded list.
2350
+ #
2351
+ # Note that exclude_key ("sources!") is different from excluded_key
2352
+ # ("sources_excluded"). The exclude_key list is input and it was already
2353
+ # processed and deleted; the excluded_key list is output and it's about
2354
+ # to be created.
2355
+ excluded_key = list_key + '_excluded'
2356
+ if excluded_key in the_dict:
2357
+ raise GypError(name + ' key ' + excluded_key +
2358
+ ' must not be present prior '
2359
+ ' to applying exclusion/regex filters for ' + list_key)
2360
+
2361
+ excluded_list = []
2362
+
2363
+ # Go backwards through the list_actions list so that as items are deleted,
2364
+ # the indices of items that haven't been seen yet don't shift. That means
2365
+ # that things need to be prepended to excluded_list to maintain them in the
2366
+ # same order that they existed in the_list.
2367
+ for index in xrange(len(list_actions) - 1, -1, -1):
2368
+ if list_actions[index] == 0:
2369
+ # Dump anything with action 0 (exclude). Keep anything with action 1
2370
+ # (include) or -1 (no include or exclude seen for the item).
2371
+ excluded_list.insert(0, the_list[index])
2372
+ del the_list[index]
2373
+
2374
+ # If anything was excluded, put the excluded list into the_dict at
2375
+ # excluded_key.
2376
+ if len(excluded_list) > 0:
2377
+ the_dict[excluded_key] = excluded_list
2378
+
2379
+ # Now recurse into subdicts and lists that may contain dicts.
2380
+ for key, value in the_dict.iteritems():
2381
+ if isinstance(value, dict):
2382
+ ProcessListFiltersInDict(key, value)
2383
+ elif isinstance(value, list):
2384
+ ProcessListFiltersInList(key, value)
2385
+
2386
+
2387
+ def ProcessListFiltersInList(name, the_list):
2388
+ for item in the_list:
2389
+ if isinstance(item, dict):
2390
+ ProcessListFiltersInDict(name, item)
2391
+ elif isinstance(item, list):
2392
+ ProcessListFiltersInList(name, item)
2393
+
2394
+
2395
+ def ValidateTargetType(target, target_dict):
2396
+ """Ensures the 'type' field on the target is one of the known types.
2397
+
2398
+ Arguments:
2399
+ target: string, name of target.
2400
+ target_dict: dict, target spec.
2401
+
2402
+ Raises an exception on error.
2403
+ """
2404
+ VALID_TARGET_TYPES = ('executable', 'loadable_module',
2405
+ 'static_library', 'shared_library',
2406
+ 'none')
2407
+ target_type = target_dict.get('type', None)
2408
+ if target_type not in VALID_TARGET_TYPES:
2409
+ raise GypError("Target %s has an invalid target type '%s'. "
2410
+ "Must be one of %s." %
2411
+ (target, target_type, '/'.join(VALID_TARGET_TYPES)))
2412
+ if (target_dict.get('standalone_static_library', 0) and
2413
+ not target_type == 'static_library'):
2414
+ raise GypError('Target %s has type %s but standalone_static_library flag is'
2415
+ ' only valid for static_library type.' % (target,
2416
+ target_type))
2417
+
2418
+
2419
+ def ValidateSourcesInTarget(target, target_dict, build_file):
2420
+ # TODO: Check if MSVC allows this for loadable_module targets.
2421
+ if target_dict.get('type', None) not in ('static_library', 'shared_library'):
2422
+ return
2423
+ sources = target_dict.get('sources', [])
2424
+ basenames = {}
2425
+ for source in sources:
2426
+ name, ext = os.path.splitext(source)
2427
+ is_compiled_file = ext in [
2428
+ '.c', '.cc', '.cpp', '.cxx', '.m', '.mm', '.s', '.S']
2429
+ if not is_compiled_file:
2430
+ continue
2431
+ basename = os.path.basename(name) # Don't include extension.
2432
+ basenames.setdefault(basename, []).append(source)
2433
+
2434
+ error = ''
2435
+ for basename, files in basenames.iteritems():
2436
+ if len(files) > 1:
2437
+ error += ' %s: %s\n' % (basename, ' '.join(files))
2438
+
2439
+ if error:
2440
+ print('static library %s has several files with the same basename:\n' %
2441
+ target + error + 'Some build systems, e.g. MSVC08, '
2442
+ 'cannot handle that.')
2443
+ raise GypError('Duplicate basenames in sources section, see list above')
2444
+
2445
+
2446
+ def ValidateRulesInTarget(target, target_dict, extra_sources_for_rules):
2447
+ """Ensures that the rules sections in target_dict are valid and consistent,
2448
+ and determines which sources they apply to.
2449
+
2450
+ Arguments:
2451
+ target: string, name of target.
2452
+ target_dict: dict, target spec containing "rules" and "sources" lists.
2453
+ extra_sources_for_rules: a list of keys to scan for rule matches in
2454
+ addition to 'sources'.
2455
+ """
2456
+
2457
+ # Dicts to map between values found in rules' 'rule_name' and 'extension'
2458
+ # keys and the rule dicts themselves.
2459
+ rule_names = {}
2460
+ rule_extensions = {}
2461
+
2462
+ rules = target_dict.get('rules', [])
2463
+ for rule in rules:
2464
+ # Make sure that there's no conflict among rule names and extensions.
2465
+ rule_name = rule['rule_name']
2466
+ if rule_name in rule_names:
2467
+ raise GypError('rule %s exists in duplicate, target %s' %
2468
+ (rule_name, target))
2469
+ rule_names[rule_name] = rule
2470
+
2471
+ rule_extension = rule['extension']
2472
+ if rule_extension.startswith('.'):
2473
+ rule_extension = rule_extension[1:]
2474
+ if rule_extension in rule_extensions:
2475
+ raise GypError(('extension %s associated with multiple rules, ' +
2476
+ 'target %s rules %s and %s') %
2477
+ (rule_extension, target,
2478
+ rule_extensions[rule_extension]['rule_name'],
2479
+ rule_name))
2480
+ rule_extensions[rule_extension] = rule
2481
+
2482
+ # Make sure rule_sources isn't already there. It's going to be
2483
+ # created below if needed.
2484
+ if 'rule_sources' in rule:
2485
+ raise GypError(
2486
+ 'rule_sources must not exist in input, target %s rule %s' %
2487
+ (target, rule_name))
2488
+
2489
+ rule_sources = []
2490
+ source_keys = ['sources']
2491
+ source_keys.extend(extra_sources_for_rules)
2492
+ for source_key in source_keys:
2493
+ for source in target_dict.get(source_key, []):
2494
+ (source_root, source_extension) = os.path.splitext(source)
2495
+ if source_extension.startswith('.'):
2496
+ source_extension = source_extension[1:]
2497
+ if source_extension == rule_extension:
2498
+ rule_sources.append(source)
2499
+
2500
+ if len(rule_sources) > 0:
2501
+ rule['rule_sources'] = rule_sources
2502
+
2503
+
2504
+ def ValidateRunAsInTarget(target, target_dict, build_file):
2505
+ target_name = target_dict.get('target_name')
2506
+ run_as = target_dict.get('run_as')
2507
+ if not run_as:
2508
+ return
2509
+ if not isinstance(run_as, dict):
2510
+ raise GypError("The 'run_as' in target %s from file %s should be a "
2511
+ "dictionary." %
2512
+ (target_name, build_file))
2513
+ action = run_as.get('action')
2514
+ if not action:
2515
+ raise GypError("The 'run_as' in target %s from file %s must have an "
2516
+ "'action' section." %
2517
+ (target_name, build_file))
2518
+ if not isinstance(action, list):
2519
+ raise GypError("The 'action' for 'run_as' in target %s from file %s "
2520
+ "must be a list." %
2521
+ (target_name, build_file))
2522
+ working_directory = run_as.get('working_directory')
2523
+ if working_directory and not isinstance(working_directory, str):
2524
+ raise GypError("The 'working_directory' for 'run_as' in target %s "
2525
+ "in file %s should be a string." %
2526
+ (target_name, build_file))
2527
+ environment = run_as.get('environment')
2528
+ if environment and not isinstance(environment, dict):
2529
+ raise GypError("The 'environment' for 'run_as' in target %s "
2530
+ "in file %s should be a dictionary." %
2531
+ (target_name, build_file))
2532
+
2533
+
2534
+ def ValidateActionsInTarget(target, target_dict, build_file):
2535
+ '''Validates the inputs to the actions in a target.'''
2536
+ target_name = target_dict.get('target_name')
2537
+ actions = target_dict.get('actions', [])
2538
+ for action in actions:
2539
+ action_name = action.get('action_name')
2540
+ if not action_name:
2541
+ raise GypError("Anonymous action in target %s. "
2542
+ "An action must have an 'action_name' field." %
2543
+ target_name)
2544
+ inputs = action.get('inputs', None)
2545
+ if inputs is None:
2546
+ raise GypError('Action in target %s has no inputs.' % target_name)
2547
+ action_command = action.get('action')
2548
+ if action_command and not action_command[0]:
2549
+ raise GypError("Empty action as command in target %s." % target_name)
2550
+
2551
+
2552
+ def TurnIntIntoStrInDict(the_dict):
2553
+ """Given dict the_dict, recursively converts all integers into strings.
2554
+ """
2555
+ # Use items instead of iteritems because there's no need to try to look at
2556
+ # reinserted keys and their associated values.
2557
+ for k, v in the_dict.items():
2558
+ if isinstance(v, int):
2559
+ v = str(v)
2560
+ the_dict[k] = v
2561
+ elif isinstance(v, dict):
2562
+ TurnIntIntoStrInDict(v)
2563
+ elif isinstance(v, list):
2564
+ TurnIntIntoStrInList(v)
2565
+
2566
+ if isinstance(k, int):
2567
+ the_dict[str(k)] = v
2568
+ del the_dict[k]
2569
+
2570
+
2571
+ def TurnIntIntoStrInList(the_list):
2572
+ """Given list the_list, recursively converts all integers into strings.
2573
+ """
2574
+ for index in xrange(0, len(the_list)):
2575
+ item = the_list[index]
2576
+ if isinstance(item, int):
2577
+ the_list[index] = str(item)
2578
+ elif isinstance(item, dict):
2579
+ TurnIntIntoStrInDict(item)
2580
+ elif isinstance(item, list):
2581
+ TurnIntIntoStrInList(item)
2582
+
2583
+
2584
+ def PruneUnwantedTargets(targets, flat_list, dependency_nodes, root_targets,
2585
+ data):
2586
+ """Return only the targets that are deep dependencies of |root_targets|."""
2587
+ qualified_root_targets = []
2588
+ for target in root_targets:
2589
+ target = target.strip()
2590
+ qualified_targets = gyp.common.FindQualifiedTargets(target, flat_list)
2591
+ if not qualified_targets:
2592
+ raise GypError("Could not find target %s" % target)
2593
+ qualified_root_targets.extend(qualified_targets)
2594
+
2595
+ wanted_targets = {}
2596
+ for target in qualified_root_targets:
2597
+ wanted_targets[target] = targets[target]
2598
+ for dependency in dependency_nodes[target].DeepDependencies():
2599
+ wanted_targets[dependency] = targets[dependency]
2600
+
2601
+ wanted_flat_list = [t for t in flat_list if t in wanted_targets]
2602
+
2603
+ # Prune unwanted targets from each build_file's data dict.
2604
+ for build_file in data['target_build_files']:
2605
+ if not 'targets' in data[build_file]:
2606
+ continue
2607
+ new_targets = []
2608
+ for target in data[build_file]['targets']:
2609
+ qualified_name = gyp.common.QualifiedTarget(build_file,
2610
+ target['target_name'],
2611
+ target['toolset'])
2612
+ if qualified_name in wanted_targets:
2613
+ new_targets.append(target)
2614
+ data[build_file]['targets'] = new_targets
2615
+
2616
+ return wanted_targets, wanted_flat_list
2617
+
2618
+
2619
+ def VerifyNoCollidingTargets(targets):
2620
+ """Verify that no two targets in the same directory share the same name.
2621
+
2622
+ Arguments:
2623
+ targets: A list of targets in the form 'path/to/file.gyp:target_name'.
2624
+ """
2625
+ # Keep a dict going from 'subdirectory:target_name' to 'foo.gyp'.
2626
+ used = {}
2627
+ for target in targets:
2628
+ # Separate out 'path/to/file.gyp, 'target_name' from
2629
+ # 'path/to/file.gyp:target_name'.
2630
+ path, name = target.rsplit(':', 1)
2631
+ # Separate out 'path/to', 'file.gyp' from 'path/to/file.gyp'.
2632
+ subdir, gyp = os.path.split(path)
2633
+ # Use '.' for the current directory '', so that the error messages make
2634
+ # more sense.
2635
+ if not subdir:
2636
+ subdir = '.'
2637
+ # Prepare a key like 'path/to:target_name'.
2638
+ key = subdir + ':' + name
2639
+ if key in used:
2640
+ # Complain if this target is already used.
2641
+ raise GypError('Duplicate target name "%s" in directory "%s" used both '
2642
+ 'in "%s" and "%s".' % (name, subdir, gyp, used[key]))
2643
+ used[key] = gyp
2644
+
2645
+
2646
+ def SetGeneratorGlobals(generator_input_info):
2647
+ # Set up path_sections and non_configuration_keys with the default data plus
2648
+ # the generator-specific data.
2649
+ global path_sections
2650
+ path_sections = base_path_sections[:]
2651
+ path_sections.extend(generator_input_info['path_sections'])
2652
+
2653
+ global non_configuration_keys
2654
+ non_configuration_keys = base_non_configuration_keys[:]
2655
+ non_configuration_keys.extend(generator_input_info['non_configuration_keys'])
2656
+
2657
+ global multiple_toolsets
2658
+ multiple_toolsets = generator_input_info[
2659
+ 'generator_supports_multiple_toolsets']
2660
+
2661
+ global generator_filelist_paths
2662
+ generator_filelist_paths = generator_input_info['generator_filelist_paths']
2663
+
2664
+
2665
+ def Load(build_files, variables, includes, depth, generator_input_info, check,
2666
+ circular_check, parallel, root_targets):
2667
+ SetGeneratorGlobals(generator_input_info)
2668
+ # A generator can have other lists (in addition to sources) be processed
2669
+ # for rules.
2670
+ extra_sources_for_rules = generator_input_info['extra_sources_for_rules']
2671
+
2672
+ # Load build files. This loads every target-containing build file into
2673
+ # the |data| dictionary such that the keys to |data| are build file names,
2674
+ # and the values are the entire build file contents after "early" or "pre"
2675
+ # processing has been done and includes have been resolved.
2676
+ # NOTE: data contains both "target" files (.gyp) and "includes" (.gypi), as
2677
+ # well as meta-data (e.g. 'included_files' key). 'target_build_files' keeps
2678
+ # track of the keys corresponding to "target" files.
2679
+ data = {'target_build_files': set()}
2680
+ aux_data = {}
2681
+ # Normalize paths everywhere. This is important because paths will be
2682
+ # used as keys to the data dict and for references between input files.
2683
+ build_files = set(map(os.path.normpath, build_files))
2684
+ if parallel:
2685
+ LoadTargetBuildFilesParallel(build_files, data, aux_data,
2686
+ variables, includes, depth, check,
2687
+ generator_input_info)
2688
+ else:
2689
+ for build_file in build_files:
2690
+ try:
2691
+ LoadTargetBuildFile(build_file, data, aux_data,
2692
+ variables, includes, depth, check, True)
2693
+ except Exception, e:
2694
+ gyp.common.ExceptionAppend(e, 'while trying to load %s' % build_file)
2695
+ raise
2696
+
2697
+ # Build a dict to access each target's subdict by qualified name.
2698
+ targets = BuildTargetsDict(data)
2699
+
2700
+ # Fully qualify all dependency links.
2701
+ QualifyDependencies(targets)
2702
+
2703
+ # Remove self-dependencies from targets that have 'prune_self_dependencies'
2704
+ # set to 1.
2705
+ RemoveSelfDependencies(targets)
2706
+
2707
+ # Expand dependencies specified as build_file:*.
2708
+ ExpandWildcardDependencies(targets, data)
2709
+
2710
+ # Apply exclude (!) and regex (/) list filters only for dependency_sections.
2711
+ for target_name, target_dict in targets.iteritems():
2712
+ tmp_dict = {}
2713
+ for key_base in dependency_sections:
2714
+ for op in ('', '!', '/'):
2715
+ key = key_base + op
2716
+ if key in target_dict:
2717
+ tmp_dict[key] = target_dict[key]
2718
+ del target_dict[key]
2719
+ ProcessListFiltersInDict(target_name, tmp_dict)
2720
+ # Write the results back to |target_dict|.
2721
+ for key in tmp_dict:
2722
+ target_dict[key] = tmp_dict[key]
2723
+
2724
+ # Make sure every dependency appears at most once.
2725
+ RemoveDuplicateDependencies(targets)
2726
+
2727
+ if circular_check:
2728
+ # Make sure that any targets in a.gyp don't contain dependencies in other
2729
+ # .gyp files that further depend on a.gyp.
2730
+ VerifyNoGYPFileCircularDependencies(targets)
2731
+
2732
+ [dependency_nodes, flat_list] = BuildDependencyList(targets)
2733
+
2734
+ if root_targets:
2735
+ # Remove, from |targets| and |flat_list|, the targets that are not deep
2736
+ # dependencies of the targets specified in |root_targets|.
2737
+ targets, flat_list = PruneUnwantedTargets(
2738
+ targets, flat_list, dependency_nodes, root_targets, data)
2739
+
2740
+ # Check that no two targets in the same directory have the same name.
2741
+ VerifyNoCollidingTargets(flat_list)
2742
+
2743
+ # Handle dependent settings of various types.
2744
+ for settings_type in ['all_dependent_settings',
2745
+ 'direct_dependent_settings',
2746
+ 'link_settings']:
2747
+ DoDependentSettings(settings_type, flat_list, targets, dependency_nodes)
2748
+
2749
+ # Take out the dependent settings now that they've been published to all
2750
+ # of the targets that require them.
2751
+ for target in flat_list:
2752
+ if settings_type in targets[target]:
2753
+ del targets[target][settings_type]
2754
+
2755
+ # Make sure static libraries don't declare dependencies on other static
2756
+ # libraries, but that linkables depend on all unlinked static libraries
2757
+ # that they need so that their link steps will be correct.
2758
+ gii = generator_input_info
2759
+ if gii['generator_wants_static_library_dependencies_adjusted']:
2760
+ AdjustStaticLibraryDependencies(flat_list, targets, dependency_nodes,
2761
+ gii['generator_wants_sorted_dependencies'])
2762
+
2763
+ # Apply "post"/"late"/"target" variable expansions and condition evaluations.
2764
+ for target in flat_list:
2765
+ target_dict = targets[target]
2766
+ build_file = gyp.common.BuildFile(target)
2767
+ ProcessVariablesAndConditionsInDict(
2768
+ target_dict, PHASE_LATE, variables, build_file)
2769
+
2770
+ # Move everything that can go into a "configurations" section into one.
2771
+ for target in flat_list:
2772
+ target_dict = targets[target]
2773
+ SetUpConfigurations(target, target_dict)
2774
+
2775
+ # Apply exclude (!) and regex (/) list filters.
2776
+ for target in flat_list:
2777
+ target_dict = targets[target]
2778
+ ProcessListFiltersInDict(target, target_dict)
2779
+
2780
+ # Apply "latelate" variable expansions and condition evaluations.
2781
+ for target in flat_list:
2782
+ target_dict = targets[target]
2783
+ build_file = gyp.common.BuildFile(target)
2784
+ ProcessVariablesAndConditionsInDict(
2785
+ target_dict, PHASE_LATELATE, variables, build_file)
2786
+
2787
+ # Make sure that the rules make sense, and build up rule_sources lists as
2788
+ # needed. Not all generators will need to use the rule_sources lists, but
2789
+ # some may, and it seems best to build the list in a common spot.
2790
+ # Also validate actions and run_as elements in targets.
2791
+ for target in flat_list:
2792
+ target_dict = targets[target]
2793
+ build_file = gyp.common.BuildFile(target)
2794
+ ValidateTargetType(target, target_dict)
2795
+ # TODO(thakis): Get vpx_scale/arm/scalesystemdependent.c to be renamed to
2796
+ # scalesystemdependent_arm_additions.c or similar.
2797
+ if 'arm' not in variables.get('target_arch', ''):
2798
+ ValidateSourcesInTarget(target, target_dict, build_file)
2799
+ ValidateRulesInTarget(target, target_dict, extra_sources_for_rules)
2800
+ ValidateRunAsInTarget(target, target_dict, build_file)
2801
+ ValidateActionsInTarget(target, target_dict, build_file)
2802
+
2803
+ # Generators might not expect ints. Turn them into strs.
2804
+ TurnIntIntoStrInDict(data)
2805
+
2806
+ # TODO(mark): Return |data| for now because the generator needs a list of
2807
+ # build files that came in. In the future, maybe it should just accept
2808
+ # a list, and not the whole data dict.
2809
+ return [flat_list, targets, data]