tree-sitter 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +29 -8
- data/Rakefile +19 -4
- data/ext/tree-sitter/Makefile +24 -0
- data/ext/tree-sitter/document.c +149 -0
- data/ext/tree-sitter/document.h +17 -0
- data/ext/tree-sitter/extconf.rb +55 -15
- data/ext/tree-sitter/node.c +300 -0
- data/ext/tree-sitter/node.h +34 -0
- data/ext/tree-sitter/out/document.o +0 -0
- data/ext/tree-sitter/out/get_changed_ranges.o +0 -0
- data/ext/tree-sitter/out/language.o +0 -0
- data/ext/tree-sitter/out/lexer.o +0 -0
- data/ext/tree-sitter/out/libruntime.a +0 -0
- data/ext/tree-sitter/out/node.o +0 -0
- data/ext/tree-sitter/out/parser.o +0 -0
- data/ext/tree-sitter/out/python/parser.c +65600 -0
- data/ext/tree-sitter/out/python/parser.o +0 -0
- data/ext/tree-sitter/out/python/scanner.cc +164 -0
- data/ext/tree-sitter/out/python/scanner.o +0 -0
- data/ext/tree-sitter/out/stack.o +0 -0
- data/ext/tree-sitter/out/string_input.o +0 -0
- data/ext/tree-sitter/out/tree.o +0 -0
- data/ext/tree-sitter/out/utf16.o +0 -0
- data/ext/tree-sitter/out/utf8proc.o +0 -0
- data/ext/tree-sitter/tree-sitter.c +4 -109
- data/ext/tree-sitter/tree-sitter.h +4 -0
- data/ext/tree-sitter/tree-sitter/LICENSE +7 -0
- data/ext/tree-sitter/tree-sitter/README.md +13 -13
- data/ext/tree-sitter/tree-sitter/appveyor.yml +24 -0
- data/ext/tree-sitter/tree-sitter/docs/Gemfile +2 -0
- data/ext/tree-sitter/tree-sitter/docs/Gemfile.lock +239 -0
- data/ext/tree-sitter/tree-sitter/docs/_config.yml +1 -0
- data/ext/tree-sitter/tree-sitter/docs/_layouts/table-of-contents.html +74 -0
- data/ext/tree-sitter/tree-sitter/docs/creating-parsers.md +360 -0
- data/ext/tree-sitter/tree-sitter/docs/css/style.css +13 -0
- data/ext/tree-sitter/tree-sitter/docs/index.md +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/PRESUBMIT.py +10 -2
- data/ext/tree-sitter/tree-sitter/externals/gyp/buildbot/aosp_manifest.xml +466 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/buildbot/buildbot_run.py +91 -30
- data/ext/tree-sitter/tree-sitter/externals/gyp/gyp +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/gyptest.py +3 -3
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSNew.py +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSSettings.py +11 -5
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSSettings_test.py +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSUtil.py +18 -15
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSVersion.py +53 -20
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/__init__.py +4 -6
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/__init__.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/common.py +69 -2
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/common.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/flock_tool.py +6 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/__init__.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/analyzer.py +569 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/android.py +133 -111
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/cmake.py +3 -3
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/eclipse.py +112 -22
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/gypd.py +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/make.py +45 -14
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/make.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/msvs.py +170 -98
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/ninja.py +300 -71
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/ninja_test.py +12 -9
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/xcode.py +46 -12
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/xcode.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/input.py +379 -335
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/input.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/input_test.py +7 -7
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/mac_tool.py +94 -3
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/msvs_emulation.py +131 -40
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/simple_copy.py +46 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/win_tool.py +28 -5
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/xcode_emulation.py +185 -88
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/xcode_emulation.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/xcode_ninja.py +268 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/xcodeproj_file.py +53 -46
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/xcodeproj_file.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-bare/gyptest-bare.py +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-depfile/depfile.gyp +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-depfile/gyptest-all.py +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-depfile/input.txt +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-none/gyptest-none.py +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/gyptest-all.py +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/gyptest-default.py +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/gyptest-generated-header.py +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir1/program.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir3/generate_main.py +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/additional-targets/gyptest-additional.py +8 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/analyzer/common.gypi +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/analyzer/gyptest-analyzer.py +356 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/analyzer/subdir/subdir.gyp +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/analyzer/subdir/subdir2/subdir2.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/analyzer/subdir2/subdir.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/analyzer/subdir2/subdir.includes.gypi +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/analyzer/test.gyp +113 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/analyzer/test2.gyp +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/analyzer/test2.includes.gypi +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/analyzer/test2.includes.includes.gypi +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/analyzer/test2.toplevel_includes.gypi +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/analyzer/test3.gyp +77 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/analyzer/test4.gyp +80 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/analyzer/test5.gyp +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/android/32or64.c +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/android/file.in +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/android/gyptest-host-multilib.py +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/android/gyptest-make-functions.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/android/gyptest-noalias.py +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/android/gyptest-settings-list.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/android/gyptest-settings.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/android/gyptest-space-filenames.py +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/android/hello.c +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/android/hello.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/android/host_32or64.gyp +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/android/make_functions.gyp +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/android/settings-list.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/android/settings.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/android/space_filenames.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/android/writefile.c +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/program.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/build-option/gyptest-build.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/build-option/hello.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/prog1.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/prog2.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/subdir3/prog3.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/cflags/cflags.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/cflags/gyptest-cflags.py +15 -55
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compilable/src/program.cpp +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/{compiler.gyp → compiler-exe.gyp} +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/compiler-shared-lib.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/gyptest-compiler-env-toolchain.py +78 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/gyptest-compiler-env.py +9 -11
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/gyptest-compiler-global-settings.py +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/my_nm.py +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/my_readelf.py +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/conditions/elseif/elseif.gyp +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/conditions/elseif/elseif_bad1.gyp +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/conditions/elseif/elseif_bad2.gyp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/conditions/elseif/elseif_bad3.gyp +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/conditions/elseif/elseif_conditions.gypi +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/conditions/elseif/gyptest_elseif.py +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/conditions/elseif/program.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/basics/configurations.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/basics/gyptest-configurations.py +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/inheritance/configurations.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/inheritance/duplicates.gyp +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/inheritance/duplicates.gypd.golden +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/inheritance/gyptest-duplicates.py +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/inheritance/gyptest-inheritance.py +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/target_platform/front.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/x64/configurations.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-all.py +3 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-default.py +3 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-samedir.py +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-slash.py +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-updir.py +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/cxxflags/cxxflags.cc +4 -4
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/cxxflags/cxxflags.gyp +0 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/cxxflags/gyptest-cxxflags.py +13 -33
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines-escaping/defines-escaping.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/defines.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/gyptest-extra-targets.py +2 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/gyptest-lib-only.py +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependency-copy/src/file1.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependency-copy/src/file2.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/empty-target/empty-target.gyp +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/empty-target/gyptest-empty-target.py +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/dependency_cycle.gyp +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/file_cycle0.gyp +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/file_cycle1.gyp +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/gyptest-errors.py +10 -2
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/exclusion/hello.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/program.cc +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir1/program.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-copies.py +3 -2
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/program.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/prog1.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/deeper/deeper.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/prog2.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir3/prog3.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/gyp-defines/gyptest-multiple-values.py +2 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/hello.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/hello2.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/home_dot_gyp/src/printfoo.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/includes.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/subdir/subdir_includes.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/intermediate_dir/gyptest-intermediate-dir.py +2 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/Images.xcassets/AppIcon.appiconset/Contents.json +58 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/Contents.json +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain.png +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@2x.png +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@3x.png +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/test-assets-catalog.gyp +45 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/test-crosscompile.gyp +47 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/test.gyp +0 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/tool_main.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/extension/ActionExtension/ActionViewController.h +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/extension/ActionExtension/ActionViewController.m +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/extension/ActionExtension/Info.plist +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/extension/ActionExtension/MainInterface.storyboard +63 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/extension/ExtensionContainer/AppDelegate.h +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/extension/ExtensionContainer/AppDelegate.m +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/extension/ExtensionContainer/Base.lproj/Main.storyboard +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/extension/ExtensionContainer/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/extension/ExtensionContainer/Images.xcassets/LaunchImage.launchimage/Contents.json +51 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/extension/ExtensionContainer/Info.plist +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/extension/ExtensionContainer/ViewController.h +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/extension/ExtensionContainer/ViewController.m +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/extension/ExtensionContainer/main.m +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/extension/extension.gyp +85 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/gyptest-app-ios-assets-catalog.py +57 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/gyptest-app-ios.py +7 -7
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/gyptest-archs.py +22 -70
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/gyptest-crosscompile.py +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/gyptest-extension.py +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/gyptest-watch.py +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/gyptest-xcode-ninja.py +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/watch/WatchApp/Images.xcassets/AppIcon.appiconset/Contents.json +62 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/watch/WatchApp/Images.xcassets/LaunchImage.launchimage/Contents.json +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/watch/WatchApp/Info.plist +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/watch/WatchApp/Interface.storyboard +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/watch/WatchContainer/AppDelegate.h +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/watch/WatchContainer/AppDelegate.m +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/watch/WatchContainer/Base.lproj/Main.storyboard +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/watch/WatchContainer/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/watch/WatchContainer/Images.xcassets/LaunchImage.launchimage/Contents.json +51 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/watch/WatchContainer/Info.plist +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/watch/WatchContainer/ViewController.h +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/watch/WatchContainer/ViewController.m +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/watch/WatchContainer/main.m +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/watch/WatchKitExtension/Images.xcassets/MyImage.imageset/Contents.json +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/watch/WatchKitExtension/Info.plist +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/watch/WatchKitExtension/InterfaceController.h +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/watch/WatchKitExtension/InterfaceController.m +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/watch/WatchKitExtension/MainInterface.storyboard +63 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/watch/watch.gyp +105 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/lib/TestGyp.py +349 -46
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/lib/TestMac.py +73 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/lib/TestWin.py +101 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/gyptest-shared.py +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/gyptest-static.py +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/program.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/link-dependency/gyptest-link-dependency.py +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/link-dependency/main.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/link-dependency/mymalloc.c +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/link-dependency/test.gyp +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/link-objects/base.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/Images.xcassets/AppIcon.appiconset/Contents.json +58 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/Contents.json +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain.png +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@2x.png +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@3x.png +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/test-assets-catalog.gyp +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/file_a.cc +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/file_a.h +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/file_b.cc +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/file_b.h +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/file_c.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/file_d.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/test-archs-multiarch.gyp +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/test-dependencies.gyp +92 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/test-valid-archs.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/clang-cxx-library/libc++.cc +2 -2
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/clang-cxx-library/libstdc++.cc +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-action-envvars.py +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-app-assets-catalog.py +120 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-app-error.py +2 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-app.py +8 -20
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-archs.py +39 -33
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-cflags.py +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-clang-cxx-library.py +3 -4
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-global-settings.py +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-installname.py +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-ldflags-passed-to-libtool.py +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-ldflags.py +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-libraries.py +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-libtool-zero.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-loadable-module-bundle-product-extension.py +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-loadable-module.py +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-objc-gc.py +24 -18
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-postbuild-copy-bundle.py +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-postbuild-fail.py +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-prefixheader.py +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-rpath.py +5 -4
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-strip.py +13 -5
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-swift-library.py +62 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-type-envvars.py +3 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-xcode-env-order.py +2 -6
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-xcode-support-actions.py +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/libtool-zero/mylib.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/{errors/duplicate_basenames.gyp → mac/libtool-zero/test.gyp} +6 -4
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/loadable-module-bundle-product-extension/src.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/loadable-module-bundle-product-extension/test.gyp +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/swift-library/Info.plist +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/swift-library/file.swift +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/swift-library/test.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_bundle_executable.sh +1 -2
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_bundle_loadable_module.sh +1 -2
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_bundle_shared_library.sh +1 -2
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_check_sdkroot.sh +47 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_nonbundle_executable.sh +2 -2
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_nonbundle_loadable_module.sh +1 -2
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_nonbundle_none.sh +1 -2
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_nonbundle_shared_library.sh +1 -2
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_nonbundle_static_library.sh +1 -2
- data/ext/tree-sitter/tree-sitter/{out/Release/linker.lock → externals/gyp/test/mac/xcode-support-actions/source.c} +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-support-actions/test.gyp +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/main.cc +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/noload/main.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/ar/gyptest-make_global_settings_ar.py +123 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/ar/make_global_settings_ar.gyp +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/basics/gyptest-make_global_settings.py +2 -2
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/full-toolchain/bar.cc +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/full-toolchain/foo.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/full-toolchain/gyptest-make_global_settings.py +48 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/full-toolchain/make_global_settings.gyp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/full-toolchain/my_nm.py +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/full-toolchain/my_readelf.py +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/ld/gyptest-make_global_settings_ld.py +130 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/ld/make_global_settings_ld.gyp +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/gyptest-many-actions-unsorted.py +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/buildevents/gyptest-ninja-warnings.py +2 -2
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/config_attrs/hello.c +2 -2
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/hello.cpp +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/filters/gyptest-filters-2010.py +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/list_excluded/hello.cpp +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/multiple_actions_error_handling/action_fail.py +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/multiple_actions_error_handling/action_succeed.py +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/multiple_actions_error_handling/actions.gyp +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/multiple_actions_error_handling/gyptest.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/props/hello.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/shared_output/hello.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/shared_output/there/there.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/uldi2010/hello.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/gyptest-all.py +0 -3
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/gyptest-default.py +0 -3
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/src/prog1.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/src/prog2.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action-rule-hash/gyptest-action-rule-hash.py +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action-rule-hash/subdir/action-rule-hash.gyp +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action-rule-hash/subdir/emit.py +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/gyptest-action-dependencies.py +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/chained-dependency/chained.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/chained-dependency/gyptest-chained-dependency.py +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/empty-and-non-empty-duplicate-name/gyptest-empty-and-non-empty-duplicate-name.py +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/empty-and-non-empty-duplicate-name/subdir/included.gyp +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/empty-and-non-empty-duplicate-name/test.gyp +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/normalize-paths-win/gyptest-normalize-paths.py +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/normalize-paths-win/normalize-paths.gyp +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/solibs_avoid_relinking/gyptest-solibs-avoid-relinking.py +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/use-console/foo.bar +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/use-console/gyptest-use-console.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/use-console/use-console.gyp +60 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-cpp/gyptest-no-cpp.py +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/product/hello.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/gyptest-prune-targets.py +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/gyptest-dirname.py +17 -3
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/a/b/c.gencc +2 -5
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/foo/bar/baz.gencc +2 -5
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/input-rule-dirname.gyp +62 -14
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/main.cc +2 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/nodir.gencc +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/src/main.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-use-built-dependencies/gyptest-use-built-dependencies.py +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/gyptest-all.py +7 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/gyptest-default.py +7 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/actions.gyp +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/special-variables.gyp +0 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir1/program.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir2/both_rule_and_action_input.gyp +50 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir2/program.c +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir3/program.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir4/build-asm.gyp +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir4/program.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/gyptest-shared.py +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/gyptest-static.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/double-shared.gyp +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/double-static.gyp +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/prog1.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/prog2.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/prog3.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name-different-directory/gyptest-all.py +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/gyptest-all.py +6 -3
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/gyptest-relocate.py +6 -3
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/src/prog1/prog1.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/src/prog2/prog2.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone-static-library/prog.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-SYMROOT-all.py +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-SYMROOT-default.py +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/prog1.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/subdir/prog2.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/subdir/subdir2/prog3.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toolsets/main.cc +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toplevel-dir/gyptest-toplevel-dir.py +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toplevel-dir/src/sub1/prog1.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toplevel-dir/src/sub2/prog2.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/gyptest-commands-repeated-multidir.py +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/repeated_multidir/dir_1/test_1.gyp +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/repeated_multidir/dir_2/test_2.gyp +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/repeated_multidir/main.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/repeated_multidir/print_cwd_basename.py +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/repeated_multidir/repeated_command_common.gypi +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/latelate/src/program.cc +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/command-quote/command-quote.gyp +0 -5
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/command-quote/subdir/and/another/in-subdir.gyp +0 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/calling-convention-cdecl.def +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/calling-convention-fastcall.def +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/calling-convention-stdcall.def +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/calling-convention-vectorcall.def +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/calling-convention.cc +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/calling-convention.gyp +66 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/enable-enhanced-instruction-set.cc +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/enable-enhanced-instruction-set.gyp +68 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/floating-point-model-fast.cc +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/floating-point-model-precise.cc +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/floating-point-model-strict.cc +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/floating-point-model.gyp +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/enable-winrt/dllmain.cc +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/enable-winrt/enable-winrt.gyp +39 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/generator-output-different-drive/prog.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-calling-convention.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-enable-enhanced-instruction-set.py +44 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-floating-point-model.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-base-address.py +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-enable-winrt.py +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-pdb-no-output.py +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-pdb-output.py +0 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-profile.py +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-restat-importlib.py +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-safeseh.py +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-shard.py +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-macro-targetext.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-macro-targetfilename.py +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-macro-targetpath.py +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-midl-excluded.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-midl-includedirs.py +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-midl-rules.py +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-ml-safeseh.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-system-include.py +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/idl-excluded/bad.idl +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/idl-excluded/copy-file.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/idl-excluded/idl-excluded.gyp +58 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/idl-excluded/program.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/idl-includedirs/hello.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/idl-includedirs/idl-includedirs.gyp +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/idl-includedirs/subdir/bar.idl +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/idl-includedirs/subdir/foo.idl +14 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/idl-rules/Window.idl +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/idl-rules/basic-idl.gyp +67 -42
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/idl-rules/idl_compiler.py +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/large-pdb/main.cc +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/pdb-output.gyp +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/safeseh.gyp +47 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/safeseh_hello.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/safeseh_zero.asm +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/update_pgd.py +3 -3
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/ml-safeseh/a.asm +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/ml-safeseh/hello.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/ml-safeseh/ml-safeseh.gyp +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/precompiled/hello.c +1 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/shard/hello.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/shard/shard.gyp +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/shard/shard_ref.gyp +41 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/system-include/bar/header.h +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/system-include/common/commonheader.h +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/system-include/foo/header.h +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/system-include/main.cc +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/system-include/test.gyp +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/containing-gyp.gyp +0 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/input-output-macros.gyp +0 -1
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/targetext.gyp +59 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/targetfilename.gyp +59 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/targetpath.gyp +59 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/win-tool/copies_readonly_files.gyp +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/win-tool/gyptest-win-tool-handles-readonly-files.py +55 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/emacs/gyp.el +36 -13
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/pretty_sln.py +4 -3
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/CMakeLists.txt +4 -2
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/MANIFEST +3 -3
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/Makefile +11 -6
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/NEWS.md +69 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/README.md +4 -2
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/bench/bench.c +2 -2
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/data/Makefile +12 -9
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/data/data_generator.rb +125 -42
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/custom.c +27 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/iterate.c +8 -2
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/printproperty.c +5 -7
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/utf8proc.c +209 -98
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/utf8proc.h +126 -28
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/utf8proc_data.c +12976 -15342
- data/ext/tree-sitter/tree-sitter/include/tree_sitter/compiler.h +2 -0
- data/ext/tree-sitter/tree-sitter/include/tree_sitter/parser.h +73 -74
- data/ext/tree-sitter/tree-sitter/include/tree_sitter/runtime.h +29 -20
- data/ext/tree-sitter/tree-sitter/project.gyp +13 -24
- data/ext/tree-sitter/tree-sitter/script/benchmark +76 -0
- data/ext/tree-sitter/tree-sitter/script/build-fuzzers +66 -0
- data/ext/tree-sitter/tree-sitter/script/ci +2 -1
- data/ext/tree-sitter/tree-sitter/script/configure.cmd +3 -0
- data/ext/tree-sitter/tree-sitter/script/fetch-fixtures +13 -9
- data/ext/tree-sitter/tree-sitter/script/fetch-fixtures.cmd +26 -0
- data/ext/tree-sitter/tree-sitter/script/reproduce +1 -0
- data/ext/tree-sitter/tree-sitter/script/run-fuzzer +57 -0
- data/ext/tree-sitter/tree-sitter/script/test +47 -8
- data/ext/tree-sitter/tree-sitter/script/test.cmd +2 -0
- data/ext/tree-sitter/tree-sitter/script/trim-whitespace +1 -1
- data/ext/tree-sitter/tree-sitter/script/util/scan-build.sh +24 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_item.cc +60 -41
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_item.h +6 -7
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_item_transitions.cc +108 -101
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_item_transitions.h +1 -4
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_table_builder.cc +537 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_table_builder.h +57 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lookahead_set.cc +93 -19
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lookahead_set.h +90 -5
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/parse_item.cc +77 -29
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/parse_item.h +4 -9
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/parse_item_set_builder.cc +229 -94
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/parse_item_set_builder.h +9 -3
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/parse_table_builder.cc +893 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/parse_table_builder.h +38 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/rule_can_be_blank.cc +34 -35
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/rule_can_be_blank.h +1 -1
- data/ext/tree-sitter/tree-sitter/src/compiler/compile.cc +23 -40
- data/ext/tree-sitter/tree-sitter/src/compiler/compile_error.h +6 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/generate_code/c_code.cc +301 -124
- data/ext/tree-sitter/tree-sitter/src/compiler/generate_code/c_code.h +12 -4
- data/ext/tree-sitter/tree-sitter/{doc → src/compiler}/grammar-schema.json +34 -42
- data/ext/tree-sitter/tree-sitter/src/compiler/grammar.h +24 -5
- data/ext/tree-sitter/tree-sitter/src/compiler/lex_table.cc +2 -31
- data/ext/tree-sitter/tree-sitter/src/compiler/lex_table.h +6 -30
- data/ext/tree-sitter/tree-sitter/src/compiler/lexical_grammar.h +15 -3
- data/ext/tree-sitter/tree-sitter/src/compiler/parse_grammar.cc +143 -105
- data/ext/tree-sitter/tree-sitter/src/compiler/parse_grammar.h +2 -1
- data/ext/tree-sitter/tree-sitter/src/compiler/parse_table.cc +71 -174
- data/ext/tree-sitter/tree-sitter/src/compiler/parse_table.h +23 -41
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/expand_repeats.cc +67 -34
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/expand_repeats.h +0 -2
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/expand_tokens.cc +53 -61
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/expand_tokens.h +9 -3
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/extract_choices.cc +37 -43
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/extract_choices.h +1 -1
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/extract_tokens.cc +248 -125
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/extract_tokens.h +3 -2
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/flatten_grammar.cc +114 -70
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/flatten_grammar.h +2 -2
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/initial_syntax_grammar.h +4 -3
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/intern_symbols.cc +113 -50
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/intern_symbols.h +2 -2
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/interned_grammar.h +7 -6
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/normalize_rules.cc +5 -3
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/parse_regex.cc +95 -76
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/parse_regex.h +1 -1
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/prepare_grammar.cc +9 -7
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/prepare_grammar.h +2 -5
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/token_description.cc +59 -45
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/token_description.h +1 -1
- data/ext/tree-sitter/tree-sitter/src/compiler/rule.cc +284 -6
- data/ext/tree-sitter/tree-sitter/src/compiler/rule.h +124 -25
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/blank.h +5 -14
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/character_set.cc +35 -84
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/character_set.h +19 -26
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/choice.cc +3 -69
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/choice.h +6 -13
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/metadata.cc +128 -71
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/metadata.h +48 -17
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/named_symbol.h +6 -12
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/pattern.h +6 -12
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/repeat.cc +5 -34
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/repeat.h +7 -13
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/seq.cc +6 -47
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/seq.h +8 -14
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/string.h +6 -12
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/symbol.h +53 -32
- data/ext/tree-sitter/tree-sitter/src/compiler/syntax_grammar.cc +24 -22
- data/ext/tree-sitter/tree-sitter/src/compiler/syntax_grammar.h +36 -21
- data/ext/tree-sitter/tree-sitter/src/compiler/util/make_visitor.h +31 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/alloc.h +1 -1
- data/ext/tree-sitter/tree-sitter/src/runtime/array.h +25 -36
- data/ext/tree-sitter/tree-sitter/src/runtime/document.c +61 -34
- data/ext/tree-sitter/tree-sitter/src/runtime/document.h +3 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/error_costs.h +5 -19
- data/ext/tree-sitter/tree-sitter/src/runtime/get_changed_ranges.c +355 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/get_changed_ranges.h +20 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/language.c +33 -31
- data/ext/tree-sitter/tree-sitter/src/runtime/language.h +27 -3
- data/ext/tree-sitter/tree-sitter/src/runtime/length.h +5 -21
- data/ext/tree-sitter/tree-sitter/src/runtime/lexer.c +61 -17
- data/ext/tree-sitter/tree-sitter/src/runtime/lexer.h +4 -5
- data/ext/tree-sitter/tree-sitter/src/runtime/node.c +93 -89
- data/ext/tree-sitter/tree-sitter/src/runtime/node.h +1 -1
- data/ext/tree-sitter/tree-sitter/src/runtime/parser.c +850 -743
- data/ext/tree-sitter/tree-sitter/src/runtime/parser.h +13 -8
- data/ext/tree-sitter/tree-sitter/src/runtime/point.h +9 -4
- data/ext/tree-sitter/tree-sitter/src/runtime/reduce_action.h +2 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/reusable_node.h +14 -18
- data/ext/tree-sitter/tree-sitter/src/runtime/stack.c +424 -302
- data/ext/tree-sitter/tree-sitter/src/runtime/stack.h +75 -72
- data/ext/tree-sitter/tree-sitter/src/runtime/string_input.c +4 -10
- data/ext/tree-sitter/tree-sitter/src/runtime/tree.c +401 -252
- data/ext/tree-sitter/tree-sitter/src/runtime/tree.h +71 -57
- data/ext/tree-sitter/tree-sitter/src/runtime/utf16.c +5 -0
- data/ext/tree-sitter/tree-sitter/test/benchmarks.cc +122 -0
- data/ext/tree-sitter/tree-sitter/{spec/compiler/build_tables/lex_item_spec.cc → test/compiler/build_tables/lex_item_test.cc} +141 -143
- data/ext/tree-sitter/tree-sitter/test/compiler/build_tables/parse_item_set_builder_test.cc +134 -0
- data/ext/tree-sitter/tree-sitter/{spec/compiler/build_tables/rule_can_be_blank_spec.cc → test/compiler/build_tables/rule_can_be_blank_test.cc} +16 -19
- data/ext/tree-sitter/tree-sitter/test/compiler/prepare_grammar/expand_repeats_test.cc +170 -0
- data/ext/tree-sitter/tree-sitter/test/compiler/prepare_grammar/expand_tokens_test.cc +89 -0
- data/ext/tree-sitter/tree-sitter/test/compiler/prepare_grammar/extract_choices_test.cc +77 -0
- data/ext/tree-sitter/tree-sitter/test/compiler/prepare_grammar/extract_tokens_test.cc +459 -0
- data/ext/tree-sitter/tree-sitter/test/compiler/prepare_grammar/flatten_grammar_test.cc +130 -0
- data/ext/tree-sitter/tree-sitter/test/compiler/prepare_grammar/intern_symbols_test.cc +101 -0
- data/ext/tree-sitter/tree-sitter/test/compiler/prepare_grammar/parse_regex_test.cc +334 -0
- data/ext/tree-sitter/tree-sitter/{spec/compiler/rules/character_set_spec.cc → test/compiler/rules/character_set_test.cc} +15 -27
- data/ext/tree-sitter/tree-sitter/test/compiler/rules/rule_test.cc +90 -0
- data/ext/tree-sitter/tree-sitter/{spec/compiler/util/string_helpers_spec.cc → test/compiler/util/string_helpers_test.cc} +1 -1
- data/ext/tree-sitter/tree-sitter/test/fixtures/error_corpus/c_errors.txt +166 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/error_corpus/javascript_errors.txt +179 -0
- data/ext/tree-sitter/tree-sitter/{spec → test}/fixtures/error_corpus/json_errors.txt +10 -7
- data/ext/tree-sitter/tree-sitter/{spec → test}/fixtures/error_corpus/python_errors.txt +0 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/aliased_inlined_rules/corpus.txt +13 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/aliased_inlined_rules/grammar.json +59 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/aliased_inlined_rules/readme.md +1 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/aliased_rules/corpus.txt +18 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/aliased_rules/grammar.json +71 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/aliased_unit_reductions/corpus.txt +12 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/aliased_unit_reductions/grammar.json +70 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/aliased_unit_reductions/readme.md +5 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/anonymous_tokens_with_escaped_chars/corpus.txt +32 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/anonymous_tokens_with_escaped_chars/grammar.json +14 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/anonymous_tokens_with_escaped_chars/readme.md +1 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/associativity_left/corpus.txt +8 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/associativity_left/grammar.json +31 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/associativity_missing/expected_error.txt +13 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/associativity_missing/grammar.json +27 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/associativity_right/corpus.txt +8 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/associativity_right/grammar.json +31 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/conflict_in_repeat_rule/expected_error.txt +14 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/conflict_in_repeat_rule/grammar.json +76 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/conflict_in_repeat_rule/readme.md +1 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/conflict_in_repeat_rule_after_external_token/expected_error.txt +14 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/conflict_in_repeat_rule_after_external_token/grammar.json +82 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/conflict_in_repeat_rule_after_external_token/readme.md +1 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/conflicting_precedence/expected_error.txt +15 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/conflicting_precedence/grammar.json +58 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/dynamic_precedence/corpus.txt +25 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/dynamic_precedence/grammar.json +73 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/dynamic_precedence/readme.md +1 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/epsilon_rules/expected_error.txt +4 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/epsilon_rules/grammar.json +15 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/external_and_internal_anonymous_tokens/corpus.txt +41 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/external_and_internal_anonymous_tokens/grammar.json +35 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/external_and_internal_anonymous_tokens/readme.md +1 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/external_and_internal_anonymous_tokens/scanner.c +36 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/external_and_internal_tokens/corpus.txt +41 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/external_and_internal_tokens/grammar.json +36 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/external_and_internal_tokens/readme.md +1 -0
- data/ext/tree-sitter/tree-sitter/{spec/fixtures/external_scanners/shared_external_tokens.c → test/fixtures/test_grammars/external_and_internal_tokens/scanner.c} +21 -14
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/external_extra_tokens/corpus.txt +10 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/external_extra_tokens/grammar.json +25 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/external_extra_tokens/scanner.c +49 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/external_tokens/corpus.txt +22 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/external_tokens/grammar.json +57 -0
- data/ext/tree-sitter/tree-sitter/{spec/fixtures/external_scanners/percent_strings.c → test/fixtures/test_grammars/external_tokens/scanner.c} +19 -17
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/inline_rules/corpus.txt +20 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/inline_rules/grammar.json +76 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/inlined_aliased_rules/corpus.txt +18 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/inlined_aliased_rules/grammar.json +75 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/inlined_aliased_rules/readme.md +1 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/inverted_external_token/corpus.txt +32 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/inverted_external_token/grammar.json +55 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/inverted_external_token/readme.md +1 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/inverted_external_token/scanner.c +48 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/invisible_start_rule/expected_error.txt +1 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/invisible_start_rule/grammar.json +23 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/lexical_conflicts_due_to_state_merging/corpus.txt +33 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/lexical_conflicts_due_to_state_merging/grammar.json +65 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/lexical_conflicts_due_to_state_merging/readme.md +20 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/nested_inlined_rules/corpus.txt +12 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/nested_inlined_rules/grammar.json +54 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/nested_inlined_rules/readme.md +1 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/partially_resolved_conflict/expected_error.txt +14 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/partially_resolved_conflict/grammar.json +58 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/partially_resolved_conflict/readme.txt +1 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/precedence_on_single_child_missing/expected_error.txt +15 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/precedence_on_single_child_missing/grammar.json +63 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/precedence_on_single_child_missing/readme.md +15 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/precedence_on_single_child_negative/corpus.txt +12 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/precedence_on_single_child_negative/grammar.json +63 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/precedence_on_single_child_negative/readme.md +1 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/precedence_on_single_child_positive/corpus.txt +13 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/precedence_on_single_child_positive/grammar.json +63 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/precedence_on_single_child_positive/readme.md +1 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/precedence_on_subsequence/corpus.txt +24 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/precedence_on_subsequence/grammar.json +135 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/readme.md +3 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/readme_grammar/corpus.txt +13 -0
- data/{test/tree-sitter/fixtures/arithmetic → ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/readme_grammar}/grammar.json +3 -3
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/start_rule_is_blank/corpus.txt +7 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/start_rule_is_blank/grammar.json +6 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/start_rule_is_token/corpus.txt +6 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/start_rule_is_token/grammar.json +6 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/unused_rules/corpus.txt +9 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/unused_rules/grammar.json +73 -0
- data/ext/tree-sitter/tree-sitter/test/fixtures/test_grammars/unused_rules/readme.md +1 -0
- data/ext/tree-sitter/tree-sitter/test/fuzz/README.md +43 -0
- data/ext/tree-sitter/tree-sitter/test/fuzz/fuzzer.cc +27 -0
- data/ext/tree-sitter/tree-sitter/test/fuzz/gen-dict.py +31 -0
- data/ext/tree-sitter/tree-sitter/{spec → test}/helpers/dedent.h +0 -0
- data/ext/tree-sitter/tree-sitter/{spec → test}/helpers/encoding_helpers.cc +9 -3
- data/ext/tree-sitter/tree-sitter/{spec → test}/helpers/encoding_helpers.h +0 -0
- data/ext/tree-sitter/tree-sitter/test/helpers/file_helpers.cc +100 -0
- data/ext/tree-sitter/tree-sitter/test/helpers/file_helpers.h +15 -0
- data/ext/tree-sitter/tree-sitter/test/helpers/load_language.cc +239 -0
- data/ext/tree-sitter/tree-sitter/test/helpers/load_language.h +14 -0
- data/ext/tree-sitter/tree-sitter/{spec → test}/helpers/point_helpers.cc +2 -5
- data/ext/tree-sitter/tree-sitter/{spec → test}/helpers/point_helpers.h +0 -0
- data/ext/tree-sitter/tree-sitter/test/helpers/random_helpers.cc +59 -0
- data/ext/tree-sitter/tree-sitter/test/helpers/random_helpers.h +14 -0
- data/ext/tree-sitter/tree-sitter/{spec → test}/helpers/read_test_entries.cc +38 -38
- data/ext/tree-sitter/tree-sitter/test/helpers/read_test_entries.h +22 -0
- data/ext/tree-sitter/tree-sitter/{spec → test}/helpers/record_alloc.cc +7 -13
- data/ext/tree-sitter/tree-sitter/{spec → test}/helpers/record_alloc.h +2 -2
- data/ext/tree-sitter/tree-sitter/{spec → test}/helpers/scope_sequence.cc +0 -0
- data/ext/tree-sitter/tree-sitter/{spec → test}/helpers/scope_sequence.h +0 -0
- data/ext/tree-sitter/tree-sitter/{spec → test}/helpers/spy_input.cc +39 -15
- data/ext/tree-sitter/tree-sitter/{spec → test}/helpers/spy_input.h +4 -4
- data/ext/tree-sitter/tree-sitter/{spec → test}/helpers/spy_logger.cc +0 -0
- data/ext/tree-sitter/tree-sitter/{spec → test}/helpers/spy_logger.h +0 -0
- data/ext/tree-sitter/tree-sitter/{spec → test}/helpers/stderr_logger.cc +0 -0
- data/ext/tree-sitter/tree-sitter/{spec → test}/helpers/stderr_logger.h +0 -0
- data/ext/tree-sitter/tree-sitter/test/helpers/stream_methods.cc +224 -0
- data/ext/tree-sitter/tree-sitter/{spec → test}/helpers/stream_methods.h +32 -15
- data/ext/tree-sitter/tree-sitter/test/helpers/tree_helpers.cc +99 -0
- data/ext/tree-sitter/tree-sitter/{spec → test}/helpers/tree_helpers.h +3 -1
- data/ext/tree-sitter/tree-sitter/test/integration/fuzzing-examples.cc +67 -0
- data/ext/tree-sitter/tree-sitter/test/integration/real_grammars.cc +142 -0
- data/ext/tree-sitter/tree-sitter/test/integration/test_grammars.cc +79 -0
- data/ext/tree-sitter/tree-sitter/{spec/runtime/document_spec.cc → test/runtime/document_test.cc} +150 -32
- data/ext/tree-sitter/tree-sitter/test/runtime/language_test.cc +55 -0
- data/ext/tree-sitter/tree-sitter/{spec/runtime/node_spec.cc → test/runtime/node_test.cc} +222 -127
- data/ext/tree-sitter/tree-sitter/{spec/runtime/parser_spec.cc → test/runtime/parser_test.cc} +126 -85
- data/ext/tree-sitter/tree-sitter/{spec/runtime/stack_spec.cc → test/runtime/stack_test.cc} +201 -164
- data/ext/tree-sitter/tree-sitter/test/runtime/tree_test.cc +475 -0
- data/ext/tree-sitter/tree-sitter/{spec/spec_helper.h → test/test_helper.h} +3 -3
- data/ext/tree-sitter/tree-sitter/{spec/specs.cc → test/tests.cc} +4 -3
- data/ext/tree-sitter/tree-sitter/tests.gyp +77 -23
- data/lib/tree-sitter.rb +4 -0
- data/lib/tree-sitter/node.rb +27 -0
- data/lib/tree-sitter/version.rb +3 -1
- data/test/test_helper.rb +4 -0
- data/test/tree-sitter/fixtures/parsers/python/parser.c +65600 -0
- data/test/tree-sitter/fixtures/parsers/python/scanner.cc +164 -0
- data/test/tree-sitter/test_basic.rb +2 -0
- data/test/tree-sitter/test_document.rb +101 -1
- data/test/tree-sitter/test_node.rb +73 -0
- data/tree-sitter.gemspec +4 -2
- metadata +445 -217
- data/ext/tree-sitter/tree-sitter/Makefile +0 -360
- data/ext/tree-sitter/tree-sitter/compiler.target.mk +0 -238
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylintrc +0 -307
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/gyptest-fail-shared.py +0 -18
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/gyptest-fail-static.py +0 -18
- data/ext/tree-sitter/tree-sitter/gyp-mac-tool +0 -511
- data/ext/tree-sitter/tree-sitter/out/Release/libcompiler.a +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/libruntime.a +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/externals/json-parser/json.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/externals/utf8proc/utf8proc.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/build_lex_table.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/build_parse_table.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/build_tables.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/lex_conflict_manager.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/lex_item.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/lex_item_transitions.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/lookahead_set.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/parse_item.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/parse_item_set_builder.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/recovery_tokens.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/rule_can_be_blank.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/compile.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/generate_code/c_code.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/lex_table.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/parse_grammar.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/parse_table.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/precedence_range.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/expand_repeats.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/expand_tokens.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/extract_choices.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/extract_tokens.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/flatten_grammar.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/intern_symbols.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/is_token.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/normalize_rules.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/parse_regex.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/prepare_grammar.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/token_description.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rule.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/blank.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/built_in_symbols.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/character_range.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/character_set.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/choice.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/metadata.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/named_symbol.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/pattern.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/repeat.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/rules.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/seq.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/string.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/symbol.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/visitor.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/syntax_grammar.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/util/string_helpers.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/variable.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/externals/utf8proc/utf8proc.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/document.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/error_costs.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/language.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/lexer.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/node.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/parser.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/stack.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/string_input.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/tree.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/utf16.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/build_tables/distinctive_tokens_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/build_tables/lex_conflict_manager_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/build_tables/lex_item_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/build_tables/parse_item_set_builder_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/build_tables/rule_can_be_blank_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/expand_repeats_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/expand_tokens_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/extract_choices_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/extract_tokens_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/flatten_grammar_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/intern_symbols_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/parse_regex_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/rules/character_set_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/rules/choice_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/rules/repeat_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/util/string_helpers_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/encoding_helpers.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/load_language.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/point_helpers.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/random_helpers.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/read_test_entries.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/record_alloc.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/rule_helpers.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/scope_sequence.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/spy_input.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/spy_logger.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/stderr_logger.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/stream_methods.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/tree_helpers.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/integration/compile_grammar_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/integration/corpus_specs.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/runtime/document_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/runtime/node_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/runtime/parser_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/runtime/stack_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/runtime/tree_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/specs.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/tests +0 -0
- data/ext/tree-sitter/tree-sitter/project.Makefile +0 -6
- data/ext/tree-sitter/tree-sitter/runtime.target.mk +0 -174
- data/ext/tree-sitter/tree-sitter/spec/compiler/build_tables/distinctive_tokens_spec.cc +0 -34
- data/ext/tree-sitter/tree-sitter/spec/compiler/build_tables/lex_conflict_manager_spec.cc +0 -88
- data/ext/tree-sitter/tree-sitter/spec/compiler/build_tables/parse_item_set_builder_spec.cc +0 -133
- data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/expand_repeats_spec.cc +0 -152
- data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/expand_tokens_spec.cc +0 -109
- data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/extract_choices_spec.cc +0 -106
- data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/extract_tokens_spec.cc +0 -251
- data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/flatten_grammar_spec.cc +0 -89
- data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/intern_symbols_spec.cc +0 -89
- data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/parse_regex_spec.cc +0 -245
- data/ext/tree-sitter/tree-sitter/spec/compiler/rules/choice_spec.cc +0 -53
- data/ext/tree-sitter/tree-sitter/spec/compiler/rules/repeat_spec.cc +0 -22
- data/ext/tree-sitter/tree-sitter/spec/fixtures/error_corpus/c_errors.txt +0 -130
- data/ext/tree-sitter/tree-sitter/spec/fixtures/error_corpus/javascript_errors.txt +0 -157
- data/ext/tree-sitter/tree-sitter/spec/fixtures/external_scanners/extra_external_tokens.c +0 -42
- data/ext/tree-sitter/tree-sitter/spec/helpers/equals_pointer.h +0 -37
- data/ext/tree-sitter/tree-sitter/spec/helpers/load_language.cc +0 -206
- data/ext/tree-sitter/tree-sitter/spec/helpers/load_language.h +0 -12
- data/ext/tree-sitter/tree-sitter/spec/helpers/random_helpers.cc +0 -35
- data/ext/tree-sitter/tree-sitter/spec/helpers/random_helpers.h +0 -8
- data/ext/tree-sitter/tree-sitter/spec/helpers/read_test_entries.h +0 -15
- data/ext/tree-sitter/tree-sitter/spec/helpers/rule_helpers.cc +0 -55
- data/ext/tree-sitter/tree-sitter/spec/helpers/rule_helpers.h +0 -21
- data/ext/tree-sitter/tree-sitter/spec/helpers/stream_methods.cc +0 -140
- data/ext/tree-sitter/tree-sitter/spec/helpers/tree_helpers.cc +0 -50
- data/ext/tree-sitter/tree-sitter/spec/integration/compile_grammar_spec.cc +0 -847
- data/ext/tree-sitter/tree-sitter/spec/integration/corpus_specs.cc +0 -185
- data/ext/tree-sitter/tree-sitter/spec/runtime/tree_spec.cc +0 -439
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_lex_table.cc +0 -195
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_lex_table.h +0 -18
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_parse_table.cc +0 -604
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_parse_table.h +0 -22
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_tables.cc +0 -27
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_tables.h +0 -24
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/conflict_type.h +0 -16
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_conflict_manager.cc +0 -55
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_conflict_manager.h +0 -31
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/recovery_tokens.cc +0 -89
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/recovery_tokens.h +0 -19
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/remove_duplicate_states.h +0 -65
- data/ext/tree-sitter/tree-sitter/src/compiler/compile.h +0 -16
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/is_token.cc +0 -30
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/is_token.h +0 -14
- data/ext/tree-sitter/tree-sitter/src/compiler/rules.h +0 -28
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/blank.cc +0 -36
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/built_in_symbols.cc +0 -19
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/built_in_symbols.h +0 -16
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/character_range.cc +0 -36
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/character_range.h +0 -25
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/named_symbol.cc +0 -35
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/pattern.cc +0 -36
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/rules.cc +0 -108
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/string.cc +0 -35
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/symbol.cc +0 -82
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/visitor.cc +0 -44
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/visitor.h +0 -234
- data/ext/tree-sitter/tree-sitter/src/compiler/variable.cc +0 -11
- data/ext/tree-sitter/tree-sitter/src/compiler/variable.h +0 -27
- data/ext/tree-sitter/tree-sitter/src/runtime/error_costs.c +0 -28
- data/ext/tree-sitter/tree-sitter/src/runtime/tree_path.h +0 -217
- data/ext/tree-sitter/tree-sitter/tests.Makefile +0 -6
- data/ext/tree-sitter/tree-sitter/tests.target.mk +0 -176
- data/test/tree-sitter/fixtures/ruby/grammar.json +0 -4803
- data/test/tree-sitter/test_grammar.rb +0 -34
@@ -216,7 +216,7 @@ def WriteVariable(output, variable_name, prepend=None):
|
|
216
216
|
output.write('}')
|
217
217
|
|
218
218
|
|
219
|
-
class CMakeTargetType:
|
219
|
+
class CMakeTargetType(object):
|
220
220
|
def __init__(self, command, modifier, property_modifier):
|
221
221
|
self.command = command
|
222
222
|
self.modifier = modifier
|
@@ -464,7 +464,7 @@ def WriteCopies(target_name, copies, extra_deps, path_to_gyp, output):
|
|
464
464
|
extra_deps.append(copy_name)
|
465
465
|
return
|
466
466
|
|
467
|
-
class Copy:
|
467
|
+
class Copy(object):
|
468
468
|
def __init__(self, ext, command):
|
469
469
|
self.cmake_inputs = []
|
470
470
|
self.cmake_outputs = []
|
@@ -743,7 +743,7 @@ def WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use,
|
|
743
743
|
if target_output_directory is None:
|
744
744
|
if target_type in ('executable', 'loadable_module'):
|
745
745
|
target_output_directory = generator_default_variables['PRODUCT_DIR']
|
746
|
-
elif target_type
|
746
|
+
elif target_type == 'shared_library':
|
747
747
|
target_output_directory = '${builddir}/lib.${TOOLSET}'
|
748
748
|
elif spec.get('standalone_static_library', False):
|
749
749
|
target_output_directory = generator_default_variables['PRODUCT_DIR']
|
@@ -24,6 +24,7 @@ import gyp
|
|
24
24
|
import gyp.common
|
25
25
|
import gyp.msvs_emulation
|
26
26
|
import shlex
|
27
|
+
import xml.etree.cElementTree as ET
|
27
28
|
|
28
29
|
generator_wants_static_library_dependencies_adjusted = False
|
29
30
|
|
@@ -31,8 +32,8 @@ generator_default_variables = {
|
|
31
32
|
}
|
32
33
|
|
33
34
|
for dirname in ['INTERMEDIATE_DIR', 'PRODUCT_DIR', 'LIB_DIR', 'SHARED_LIB_DIR']:
|
34
|
-
# Some gyp steps fail if these are empty(!)
|
35
|
-
generator_default_variables[dirname] = '
|
35
|
+
# Some gyp steps fail if these are empty(!), so we convert them to variables
|
36
|
+
generator_default_variables[dirname] = '$' + dirname
|
36
37
|
|
37
38
|
for unused in ['RULE_INPUT_PATH', 'RULE_INPUT_ROOT', 'RULE_INPUT_NAME',
|
38
39
|
'RULE_INPUT_DIRNAME', 'RULE_INPUT_EXT',
|
@@ -165,7 +166,7 @@ def GetAllIncludeDirectories(target_list, target_dicts,
|
|
165
166
|
return all_includes_list
|
166
167
|
|
167
168
|
|
168
|
-
def GetCompilerPath(target_list, data):
|
169
|
+
def GetCompilerPath(target_list, data, options):
|
169
170
|
"""Determine a command that can be used to invoke the compiler.
|
170
171
|
|
171
172
|
Returns:
|
@@ -173,13 +174,12 @@ def GetCompilerPath(target_list, data):
|
|
173
174
|
the compiler from that. Otherwise, see if a compiler was specified via the
|
174
175
|
CC_target environment variable.
|
175
176
|
"""
|
176
|
-
|
177
177
|
# First, see if the compiler is configured in make's settings.
|
178
178
|
build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0])
|
179
179
|
make_global_settings_dict = data[build_file].get('make_global_settings', {})
|
180
180
|
for key, value in make_global_settings_dict:
|
181
181
|
if key in ['CC', 'CXX']:
|
182
|
-
return value
|
182
|
+
return os.path.join(options.toplevel_dir, value)
|
183
183
|
|
184
184
|
# Check to see if the compiler was specified as an environment variable.
|
185
185
|
for key in ['CC_target', 'CC', 'CXX']:
|
@@ -295,33 +295,123 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
|
|
295
295
|
shared_intermediate_dirs = [os.path.join(toplevel_build, 'obj', 'gen'),
|
296
296
|
os.path.join(toplevel_build, 'gen')]
|
297
297
|
|
298
|
-
|
298
|
+
GenerateCdtSettingsFile(target_list,
|
299
|
+
target_dicts,
|
300
|
+
data,
|
301
|
+
params,
|
302
|
+
config_name,
|
303
|
+
os.path.join(toplevel_build,
|
304
|
+
'eclipse-cdt-settings.xml'),
|
305
|
+
options,
|
306
|
+
shared_intermediate_dirs)
|
307
|
+
GenerateClasspathFile(target_list,
|
308
|
+
target_dicts,
|
309
|
+
options.toplevel_dir,
|
310
|
+
toplevel_build,
|
311
|
+
os.path.join(toplevel_build,
|
312
|
+
'eclipse-classpath.xml'))
|
313
|
+
|
314
|
+
|
315
|
+
def GenerateCdtSettingsFile(target_list, target_dicts, data, params,
|
316
|
+
config_name, out_name, options,
|
317
|
+
shared_intermediate_dirs):
|
318
|
+
gyp.common.EnsureDirExists(out_name)
|
319
|
+
with open(out_name, 'w') as out:
|
320
|
+
out.write('<?xml version="1.0" encoding="UTF-8"?>\n')
|
321
|
+
out.write('<cdtprojectproperties>\n')
|
322
|
+
|
323
|
+
eclipse_langs = ['C++ Source File', 'C Source File', 'Assembly Source File',
|
324
|
+
'GNU C++', 'GNU C', 'Assembly']
|
325
|
+
compiler_path = GetCompilerPath(target_list, data, options)
|
326
|
+
include_dirs = GetAllIncludeDirectories(target_list, target_dicts,
|
327
|
+
shared_intermediate_dirs,
|
328
|
+
config_name, params, compiler_path)
|
329
|
+
WriteIncludePaths(out, eclipse_langs, include_dirs)
|
330
|
+
defines = GetAllDefines(target_list, target_dicts, data, config_name,
|
331
|
+
params, compiler_path)
|
332
|
+
WriteMacros(out, eclipse_langs, defines)
|
333
|
+
|
334
|
+
out.write('</cdtprojectproperties>\n')
|
335
|
+
|
336
|
+
|
337
|
+
def GenerateClasspathFile(target_list, target_dicts, toplevel_dir,
|
338
|
+
toplevel_build, out_name):
|
339
|
+
'''Generates a classpath file suitable for symbol navigation and code
|
340
|
+
completion of Java code (such as in Android projects) by finding all
|
341
|
+
.java and .jar files used as action inputs.'''
|
299
342
|
gyp.common.EnsureDirExists(out_name)
|
300
|
-
|
343
|
+
result = ET.Element('classpath')
|
344
|
+
|
345
|
+
def AddElements(kind, paths):
|
346
|
+
# First, we need to normalize the paths so they are all relative to the
|
347
|
+
# toplevel dir.
|
348
|
+
rel_paths = set()
|
349
|
+
for path in paths:
|
350
|
+
if os.path.isabs(path):
|
351
|
+
rel_paths.add(os.path.relpath(path, toplevel_dir))
|
352
|
+
else:
|
353
|
+
rel_paths.add(path)
|
301
354
|
|
302
|
-
|
303
|
-
|
355
|
+
for path in sorted(rel_paths):
|
356
|
+
entry_element = ET.SubElement(result, 'classpathentry')
|
357
|
+
entry_element.set('kind', kind)
|
358
|
+
entry_element.set('path', path)
|
304
359
|
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
defines = GetAllDefines(target_list, target_dicts, data, config_name, params,
|
313
|
-
compiler_path)
|
314
|
-
WriteMacros(out, eclipse_langs, defines)
|
360
|
+
AddElements('lib', GetJavaJars(target_list, target_dicts, toplevel_dir))
|
361
|
+
AddElements('src', GetJavaSourceDirs(target_list, target_dicts, toplevel_dir))
|
362
|
+
# Include the standard JRE container and a dummy out folder
|
363
|
+
AddElements('con', ['org.eclipse.jdt.launching.JRE_CONTAINER'])
|
364
|
+
# Include a dummy out folder so that Eclipse doesn't use the default /bin
|
365
|
+
# folder in the root of the project.
|
366
|
+
AddElements('output', [os.path.join(toplevel_build, '.eclipse-java-build')])
|
315
367
|
|
316
|
-
|
317
|
-
|
368
|
+
ET.ElementTree(result).write(out_name)
|
369
|
+
|
370
|
+
|
371
|
+
def GetJavaJars(target_list, target_dicts, toplevel_dir):
|
372
|
+
'''Generates a sequence of all .jars used as inputs.'''
|
373
|
+
for target_name in target_list:
|
374
|
+
target = target_dicts[target_name]
|
375
|
+
for action in target.get('actions', []):
|
376
|
+
for input_ in action['inputs']:
|
377
|
+
if os.path.splitext(input_)[1] == '.jar' and not input_.startswith('$'):
|
378
|
+
if os.path.isabs(input_):
|
379
|
+
yield input_
|
380
|
+
else:
|
381
|
+
yield os.path.join(os.path.dirname(target_name), input_)
|
382
|
+
|
383
|
+
|
384
|
+
def GetJavaSourceDirs(target_list, target_dicts, toplevel_dir):
|
385
|
+
'''Generates a sequence of all likely java package root directories.'''
|
386
|
+
for target_name in target_list:
|
387
|
+
target = target_dicts[target_name]
|
388
|
+
for action in target.get('actions', []):
|
389
|
+
for input_ in action['inputs']:
|
390
|
+
if (os.path.splitext(input_)[1] == '.java' and
|
391
|
+
not input_.startswith('$')):
|
392
|
+
dir_ = os.path.dirname(os.path.join(os.path.dirname(target_name),
|
393
|
+
input_))
|
394
|
+
# If there is a parent 'src' or 'java' folder, navigate up to it -
|
395
|
+
# these are canonical package root names in Chromium. This will
|
396
|
+
# break if 'src' or 'java' exists in the package structure. This
|
397
|
+
# could be further improved by inspecting the java file for the
|
398
|
+
# package name if this proves to be too fragile in practice.
|
399
|
+
parent_search = dir_
|
400
|
+
while os.path.basename(parent_search) not in ['src', 'java']:
|
401
|
+
parent_search, _ = os.path.split(parent_search)
|
402
|
+
if not parent_search or parent_search == toplevel_dir:
|
403
|
+
# Didn't find a known root, just return the original path
|
404
|
+
yield dir_
|
405
|
+
break
|
406
|
+
else:
|
407
|
+
yield parent_search
|
318
408
|
|
319
409
|
|
320
410
|
def GenerateOutput(target_list, target_dicts, data, params):
|
321
411
|
"""Generate an XML settings file that can be imported into a CDT project."""
|
322
412
|
|
323
413
|
if params['options'].generator_output:
|
324
|
-
raise NotImplementedError
|
414
|
+
raise NotImplementedError("--generator_output not implemented for eclipse")
|
325
415
|
|
326
416
|
user_config = params.get('generator_flags', {}).get('config', None)
|
327
417
|
if user_config:
|
@@ -39,9 +39,11 @@ import pprint
|
|
39
39
|
|
40
40
|
# These variables should just be spit back out as variable references.
|
41
41
|
_generator_identity_variables = [
|
42
|
+
'CONFIGURATION_NAME',
|
42
43
|
'EXECUTABLE_PREFIX',
|
43
44
|
'EXECUTABLE_SUFFIX',
|
44
45
|
'INTERMEDIATE_DIR',
|
46
|
+
'LIB_DIR',
|
45
47
|
'PRODUCT_DIR',
|
46
48
|
'RULE_INPUT_ROOT',
|
47
49
|
'RULE_INPUT_DIRNAME',
|
@@ -49,6 +51,7 @@ _generator_identity_variables = [
|
|
49
51
|
'RULE_INPUT_NAME',
|
50
52
|
'RULE_INPUT_PATH',
|
51
53
|
'SHARED_INTERMEDIATE_DIR',
|
54
|
+
'SHARED_LIB_DIR',
|
52
55
|
]
|
53
56
|
|
54
57
|
# gypd doesn't define a default value for OS like many other generator
|
@@ -29,6 +29,7 @@ import gyp
|
|
29
29
|
import gyp.common
|
30
30
|
import gyp.xcode_emulation
|
31
31
|
from gyp.common import GetEnvironFallback
|
32
|
+
from gyp.common import GypError
|
32
33
|
|
33
34
|
generator_default_variables = {
|
34
35
|
'EXECUTABLE_PREFIX': '',
|
@@ -280,15 +281,7 @@ LDFLAGS.target ?= $(LDFLAGS)
|
|
280
281
|
AR.target ?= $(AR)
|
281
282
|
|
282
283
|
# C++ apps need to be linked with g++.
|
283
|
-
|
284
|
-
# Note: flock is used to seralize linking. Linking is a memory-intensive
|
285
|
-
# process so running parallel links can often lead to thrashing. To disable
|
286
|
-
# the serialization, override LINK via an envrionment variable as follows:
|
287
|
-
#
|
288
|
-
# export LINK=g++
|
289
|
-
#
|
290
|
-
# This will allow make to invoke N linker processes as specified in -jN.
|
291
|
-
LINK ?= %(flock)s $(builddir)/linker.lock $(CXX.target)
|
284
|
+
LINK ?= $(CXX.target)
|
292
285
|
|
293
286
|
# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
|
294
287
|
# to replicate this environment fallback in make as well.
|
@@ -631,6 +624,38 @@ def QuoteSpaces(s, quote=r'\ '):
|
|
631
624
|
return s.replace(' ', quote)
|
632
625
|
|
633
626
|
|
627
|
+
# TODO: Avoid code duplication with _ValidateSourcesForMSVSProject in msvs.py.
|
628
|
+
def _ValidateSourcesForOSX(spec, all_sources):
|
629
|
+
"""Makes sure if duplicate basenames are not specified in the source list.
|
630
|
+
|
631
|
+
Arguments:
|
632
|
+
spec: The target dictionary containing the properties of the target.
|
633
|
+
"""
|
634
|
+
if spec.get('type', None) != 'static_library':
|
635
|
+
return
|
636
|
+
|
637
|
+
basenames = {}
|
638
|
+
for source in all_sources:
|
639
|
+
name, ext = os.path.splitext(source)
|
640
|
+
is_compiled_file = ext in [
|
641
|
+
'.c', '.cc', '.cpp', '.cxx', '.m', '.mm', '.s', '.S']
|
642
|
+
if not is_compiled_file:
|
643
|
+
continue
|
644
|
+
basename = os.path.basename(name) # Don't include extension.
|
645
|
+
basenames.setdefault(basename, []).append(source)
|
646
|
+
|
647
|
+
error = ''
|
648
|
+
for basename, files in basenames.iteritems():
|
649
|
+
if len(files) > 1:
|
650
|
+
error += ' %s: %s\n' % (basename, ' '.join(files))
|
651
|
+
|
652
|
+
if error:
|
653
|
+
print('static library %s has several files with the same basename:\n' %
|
654
|
+
spec['target_name'] + error + 'libtool on OS X will generate' +
|
655
|
+
' warnings for them.')
|
656
|
+
raise GypError('Duplicate basenames in sources section, see list above')
|
657
|
+
|
658
|
+
|
634
659
|
# Map from qualified target to path to output.
|
635
660
|
target_outputs = {}
|
636
661
|
# Map from qualified target to any linkable output. A subset
|
@@ -640,7 +665,7 @@ target_outputs = {}
|
|
640
665
|
target_link_deps = {}
|
641
666
|
|
642
667
|
|
643
|
-
class MakefileWriter:
|
668
|
+
class MakefileWriter(object):
|
644
669
|
"""MakefileWriter packages up the writing of one target-specific foobar.mk.
|
645
670
|
|
646
671
|
Its only real entry point is Write(), and is mostly used for namespacing.
|
@@ -758,6 +783,10 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
|
|
758
783
|
# Sources.
|
759
784
|
all_sources = spec.get('sources', []) + extra_sources
|
760
785
|
if all_sources:
|
786
|
+
if self.flavor == 'mac':
|
787
|
+
# libtool on OS X generates warnings for duplicate basenames in the same
|
788
|
+
# target.
|
789
|
+
_ValidateSourcesForOSX(spec, all_sources)
|
761
790
|
self.WriteSources(
|
762
791
|
configs, deps, all_sources, extra_outputs,
|
763
792
|
extra_link_deps, part_of_all,
|
@@ -1101,9 +1130,12 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
|
|
1101
1130
|
for output, res in gyp.xcode_emulation.GetMacBundleResources(
|
1102
1131
|
generator_default_variables['PRODUCT_DIR'], self.xcode_settings,
|
1103
1132
|
map(Sourceify, map(self.Absolutify, resources))):
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1133
|
+
_, ext = os.path.splitext(output)
|
1134
|
+
if ext != '.xcassets':
|
1135
|
+
# Make does not supports '.xcassets' emulation.
|
1136
|
+
self.WriteDoCmd([output], [res], 'mac_tool,,,copy-bundle-resource',
|
1137
|
+
part_of_all=True)
|
1138
|
+
bundle_deps.append(output)
|
1107
1139
|
|
1108
1140
|
|
1109
1141
|
def WriteMacInfoPlist(self, bundle_deps):
|
@@ -2034,7 +2066,6 @@ def GenerateOutput(target_list, target_dicts, data, params):
|
|
2034
2066
|
build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0])
|
2035
2067
|
make_global_settings_array = data[build_file].get('make_global_settings', [])
|
2036
2068
|
wrappers = {}
|
2037
|
-
wrappers['LINK'] = '%s $(builddir)/linker.lock' % flock_command
|
2038
2069
|
for key, value in make_global_settings_array:
|
2039
2070
|
if key.endswith('_wrapper'):
|
2040
2071
|
wrappers[key[:-len('_wrapper')]] = '$(abspath %s)' % value
|
Binary file
|
@@ -2,7 +2,6 @@
|
|
2
2
|
# Use of this source code is governed by a BSD-style license that can be
|
3
3
|
# found in the LICENSE file.
|
4
4
|
|
5
|
-
import collections
|
6
5
|
import copy
|
7
6
|
import ntpath
|
8
7
|
import os
|
@@ -13,6 +12,7 @@ import sys
|
|
13
12
|
|
14
13
|
import gyp.common
|
15
14
|
import gyp.easy_xml as easy_xml
|
15
|
+
import gyp.generator.ninja as ninja_generator
|
16
16
|
import gyp.MSVSNew as MSVSNew
|
17
17
|
import gyp.MSVSProject as MSVSProject
|
18
18
|
import gyp.MSVSSettings as MSVSSettings
|
@@ -21,6 +21,7 @@ import gyp.MSVSUserFile as MSVSUserFile
|
|
21
21
|
import gyp.MSVSUtil as MSVSUtil
|
22
22
|
import gyp.MSVSVersion as MSVSVersion
|
23
23
|
from gyp.common import GypError
|
24
|
+
from gyp.common import OrderedSet
|
24
25
|
|
25
26
|
# TODO: Remove once bots are on 2.7, http://crbug.com/241769
|
26
27
|
def _import_OrderedDict():
|
@@ -41,7 +42,7 @@ OrderedDict = _import_OrderedDict()
|
|
41
42
|
# if IncrediBuild is executed from inside Visual Studio. This regex
|
42
43
|
# validates that the string looks like a GUID with all uppercase hex
|
43
44
|
# letters.
|
44
|
-
VALID_MSVS_GUID_CHARS = re.compile('^[A-F0-9\-]+$')
|
45
|
+
VALID_MSVS_GUID_CHARS = re.compile(r'^[A-F0-9\-]+$')
|
45
46
|
|
46
47
|
|
47
48
|
generator_default_variables = {
|
@@ -81,6 +82,10 @@ generator_additional_non_configuration_keys = [
|
|
81
82
|
'msvs_external_builder_out_dir',
|
82
83
|
'msvs_external_builder_build_cmd',
|
83
84
|
'msvs_external_builder_clean_cmd',
|
85
|
+
'msvs_external_builder_clcompile_cmd',
|
86
|
+
'msvs_enable_winrt',
|
87
|
+
'msvs_requires_importlibrary',
|
88
|
+
'msvs_enable_winphone',
|
84
89
|
]
|
85
90
|
|
86
91
|
|
@@ -97,46 +102,6 @@ cached_username = None
|
|
97
102
|
cached_domain = None
|
98
103
|
|
99
104
|
|
100
|
-
# Based on http://code.activestate.com/recipes/576694/.
|
101
|
-
class OrderedSet(collections.MutableSet):
|
102
|
-
def __init__(self, iterable=None):
|
103
|
-
self.end = end = []
|
104
|
-
end += [None, end, end] # sentinel node for doubly linked list
|
105
|
-
self.map = {} # key --> [key, prev, next]
|
106
|
-
if iterable is not None:
|
107
|
-
self |= iterable
|
108
|
-
|
109
|
-
def __len__(self):
|
110
|
-
return len(self.map)
|
111
|
-
|
112
|
-
def discard(self, key):
|
113
|
-
if key in self.map:
|
114
|
-
key, prev, next = self.map.pop(key)
|
115
|
-
prev[2] = next
|
116
|
-
next[1] = prev
|
117
|
-
|
118
|
-
def __contains__(self, key):
|
119
|
-
return key in self.map
|
120
|
-
|
121
|
-
def add(self, key):
|
122
|
-
if key not in self.map:
|
123
|
-
end = self.end
|
124
|
-
curr = end[1]
|
125
|
-
curr[2] = end[1] = self.map[key] = [key, curr, end]
|
126
|
-
|
127
|
-
def update(self, iterable):
|
128
|
-
for i in iterable:
|
129
|
-
if i not in self:
|
130
|
-
self.add(i)
|
131
|
-
|
132
|
-
def __iter__(self):
|
133
|
-
end = self.end
|
134
|
-
curr = end[2]
|
135
|
-
while curr is not end:
|
136
|
-
yield curr[0]
|
137
|
-
curr = curr[2]
|
138
|
-
|
139
|
-
|
140
105
|
# TODO(gspencer): Switch the os.environ calls to be
|
141
106
|
# win32api.GetDomainName() and win32api.GetUserName() once the
|
142
107
|
# python version in depot_tools has been updated to work on Vista
|
@@ -153,11 +118,11 @@ def _GetDomainAndUserName():
|
|
153
118
|
call = subprocess.Popen(['net', 'config', 'Workstation'],
|
154
119
|
stdout=subprocess.PIPE)
|
155
120
|
config = call.communicate()[0]
|
156
|
-
username_re = re.compile('^User name\s+(\S+)', re.MULTILINE)
|
121
|
+
username_re = re.compile(r'^User name\s+(\S+)', re.MULTILINE)
|
157
122
|
username_match = username_re.search(config)
|
158
123
|
if username_match:
|
159
124
|
username = username_match.group(1)
|
160
|
-
domain_re = re.compile('^Logon domain\s+(\S+)', re.MULTILINE)
|
125
|
+
domain_re = re.compile(r'^Logon domain\s+(\S+)', re.MULTILINE)
|
161
126
|
domain_match = domain_re.search(config)
|
162
127
|
if domain_match:
|
163
128
|
domain = domain_match.group(1)
|
@@ -323,7 +288,7 @@ def _BuildCommandLineForRuleRaw(spec, cmd, cygwin_shell, has_input_path,
|
|
323
288
|
if [x for x in cmd if '$(InputDir)' in x]:
|
324
289
|
input_dir_preamble = (
|
325
290
|
'set INPUTDIR=$(InputDir)\n'
|
326
|
-
'set INPUTDIR
|
291
|
+
'if NOT DEFINED INPUTDIR set INPUTDIR=.\\\n'
|
327
292
|
'set INPUTDIR=%INPUTDIR:~0,-1%\n'
|
328
293
|
)
|
329
294
|
else:
|
@@ -852,23 +817,27 @@ def _GenerateRulesForMSVS(p, output_dir, options, spec,
|
|
852
817
|
if rules_external:
|
853
818
|
_GenerateExternalRules(rules_external, output_dir, spec,
|
854
819
|
sources, options, actions_to_add)
|
855
|
-
_AdjustSourcesForRules(
|
820
|
+
_AdjustSourcesForRules(rules, sources, excluded_sources, False)
|
856
821
|
|
857
822
|
|
858
|
-
def _AdjustSourcesForRules(
|
823
|
+
def _AdjustSourcesForRules(rules, sources, excluded_sources, is_msbuild):
|
859
824
|
# Add outputs generated by each rule (if applicable).
|
860
825
|
for rule in rules:
|
861
|
-
#
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
826
|
+
# Add in the outputs from this rule.
|
827
|
+
trigger_files = _FindRuleTriggerFiles(rule, sources)
|
828
|
+
for trigger_file in trigger_files:
|
829
|
+
# Remove trigger_file from excluded_sources to let the rule be triggered
|
830
|
+
# (e.g. rule trigger ax_enums.idl is added to excluded_sources
|
831
|
+
# because it's also in an action's inputs in the same project)
|
832
|
+
excluded_sources.discard(_FixPath(trigger_file))
|
833
|
+
# Done if not processing outputs as sources.
|
834
|
+
if int(rule.get('process_outputs_as_sources', False)):
|
866
835
|
inputs, outputs = _RuleInputsAndOutputs(rule, trigger_file)
|
867
836
|
inputs = OrderedSet(_FixPaths(inputs))
|
868
837
|
outputs = OrderedSet(_FixPaths(outputs))
|
869
838
|
inputs.remove(_FixPath(trigger_file))
|
870
839
|
sources.update(inputs)
|
871
|
-
if not
|
840
|
+
if not is_msbuild:
|
872
841
|
excluded_sources.update(inputs)
|
873
842
|
sources.update(outputs)
|
874
843
|
|
@@ -955,6 +924,42 @@ def _GenerateProject(project, options, version, generator_flags):
|
|
955
924
|
return _GenerateMSVSProject(project, options, version, generator_flags)
|
956
925
|
|
957
926
|
|
927
|
+
# TODO: Avoid code duplication with _ValidateSourcesForOSX in make.py.
|
928
|
+
def _ValidateSourcesForMSVSProject(spec, version):
|
929
|
+
"""Makes sure if duplicate basenames are not specified in the source list.
|
930
|
+
|
931
|
+
Arguments:
|
932
|
+
spec: The target dictionary containing the properties of the target.
|
933
|
+
version: The VisualStudioVersion object.
|
934
|
+
"""
|
935
|
+
# This validation should not be applied to MSVC2010 and later.
|
936
|
+
assert not version.UsesVcxproj()
|
937
|
+
|
938
|
+
# TODO: Check if MSVC allows this for loadable_module targets.
|
939
|
+
if spec.get('type', None) not in ('static_library', 'shared_library'):
|
940
|
+
return
|
941
|
+
sources = spec.get('sources', [])
|
942
|
+
basenames = {}
|
943
|
+
for source in sources:
|
944
|
+
name, ext = os.path.splitext(source)
|
945
|
+
is_compiled_file = ext in [
|
946
|
+
'.c', '.cc', '.cpp', '.cxx', '.m', '.mm', '.s', '.S']
|
947
|
+
if not is_compiled_file:
|
948
|
+
continue
|
949
|
+
basename = os.path.basename(name) # Don't include extension.
|
950
|
+
basenames.setdefault(basename, []).append(source)
|
951
|
+
|
952
|
+
error = ''
|
953
|
+
for basename, files in basenames.iteritems():
|
954
|
+
if len(files) > 1:
|
955
|
+
error += ' %s: %s\n' % (basename, ' '.join(files))
|
956
|
+
|
957
|
+
if error:
|
958
|
+
print('static library %s has several files with the same basename:\n' %
|
959
|
+
spec['target_name'] + error + 'MSVC08 cannot handle that.')
|
960
|
+
raise GypError('Duplicate basenames in sources section, see list above')
|
961
|
+
|
962
|
+
|
958
963
|
def _GenerateMSVSProject(project, options, version, generator_flags):
|
959
964
|
"""Generates a .vcproj file. It may create .rules and .user files too.
|
960
965
|
|
@@ -980,6 +985,11 @@ def _GenerateMSVSProject(project, options, version, generator_flags):
|
|
980
985
|
for config_name, config in spec['configurations'].iteritems():
|
981
986
|
_AddConfigurationToMSVSProject(p, spec, config_type, config_name, config)
|
982
987
|
|
988
|
+
# MSVC08 and prior version cannot handle duplicate basenames in the same
|
989
|
+
# target.
|
990
|
+
# TODO: Take excluded sources into consideration if possible.
|
991
|
+
_ValidateSourcesForMSVSProject(spec, version)
|
992
|
+
|
983
993
|
# Prepare list of sources and excluded sources.
|
984
994
|
gyp_file = os.path.split(project.build_file)[1]
|
985
995
|
sources, excluded_sources = _PrepareListOfSources(spec, generator_flags,
|
@@ -1099,7 +1109,8 @@ def _AddConfigurationToMSVSProject(p, spec, config_type, config_name, config):
|
|
1099
1109
|
for this configuration.
|
1100
1110
|
"""
|
1101
1111
|
# Get the information for this configuration
|
1102
|
-
include_dirs, resource_include_dirs =
|
1112
|
+
include_dirs, midl_include_dirs, resource_include_dirs = \
|
1113
|
+
_GetIncludeDirs(config)
|
1103
1114
|
libraries = _GetLibraries(spec)
|
1104
1115
|
library_dirs = _GetLibraryDirs(config)
|
1105
1116
|
out_file, vc_tool, _ = _GetOutputFilePathAndTool(spec, msbuild=False)
|
@@ -1127,6 +1138,8 @@ def _AddConfigurationToMSVSProject(p, spec, config_type, config_name, config):
|
|
1127
1138
|
# Add the information to the appropriate tool
|
1128
1139
|
_ToolAppend(tools, 'VCCLCompilerTool',
|
1129
1140
|
'AdditionalIncludeDirectories', include_dirs)
|
1141
|
+
_ToolAppend(tools, 'VCMIDLTool',
|
1142
|
+
'AdditionalIncludeDirectories', midl_include_dirs)
|
1130
1143
|
_ToolAppend(tools, 'VCResourceCompilerTool',
|
1131
1144
|
'AdditionalIncludeDirectories', resource_include_dirs)
|
1132
1145
|
# Add in libraries.
|
@@ -1182,10 +1195,14 @@ def _GetIncludeDirs(config):
|
|
1182
1195
|
include_dirs = (
|
1183
1196
|
config.get('include_dirs', []) +
|
1184
1197
|
config.get('msvs_system_include_dirs', []))
|
1198
|
+
midl_include_dirs = (
|
1199
|
+
config.get('midl_include_dirs', []) +
|
1200
|
+
config.get('msvs_system_include_dirs', []))
|
1185
1201
|
resource_include_dirs = config.get('resource_include_dirs', include_dirs)
|
1186
1202
|
include_dirs = _FixPaths(include_dirs)
|
1203
|
+
midl_include_dirs = _FixPaths(midl_include_dirs)
|
1187
1204
|
resource_include_dirs = _FixPaths(resource_include_dirs)
|
1188
|
-
return include_dirs, resource_include_dirs
|
1205
|
+
return include_dirs, midl_include_dirs, resource_include_dirs
|
1189
1206
|
|
1190
1207
|
|
1191
1208
|
def _GetLibraryDirs(config):
|
@@ -1219,7 +1236,7 @@ def _GetLibraries(spec):
|
|
1219
1236
|
found = OrderedSet()
|
1220
1237
|
unique_libraries_list = []
|
1221
1238
|
for entry in reversed(libraries):
|
1222
|
-
library = re.sub('^\-l', '', entry)
|
1239
|
+
library = re.sub(r'^\-l', '', entry)
|
1223
1240
|
if not os.path.splitext(library)[1]:
|
1224
1241
|
library += '.lib'
|
1225
1242
|
if library not in found:
|
@@ -1822,7 +1839,7 @@ def _CreateProjectObjects(target_list, target_dicts, options, msvs_version):
|
|
1822
1839
|
return projects
|
1823
1840
|
|
1824
1841
|
|
1825
|
-
def _InitNinjaFlavor(
|
1842
|
+
def _InitNinjaFlavor(params, target_list, target_dicts):
|
1826
1843
|
"""Initialize targets for the ninja flavor.
|
1827
1844
|
|
1828
1845
|
This sets up the necessary variables in the targets to generate msvs projects
|
@@ -1830,7 +1847,7 @@ def _InitNinjaFlavor(options, target_list, target_dicts):
|
|
1830
1847
|
if they have not been set. This allows individual specs to override the
|
1831
1848
|
default values initialized here.
|
1832
1849
|
Arguments:
|
1833
|
-
|
1850
|
+
params: Params provided to the generator.
|
1834
1851
|
target_list: List of target pairs: 'base/base.gyp:base'.
|
1835
1852
|
target_dicts: Dict of target properties keyed on target pair.
|
1836
1853
|
"""
|
@@ -1844,8 +1861,12 @@ def _InitNinjaFlavor(options, target_list, target_dicts):
|
|
1844
1861
|
|
1845
1862
|
spec['msvs_external_builder'] = 'ninja'
|
1846
1863
|
if not spec.get('msvs_external_builder_out_dir'):
|
1847
|
-
|
1848
|
-
|
1864
|
+
gyp_file, _, _ = gyp.common.ParseQualifiedTarget(qualified_target)
|
1865
|
+
gyp_dir = os.path.dirname(gyp_file)
|
1866
|
+
spec['msvs_external_builder_out_dir'] = os.path.join(
|
1867
|
+
gyp.common.RelativePath(params['options'].toplevel_dir, gyp_dir),
|
1868
|
+
ninja_generator.ComputeOutputDir(params),
|
1869
|
+
'$(Configuration)')
|
1849
1870
|
if not spec.get('msvs_external_builder_build_cmd'):
|
1850
1871
|
spec['msvs_external_builder_build_cmd'] = [
|
1851
1872
|
path_to_ninja,
|
@@ -1858,8 +1879,7 @@ def _InitNinjaFlavor(options, target_list, target_dicts):
|
|
1858
1879
|
path_to_ninja,
|
1859
1880
|
'-C',
|
1860
1881
|
'$(OutDir)',
|
1861
|
-
'-
|
1862
|
-
'clean',
|
1882
|
+
'-tclean',
|
1863
1883
|
'$(ProjectName)',
|
1864
1884
|
]
|
1865
1885
|
|
@@ -1940,7 +1960,7 @@ def GenerateOutput(target_list, target_dicts, data, params):
|
|
1940
1960
|
|
1941
1961
|
# Optionally configure each spec to use ninja as the external builder.
|
1942
1962
|
if params.get('flavor') == 'ninja':
|
1943
|
-
_InitNinjaFlavor(
|
1963
|
+
_InitNinjaFlavor(params, target_list, target_dicts)
|
1944
1964
|
|
1945
1965
|
# Prepare the set of configurations.
|
1946
1966
|
configs = set()
|
@@ -1993,7 +2013,7 @@ def GenerateOutput(target_list, target_dicts, data, params):
|
|
1993
2013
|
|
1994
2014
|
|
1995
2015
|
def _GenerateMSBuildFiltersFile(filters_path, source_files,
|
1996
|
-
extension_to_rule_name):
|
2016
|
+
rule_dependencies, extension_to_rule_name):
|
1997
2017
|
"""Generate the filters file.
|
1998
2018
|
|
1999
2019
|
This file is used by Visual Studio to organize the presentation of source
|
@@ -2006,8 +2026,8 @@ def _GenerateMSBuildFiltersFile(filters_path, source_files,
|
|
2006
2026
|
"""
|
2007
2027
|
filter_group = []
|
2008
2028
|
source_group = []
|
2009
|
-
_AppendFiltersForMSBuild('', source_files,
|
2010
|
-
filter_group, source_group)
|
2029
|
+
_AppendFiltersForMSBuild('', source_files, rule_dependencies,
|
2030
|
+
extension_to_rule_name, filter_group, source_group)
|
2011
2031
|
if filter_group:
|
2012
2032
|
content = ['Project',
|
2013
2033
|
{'ToolsVersion': '4.0',
|
@@ -2022,7 +2042,7 @@ def _GenerateMSBuildFiltersFile(filters_path, source_files,
|
|
2022
2042
|
os.unlink(filters_path)
|
2023
2043
|
|
2024
2044
|
|
2025
|
-
def _AppendFiltersForMSBuild(parent_filter_name, sources,
|
2045
|
+
def _AppendFiltersForMSBuild(parent_filter_name, sources, rule_dependencies,
|
2026
2046
|
extension_to_rule_name,
|
2027
2047
|
filter_group, source_group):
|
2028
2048
|
"""Creates the list of filters and sources to be added in the filter file.
|
@@ -2048,11 +2068,12 @@ def _AppendFiltersForMSBuild(parent_filter_name, sources,
|
|
2048
2068
|
['UniqueIdentifier', MSVSNew.MakeGuid(source.name)]])
|
2049
2069
|
# Recurse and add its dependents.
|
2050
2070
|
_AppendFiltersForMSBuild(filter_name, source.contents,
|
2051
|
-
extension_to_rule_name,
|
2071
|
+
rule_dependencies, extension_to_rule_name,
|
2052
2072
|
filter_group, source_group)
|
2053
2073
|
else:
|
2054
2074
|
# It's a source. Create a source entry.
|
2055
|
-
_, element = _MapFileToMsBuildSourceType(source,
|
2075
|
+
_, element = _MapFileToMsBuildSourceType(source, rule_dependencies,
|
2076
|
+
extension_to_rule_name)
|
2056
2077
|
source_entry = [element, {'Include': source}]
|
2057
2078
|
# Specify the filter it is part of, if any.
|
2058
2079
|
if parent_filter_name:
|
@@ -2060,7 +2081,8 @@ def _AppendFiltersForMSBuild(parent_filter_name, sources,
|
|
2060
2081
|
source_group.append(source_entry)
|
2061
2082
|
|
2062
2083
|
|
2063
|
-
def _MapFileToMsBuildSourceType(source,
|
2084
|
+
def _MapFileToMsBuildSourceType(source, rule_dependencies,
|
2085
|
+
extension_to_rule_name):
|
2064
2086
|
"""Returns the group and element type of the source file.
|
2065
2087
|
|
2066
2088
|
Arguments:
|
@@ -2086,6 +2108,9 @@ def _MapFileToMsBuildSourceType(source, extension_to_rule_name):
|
|
2086
2108
|
elif ext == '.idl':
|
2087
2109
|
group = 'midl'
|
2088
2110
|
element = 'Midl'
|
2111
|
+
elif source in rule_dependencies:
|
2112
|
+
group = 'rule_dependency'
|
2113
|
+
element = 'CustomBuild'
|
2089
2114
|
else:
|
2090
2115
|
group = 'none'
|
2091
2116
|
element = 'None'
|
@@ -2095,7 +2120,8 @@ def _MapFileToMsBuildSourceType(source, extension_to_rule_name):
|
|
2095
2120
|
def _GenerateRulesForMSBuild(output_dir, options, spec,
|
2096
2121
|
sources, excluded_sources,
|
2097
2122
|
props_files_of_rules, targets_files_of_rules,
|
2098
|
-
actions_to_add,
|
2123
|
+
actions_to_add, rule_dependencies,
|
2124
|
+
extension_to_rule_name):
|
2099
2125
|
# MSBuild rules are implemented using three files: an XML file, a .targets
|
2100
2126
|
# file and a .props file.
|
2101
2127
|
# See http://blogs.msdn.com/b/vcblog/archive/2010/04/21/quick-help-on-vs2010-custom-build-rule.aspx
|
@@ -2111,6 +2137,7 @@ def _GenerateRulesForMSBuild(output_dir, options, spec,
|
|
2111
2137
|
continue
|
2112
2138
|
msbuild_rule = MSBuildRule(rule, spec)
|
2113
2139
|
msbuild_rules.append(msbuild_rule)
|
2140
|
+
rule_dependencies.update(msbuild_rule.additional_dependencies.split(';'))
|
2114
2141
|
extension_to_rule_name[msbuild_rule.extension] = msbuild_rule.rule_name
|
2115
2142
|
if msbuild_rules:
|
2116
2143
|
base = spec['target_name'] + options.suffix
|
@@ -2132,7 +2159,7 @@ def _GenerateRulesForMSBuild(output_dir, options, spec,
|
|
2132
2159
|
if rules_external:
|
2133
2160
|
_GenerateExternalRules(rules_external, output_dir, spec,
|
2134
2161
|
sources, options, actions_to_add)
|
2135
|
-
_AdjustSourcesForRules(
|
2162
|
+
_AdjustSourcesForRules(rules, sources, excluded_sources, True)
|
2136
2163
|
|
2137
2164
|
|
2138
2165
|
class MSBuildRule(object):
|
@@ -2585,15 +2612,26 @@ def _GetMSBuildProjectConfigurations(configurations):
|
|
2585
2612
|
|
2586
2613
|
def _GetMSBuildGlobalProperties(spec, guid, gyp_file_name):
|
2587
2614
|
namespace = os.path.splitext(gyp_file_name)[0]
|
2588
|
-
|
2615
|
+
properties = [
|
2589
2616
|
['PropertyGroup', {'Label': 'Globals'},
|
2590
|
-
|
2591
|
-
|
2592
|
-
|
2593
|
-
|
2617
|
+
['ProjectGuid', guid],
|
2618
|
+
['Keyword', 'Win32Proj'],
|
2619
|
+
['RootNamespace', namespace],
|
2620
|
+
['IgnoreWarnCompileDuplicatedFilename', 'true'],
|
2594
2621
|
]
|
2595
|
-
|
2622
|
+
]
|
2596
2623
|
|
2624
|
+
if spec.get('msvs_enable_winrt'):
|
2625
|
+
properties[0].append(['DefaultLanguage', 'en-US'])
|
2626
|
+
properties[0].append(['AppContainerApplication', 'true'])
|
2627
|
+
properties[0].append(['ApplicationTypeRevision', '8.1'])
|
2628
|
+
|
2629
|
+
if spec.get('msvs_enable_winphone'):
|
2630
|
+
properties[0].append(['ApplicationType', 'Windows Phone'])
|
2631
|
+
else:
|
2632
|
+
properties[0].append(['ApplicationType', 'Windows Store'])
|
2633
|
+
|
2634
|
+
return properties
|
2597
2635
|
|
2598
2636
|
def _GetMSBuildConfigurationDetails(spec, build_file):
|
2599
2637
|
properties = {}
|
@@ -2604,8 +2642,9 @@ def _GetMSBuildConfigurationDetails(spec, build_file):
|
|
2604
2642
|
_AddConditionalProperty(properties, condition, 'ConfigurationType',
|
2605
2643
|
msbuild_attributes['ConfigurationType'])
|
2606
2644
|
if character_set:
|
2607
|
-
|
2608
|
-
|
2645
|
+
if 'msvs_enable_winrt' not in spec :
|
2646
|
+
_AddConditionalProperty(properties, condition, 'CharacterSet',
|
2647
|
+
character_set)
|
2609
2648
|
return _GetMSBuildPropertyGroup(spec, 'Configuration', properties)
|
2610
2649
|
|
2611
2650
|
|
@@ -2820,7 +2859,7 @@ def _AddConditionalProperty(properties, condition, name, value):
|
|
2820
2859
|
|
2821
2860
|
|
2822
2861
|
# Regex for msvs variable references ( i.e. $(FOO) ).
|
2823
|
-
MSVS_VARIABLE_REFERENCE = re.compile('\$\(([a-zA-Z_][a-zA-Z0-9_]*)\)')
|
2862
|
+
MSVS_VARIABLE_REFERENCE = re.compile(r'\$\(([a-zA-Z_][a-zA-Z0-9_]*)\)')
|
2824
2863
|
|
2825
2864
|
|
2826
2865
|
def _GetMSBuildPropertyGroup(spec, label, properties):
|
@@ -2904,7 +2943,8 @@ def _FinalizeMSBuildSettings(spec, configuration):
|
|
2904
2943
|
converted = True
|
2905
2944
|
msvs_settings = configuration.get('msvs_settings', {})
|
2906
2945
|
msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(msvs_settings)
|
2907
|
-
include_dirs, resource_include_dirs =
|
2946
|
+
include_dirs, midl_include_dirs, resource_include_dirs = \
|
2947
|
+
_GetIncludeDirs(configuration)
|
2908
2948
|
libraries = _GetLibraries(spec)
|
2909
2949
|
library_dirs = _GetLibraryDirs(configuration)
|
2910
2950
|
out_file, _, msbuild_tool = _GetOutputFilePathAndTool(spec, msbuild=True)
|
@@ -2934,6 +2974,8 @@ def _FinalizeMSBuildSettings(spec, configuration):
|
|
2934
2974
|
# if you don't have any resources.
|
2935
2975
|
_ToolAppend(msbuild_settings, 'ClCompile',
|
2936
2976
|
'AdditionalIncludeDirectories', include_dirs)
|
2977
|
+
_ToolAppend(msbuild_settings, 'Midl',
|
2978
|
+
'AdditionalIncludeDirectories', midl_include_dirs)
|
2937
2979
|
_ToolAppend(msbuild_settings, 'ResourceCompile',
|
2938
2980
|
'AdditionalIncludeDirectories', resource_include_dirs)
|
2939
2981
|
# Add in libraries, note that even for empty libraries, we want this
|
@@ -2964,6 +3006,13 @@ def _FinalizeMSBuildSettings(spec, configuration):
|
|
2964
3006
|
'PrecompiledHeaderFile', precompiled_header)
|
2965
3007
|
_ToolAppend(msbuild_settings, 'ClCompile',
|
2966
3008
|
'ForcedIncludeFiles', [precompiled_header])
|
3009
|
+
else:
|
3010
|
+
_ToolAppend(msbuild_settings, 'ClCompile', 'PrecompiledHeader', 'NotUsing')
|
3011
|
+
# Turn off WinRT compilation
|
3012
|
+
_ToolAppend(msbuild_settings, 'ClCompile', 'CompileAsWinRT', 'false')
|
3013
|
+
# Turn on import libraries if appropriate
|
3014
|
+
if spec.get('msvs_requires_importlibrary'):
|
3015
|
+
_ToolAppend(msbuild_settings, '', 'IgnoreImportLibrary', 'false')
|
2967
3016
|
# Loadable modules don't generate import libraries;
|
2968
3017
|
# tell dependent projects to not expect one.
|
2969
3018
|
if spec['type'] == 'loadable_module':
|
@@ -3031,15 +3080,18 @@ def _VerifySourcesExist(sources, root_dir):
|
|
3031
3080
|
return missing_sources
|
3032
3081
|
|
3033
3082
|
|
3034
|
-
def _GetMSBuildSources(spec, sources, exclusions,
|
3035
|
-
|
3036
|
-
|
3083
|
+
def _GetMSBuildSources(spec, sources, exclusions, rule_dependencies,
|
3084
|
+
extension_to_rule_name, actions_spec,
|
3085
|
+
sources_handled_by_action, list_excluded):
|
3086
|
+
groups = ['none', 'midl', 'include', 'compile', 'resource', 'rule',
|
3087
|
+
'rule_dependency']
|
3037
3088
|
grouped_sources = {}
|
3038
3089
|
for g in groups:
|
3039
3090
|
grouped_sources[g] = []
|
3040
3091
|
|
3041
3092
|
_AddSources2(spec, sources, exclusions, grouped_sources,
|
3042
|
-
|
3093
|
+
rule_dependencies, extension_to_rule_name,
|
3094
|
+
sources_handled_by_action, list_excluded)
|
3043
3095
|
sources = []
|
3044
3096
|
for g in groups:
|
3045
3097
|
if grouped_sources[g]:
|
@@ -3050,13 +3102,15 @@ def _GetMSBuildSources(spec, sources, exclusions, extension_to_rule_name,
|
|
3050
3102
|
|
3051
3103
|
|
3052
3104
|
def _AddSources2(spec, sources, exclusions, grouped_sources,
|
3053
|
-
|
3105
|
+
rule_dependencies, extension_to_rule_name,
|
3106
|
+
sources_handled_by_action,
|
3054
3107
|
list_excluded):
|
3055
3108
|
extensions_excluded_from_precompile = []
|
3056
3109
|
for source in sources:
|
3057
3110
|
if isinstance(source, MSVSProject.Filter):
|
3058
3111
|
_AddSources2(spec, source.contents, exclusions, grouped_sources,
|
3059
|
-
|
3112
|
+
rule_dependencies, extension_to_rule_name,
|
3113
|
+
sources_handled_by_action,
|
3060
3114
|
list_excluded)
|
3061
3115
|
else:
|
3062
3116
|
if not source in sources_handled_by_action:
|
@@ -3099,7 +3153,7 @@ def _AddSources2(spec, sources, exclusions, grouped_sources,
|
|
3099
3153
|
detail.append(['PrecompiledHeader', ''])
|
3100
3154
|
detail.append(['ForcedIncludeFiles', ''])
|
3101
3155
|
|
3102
|
-
group, element = _MapFileToMsBuildSourceType(source,
|
3156
|
+
group, element = _MapFileToMsBuildSourceType(source, rule_dependencies,
|
3103
3157
|
extension_to_rule_name)
|
3104
3158
|
grouped_sources[group].append([element, {'Include': source}] + detail)
|
3105
3159
|
|
@@ -3143,6 +3197,7 @@ def _GenerateMSBuildProject(project, options, version, generator_flags):
|
|
3143
3197
|
actions_to_add = {}
|
3144
3198
|
props_files_of_rules = set()
|
3145
3199
|
targets_files_of_rules = set()
|
3200
|
+
rule_dependencies = set()
|
3146
3201
|
extension_to_rule_name = {}
|
3147
3202
|
list_excluded = generator_flags.get('msvs_list_excluded_files', True)
|
3148
3203
|
|
@@ -3151,10 +3206,11 @@ def _GenerateMSBuildProject(project, options, version, generator_flags):
|
|
3151
3206
|
_GenerateRulesForMSBuild(project_dir, options, spec,
|
3152
3207
|
sources, excluded_sources,
|
3153
3208
|
props_files_of_rules, targets_files_of_rules,
|
3154
|
-
actions_to_add,
|
3209
|
+
actions_to_add, rule_dependencies,
|
3210
|
+
extension_to_rule_name)
|
3155
3211
|
else:
|
3156
3212
|
rules = spec.get('rules', [])
|
3157
|
-
_AdjustSourcesForRules(
|
3213
|
+
_AdjustSourcesForRules(rules, sources, excluded_sources, True)
|
3158
3214
|
|
3159
3215
|
sources, excluded_sources, excluded_idl = (
|
3160
3216
|
_AdjustSourcesAndConvertToFilterHierarchy(spec, options,
|
@@ -3177,6 +3233,7 @@ def _GenerateMSBuildProject(project, options, version, generator_flags):
|
|
3177
3233
|
spec, actions_to_add)
|
3178
3234
|
|
3179
3235
|
_GenerateMSBuildFiltersFile(project.path + '.filters', sources,
|
3236
|
+
rule_dependencies,
|
3180
3237
|
extension_to_rule_name)
|
3181
3238
|
missing_sources = _VerifySourcesExist(sources, project_dir)
|
3182
3239
|
|
@@ -3204,7 +3261,10 @@ def _GenerateMSBuildProject(project, options, version, generator_flags):
|
|
3204
3261
|
content += _GetMSBuildGlobalProperties(spec, project.guid, project_file_name)
|
3205
3262
|
content += import_default_section
|
3206
3263
|
content += _GetMSBuildConfigurationDetails(spec, project.build_file)
|
3207
|
-
|
3264
|
+
if spec.get('msvs_enable_winphone'):
|
3265
|
+
content += _GetMSBuildLocalProperties('v120_wp81')
|
3266
|
+
else:
|
3267
|
+
content += _GetMSBuildLocalProperties(project.msbuild_toolset)
|
3208
3268
|
content += import_cpp_props_section
|
3209
3269
|
content += _GetMSBuildExtensions(props_files_of_rules)
|
3210
3270
|
content += _GetMSBuildPropertySheets(configurations)
|
@@ -3213,8 +3273,8 @@ def _GenerateMSBuildProject(project, options, version, generator_flags):
|
|
3213
3273
|
project.build_file)
|
3214
3274
|
content += _GetMSBuildToolSettingsSections(spec, configurations)
|
3215
3275
|
content += _GetMSBuildSources(
|
3216
|
-
spec, sources, exclusions,
|
3217
|
-
sources_handled_by_action, list_excluded)
|
3276
|
+
spec, sources, exclusions, rule_dependencies, extension_to_rule_name,
|
3277
|
+
actions_spec, sources_handled_by_action, list_excluded)
|
3218
3278
|
content += _GetMSBuildProjectReferences(project)
|
3219
3279
|
content += import_cpp_targets_section
|
3220
3280
|
content += _GetMSBuildExtensionTargets(targets_files_of_rules)
|
@@ -3233,7 +3293,9 @@ def _GenerateMSBuildProject(project, options, version, generator_flags):
|
|
3233
3293
|
def _GetMSBuildExternalBuilderTargets(spec):
|
3234
3294
|
"""Return a list of MSBuild targets for external builders.
|
3235
3295
|
|
3236
|
-
|
3296
|
+
The "Build" and "Clean" targets are always generated. If the spec contains
|
3297
|
+
'msvs_external_builder_clcompile_cmd', then the "ClCompile" target will also
|
3298
|
+
be generated, to support building selected C/C++ files.
|
3237
3299
|
|
3238
3300
|
Arguments:
|
3239
3301
|
spec: The gyp target spec.
|
@@ -3252,7 +3314,17 @@ def _GetMSBuildExternalBuilderTargets(spec):
|
|
3252
3314
|
clean_target = ['Target', {'Name': 'Clean'}]
|
3253
3315
|
clean_target.append(['Exec', {'Command': clean_cmd}])
|
3254
3316
|
|
3255
|
-
|
3317
|
+
targets = [build_target, clean_target]
|
3318
|
+
|
3319
|
+
if spec.get('msvs_external_builder_clcompile_cmd'):
|
3320
|
+
clcompile_cmd = _BuildCommandLineForRuleRaw(
|
3321
|
+
spec, spec['msvs_external_builder_clcompile_cmd'],
|
3322
|
+
False, False, False, False)
|
3323
|
+
clcompile_target = ['Target', {'Name': 'ClCompile'}]
|
3324
|
+
clcompile_target.append(['Exec', {'Command': clcompile_cmd}])
|
3325
|
+
targets.append(clcompile_target)
|
3326
|
+
|
3327
|
+
return targets
|
3256
3328
|
|
3257
3329
|
|
3258
3330
|
def _GetMSBuildExtensions(props_files_of_rules):
|
@@ -3306,8 +3378,8 @@ def _GenerateActionsForMSBuild(spec, actions_to_add):
|
|
3306
3378
|
# get too long. See also _AddActions: cygwin's setup_env mustn't be called
|
3307
3379
|
# for every invocation or the command that sets the PATH will grow too
|
3308
3380
|
# long.
|
3309
|
-
command = (
|
3310
|
-
|
3381
|
+
command = '\r\n'.join([c + '\r\nif %errorlevel% neq 0 exit /b %errorlevel%'
|
3382
|
+
for c in commands])
|
3311
3383
|
_AddMSBuildAction(spec,
|
3312
3384
|
primary_input,
|
3313
3385
|
inputs,
|