From 3b58aa265fb2ef66072beedcdf94630c3af48ca1 Mon Sep 17 00:00:00 2001 From: Martin Jambon Date: Wed, 11 Sep 2024 18:05:52 -0700 Subject: [PATCH 01/17] Use new OCaml code generator and runtime with support for extras --- core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core b/core index c085bc5..1cd6492 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit c085bc5280996b781a80d5706cc5590081e1629b +Subproject commit 1cd649295c9b726450ac85c389d766ef275cac4f From ccf61dcadf2224378db9a3c551319e1986eadc77 Mon Sep 17 00:00:00 2001 From: Martin Jambon Date: Wed, 11 Sep 2024 18:08:55 -0700 Subject: [PATCH 02/17] Add lists of languages that need this or that version of tree-sitter. --- lang/languages-0.20.6 | 21 +++++++++++++++++++++ lang/languages-0.22.6 | 16 ++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 lang/languages-0.20.6 create mode 100644 lang/languages-0.22.6 diff --git a/lang/languages-0.20.6 b/lang/languages-0.20.6 new file mode 100644 index 0000000..590bf4b --- /dev/null +++ b/lang/languages-0.20.6 @@ -0,0 +1,21 @@ +bash +c-sharp +dart +elixir +fsharp +hack +hcl +html +java +javascript +lua +php +python +r +ruby +rust +sfapex +sml +solidity +typescript +vue diff --git a/lang/languages-0.22.6 b/lang/languages-0.22.6 new file mode 100644 index 0000000..684880e --- /dev/null +++ b/lang/languages-0.22.6 @@ -0,0 +1,16 @@ +c +cairo +clojure +cpp +dockerfile +go +haskell +jsonnet +julia +kotlin +make +ocaml +promql +proto +sqlite +swift From 2545314efe99a736b6c7cb88d32cca62e7de1ecc Mon Sep 17 00:00:00 2001 From: Martin Jambon Date: Wed, 11 Sep 2024 21:31:22 -0700 Subject: [PATCH 03/17] Fix gitignore --- lang/semgrep-grammars/src/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/semgrep-grammars/src/.gitignore b/lang/semgrep-grammars/src/.gitignore index 93c8976..93c60fd 100644 --- a/lang/semgrep-grammars/src/.gitignore +++ b/lang/semgrep-grammars/src/.gitignore @@ -2,4 +2,4 @@ /semgrep-*/**/index.js /semgrep-*/**/src /semgrep-*/**/inherited -/semgrep-*/test.log +/semgrep-*/**/test.log From 06a59cfb7330c7c92515204d6780423941afe01d Mon Sep 17 00:00:00 2001 From: Martin Jambon Date: Thu, 12 Sep 2024 14:11:41 -0700 Subject: [PATCH 04/17] Update core submodule --- core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core b/core index 1cd6492..45cb3e5 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 1cd649295c9b726450ac85c389d766ef275cac4f +Subproject commit 45cb3e5a37583cdf5754624616f0846ee80b6d98 From 3957537160417ecee41a34c3ce27806216aa4e02 Mon Sep 17 00:00:00 2001 From: Martin Jambon Date: Thu, 12 Sep 2024 14:51:31 -0700 Subject: [PATCH 05/17] Add missing languages to lists of languages --- .circleci/config.yml | 3 +++ lang/Makefile | 4 +++- lang/languages-0.22.6 | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3754e54..8d77329 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -139,6 +139,7 @@ workflows: - bash - c - cairo + - circom - clojure - cpp - c-sharp @@ -158,6 +159,8 @@ workflows: - kotlin - lua - make + - move-on-aptos + - move-on-sui - ocaml - php - promql diff --git a/lang/Makefile b/lang/Makefile index d0f2f30..7376489 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -37,6 +37,8 @@ SUPPORTED_TS_LANGUAGES = \ kotlin \ lua \ make \ + move-on-aptos \ + move-on-sui \ ocaml \ php \ promql \ @@ -86,8 +88,8 @@ SUPPORTED_DIALECTS = \ kotlin \ lua \ make \ - move-on-sui \ move-on-aptos \ + move-on-sui \ ocaml \ php \ promql \ diff --git a/lang/languages-0.22.6 b/lang/languages-0.22.6 index 684880e..1aa1732 100644 --- a/lang/languages-0.22.6 +++ b/lang/languages-0.22.6 @@ -1,5 +1,6 @@ c cairo +circom clojure cpp dockerfile @@ -9,6 +10,8 @@ jsonnet julia kotlin make +move-on-aptos +move-on-sui ocaml promql proto From 155d69cb52ebd2693e84b001b5fefc2e6116dcbb Mon Sep 17 00:00:00 2001 From: Martin Jambon Date: Thu, 12 Sep 2024 14:55:43 -0700 Subject: [PATCH 06/17] Add missing language --- .circleci/config.yml | 1 + lang/Makefile | 1 + lang/languages-0.22.6 | 1 + 3 files changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8d77329..ea7032f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -166,6 +166,7 @@ workflows: - promql - proto - python + - ql - r - ruby - rust diff --git a/lang/Makefile b/lang/Makefile index 7376489..a1a0fcd 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -44,6 +44,7 @@ SUPPORTED_TS_LANGUAGES = \ promql \ proto \ python \ + ql \ r \ ruby \ rust \ diff --git a/lang/languages-0.22.6 b/lang/languages-0.22.6 index 1aa1732..6d800e1 100644 --- a/lang/languages-0.22.6 +++ b/lang/languages-0.22.6 @@ -15,5 +15,6 @@ move-on-sui ocaml promql proto +ql sqlite swift From eaf77e7f261b0995a84a6b318b6a6d98e03b6105 Mon Sep 17 00:00:00 2001 From: Martin Jambon Date: Thu, 12 Sep 2024 16:24:05 -0700 Subject: [PATCH 07/17] Restore version of tree-sitter-julia supported by semgrep --- lang/semgrep-grammars/src/tree-sitter-julia | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/semgrep-grammars/src/tree-sitter-julia b/lang/semgrep-grammars/src/tree-sitter-julia index 1145ece..bb7e587 160000 --- a/lang/semgrep-grammars/src/tree-sitter-julia +++ b/lang/semgrep-grammars/src/tree-sitter-julia @@ -1 +1 @@ -Subproject commit 1145ecee74929a6b75af90d27a8a7bcec4a07067 +Subproject commit bb7e587837fdeda74dd510256253d60f59a1e2cd From 527aa7ee3ef509eef99375fb0e517a7aa4b1eec0 Mon Sep 17 00:00:00 2001 From: Martin Jambon Date: Thu, 12 Sep 2024 17:23:05 -0700 Subject: [PATCH 08/17] Update core, requires regenerating all languages --- core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core b/core index 45cb3e5..7ef16ec 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 45cb3e5a37583cdf5754624616f0846ee80b6d98 +Subproject commit 7ef16ec546a213e45560c15f779d186d55cb5db5 From 14ace03899f31946a26e4dc99bb3db9f91646024 Mon Sep 17 00:00:00 2001 From: Martin Jambon Date: Thu, 12 Sep 2024 17:50:50 -0700 Subject: [PATCH 09/17] Add lists of languages for the 'release' command --- lang/language-variants-0.20.6 | 22 ++++++++++++++++++++++ lang/language-variants-0.22.6 | 20 ++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 lang/language-variants-0.20.6 create mode 100644 lang/language-variants-0.22.6 diff --git a/lang/language-variants-0.20.6 b/lang/language-variants-0.20.6 new file mode 100644 index 0000000..512b0f1 --- /dev/null +++ b/lang/language-variants-0.20.6 @@ -0,0 +1,22 @@ +apex +bash +c-sharp +dart +elixir +fsharp +hack +hcl +html +java +javascript +lua +php +python +r +ruby +rust +sml +solidity +tsx +typescript +vue diff --git a/lang/language-variants-0.22.6 b/lang/language-variants-0.22.6 new file mode 100644 index 0000000..6d800e1 --- /dev/null +++ b/lang/language-variants-0.22.6 @@ -0,0 +1,20 @@ +c +cairo +circom +clojure +cpp +dockerfile +go +haskell +jsonnet +julia +kotlin +make +move-on-aptos +move-on-sui +ocaml +promql +proto +ql +sqlite +swift From 30fff598ae03696891d53d7aa34c0895645b1546 Mon Sep 17 00:00:00 2001 From: Martin Jambon Date: Thu, 12 Sep 2024 19:29:44 -0700 Subject: [PATCH 10/17] Add readme --- lang/languages-0.20.6.readme | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 lang/languages-0.20.6.readme diff --git a/lang/languages-0.20.6.readme b/lang/languages-0.20.6.readme new file mode 100644 index 0000000..e678751 --- /dev/null +++ b/lang/languages-0.20.6.readme @@ -0,0 +1,14 @@ +The files languages-0.20.6, languages-0.22.6, language-variants-0.20.6, +and language-variants-0.22.6 contain lists of languages that are useful +when regenerating the code for all the languages when necessary. + +We're in a situation where some languages are stuck with tree-sitter 0.20.6. +The language names in languages-* are suitable for the `test-lang` script. +The dialect names in language-variants-* are suitable for the `release` +script. + +Sample Bash commands iterating over languages: + +$ for x in $(cat languages-0.22.6,); do ./test-lang $x || break; done + +$ for x in $(cat language-variants-0.22.6,); do ./release $x || break; done From 4b0962781f9d6f3bedc1298921b594b23bb5227b Mon Sep 17 00:00:00 2001 From: Martin Jambon Date: Thu, 12 Sep 2024 20:36:00 -0700 Subject: [PATCH 11/17] Undo PR https://github.com/semgrep/ocaml-tree-sitter-semgrep/pull/488 because the corresponding changes weren't made in semgrep --- .../semgrep-typescript/common/semgrep-ext.js | 14 ++++-- .../tsx/corpus/semgrep-ext.txt | 49 ------------------- 2 files changed, 11 insertions(+), 52 deletions(-) delete mode 100644 lang/semgrep-grammars/src/semgrep-typescript/tsx/corpus/semgrep-ext.txt diff --git a/lang/semgrep-grammars/src/semgrep-typescript/common/semgrep-ext.js b/lang/semgrep-grammars/src/semgrep-typescript/common/semgrep-ext.js index 9972b89..9f28904 100644 --- a/lang/semgrep-grammars/src/semgrep-typescript/common/semgrep-ext.js +++ b/lang/semgrep-grammars/src/semgrep-typescript/common/semgrep-ext.js @@ -28,8 +28,16 @@ module.exports = { */ semgrep_ellipsis: $ => '...', - semgrep_metavar_ellipsis: $ => /\$\.\.\.[A-Z_][A-Z_0-9]*/, +/* TODO: restore this when the changes are made in semgrep. + Remove the XXXXXXX when uncommenting. + You also need to restore the test file: + lang/semgrep-grammars/src/semgrep-typescript/tsx/corpus/semgrep-ext.txt + See the original PR: + https://github.com/semgrep/ocaml-tree-sitter-semgrep/pull/488 + + semgrep_metavar_ellipsis: $ => /\$\.\.\.[A-Z_][A-Z_0-9]*XXXXXXX/, +/* /* In the expression context, there are LR(1) conflicts with spread and * rest. I (nmote) don't think that these are true ambiguities, but just in * case we'll declare conflicts and set this to low dynamic precedence so as @@ -40,13 +48,13 @@ module.exports = { previous, $.semgrep_expression_ellipsis, ), - +/* TODO: restore this when the changes are made in semgrep. _jsx_attribute: ($, previous) => choice( previous, $.semgrep_ellipsis, $.semgrep_metavar_ellipsis ), - +*/ // TODO Remove this when we update tree-sitter-typescript past // https://github.com/tree-sitter/tree-sitter-typescript/pull/239. I (nmote) // ran into unrelated issues updating it, documented in diff --git a/lang/semgrep-grammars/src/semgrep-typescript/tsx/corpus/semgrep-ext.txt b/lang/semgrep-grammars/src/semgrep-typescript/tsx/corpus/semgrep-ext.txt deleted file mode 100644 index e7ebac8..0000000 --- a/lang/semgrep-grammars/src/semgrep-typescript/tsx/corpus/semgrep-ext.txt +++ /dev/null @@ -1,49 +0,0 @@ -================================== -JSX with ellipsis -================================== - - - ---- - -(program - (expression_statement - (jsx_self_closing_element - (identifier) - (semgrep_ellipsis)))) - -================================== -JSX with ellipsis and other props -================================== - - - ---- - -(program - (expression_statement - (jsx_self_closing_element - (identifier) - (jsx_attribute - (property_identifier) - (string - (string_fragment))) - (semgrep_ellipsis) - (jsx_attribute - (property_identifier) - (jsx_expression - (identifier)))))) - -================================== -JSX with metavariable ellipsis -================================== - - - ---- - -(program - (expression_statement - (jsx_self_closing_element - (identifier) - (semgrep_metavar_ellipsis)))) From 70833c8f6914e3366e9684e30ee54e33d5552d44 Mon Sep 17 00:00:00 2001 From: Martin Jambon Date: Fri, 13 Sep 2024 14:49:47 -0700 Subject: [PATCH 12/17] Revert 2 recent semgrep-go commits by Brandon and Yosef because the accompanying changes in semgrep are not ready. We're reverting the contents of semgrep-go to commit 9b59bf4de55a94ebfeae44ad37b628ef1e2dd8c8 --- .../src/semgrep-go/grammar.js | 53 +--- .../src/semgrep-go/test/corpus/semgrep.txt | 234 ------------------ lang/semgrep-grammars/src/tree-sitter-go | 2 +- 3 files changed, 11 insertions(+), 278 deletions(-) diff --git a/lang/semgrep-grammars/src/semgrep-go/grammar.js b/lang/semgrep-grammars/src/semgrep-go/grammar.js index 37682c8..1c1fc1e 100644 --- a/lang/semgrep-grammars/src/semgrep-go/grammar.js +++ b/lang/semgrep-grammars/src/semgrep-go/grammar.js @@ -17,48 +17,15 @@ module.exports = grammar(base_grammar, { if they're not already part of the base grammar. */ rules: { - semgrep_ellipsis: $ => "...", - - semgrep_ellipsis_metavar : $ => /\$\.\.\.[a-zA-Z_][a-zA-Z_0-9]*/, - semgrep_deep_ellipsis: $ => seq("<...", $._expression, "...>"), - - // The parser tries to wrap ellipsis with expression statements since we - // list ellipsis as expressions and usually we use them in a statement - // position (i.e `if(true) {...}`) - _statement: ($, previous) => choice( - previous, - prec(1,$.semgrep_ellipsis_metavar), - prec(1,$.semgrep_deep_ellipsis), - prec(1,$.semgrep_ellipsis) - ), - - _expression: ($, previous) => choice( - previous, - $.semgrep_ellipsis_metavar, - $.semgrep_deep_ellipsis, - $.semgrep_ellipsis, - $.typed_metavar - ), - - typed_metavar: $ => seq( - "(", $.identifier, ":", $._type, ")" - ), - - identifier: ($, previous) => token(choice( - previous, - // inline this here so we can stay inside of the `token`, because - // `identifier` is the word token - /\$[A-Z_][A-Z_0-9]*/ - )), - - parameter_declaration: ($, previous) => choice( - $.semgrep_ellipsis, - $.semgrep_ellipsis_metavar, - previous - ), - - // slightly more precedence so we bump this up over using `...` - // for a semgrep ellipsis - implicit_length_array_type: ($, previous) => prec(1, previous) + /* + semgrep_ellipsis: $ => '...', + + _expression: ($, previous) => { + return choice( + $.semgrep_ellipsis, + ...previous.members + ); + } + */ } }); diff --git a/lang/semgrep-grammars/src/semgrep-go/test/corpus/semgrep.txt b/lang/semgrep-grammars/src/semgrep-go/test/corpus/semgrep.txt index 4fc1659..e69de29 100644 --- a/lang/semgrep-grammars/src/semgrep-go/test/corpus/semgrep.txt +++ b/lang/semgrep-grammars/src/semgrep-go/test/corpus/semgrep.txt @@ -1,234 +0,0 @@ -================================================================================ -Ellipsis -================================================================================ - -... - --------------------------------------------------------------------------------- - -(source_file - (semgrep_ellipsis)) - -================================================================================ -Top level statements -================================================================================ - -x := 1 -... -y := 2 - --------------------------------------------------------------------------------- - -(source_file - (short_var_declaration - (expression_list - (identifier)) - (expression_list - (int_literal))) - (semgrep_ellipsis) - (short_var_declaration - (expression_list - (identifier)) - (expression_list - (int_literal)))) - -================================================================================ -Function with ellipses -================================================================================ - -func $FUNC(x bool, ...) { - ... -} - --------------------------------------------------------------------------------- - -(source_file - (function_declaration - (identifier) - (parameter_list - (parameter_declaration - (identifier) - (type_identifier)) - (parameter_declaration - (semgrep_ellipsis))) - (block - (semgrep_ellipsis)))) - -================================================================================ -Function with ellipses -================================================================================ - -func $FUNC(x bool, $...ARGS) { - $...BODY -} - --------------------------------------------------------------------------------- - -(source_file - (function_declaration - (identifier) - (parameter_list - (parameter_declaration - (identifier) - (type_identifier)) - (parameter_declaration - (semgrep_ellipsis_metavar))) - (block - (semgrep_ellipsis_metavar)))) - -================================================================================ -Type declaration with metavariables -================================================================================ - -type $TY = $TY2 - --------------------------------------------------------------------------------- - -(source_file - (type_declaration - (type_alias - (type_identifier) - (type_identifier)))) - -================================================================================ -Struct metavariable -================================================================================ - -type $STRUCT struct { - $FIELD int - $FIELD2 $TY -} - --------------------------------------------------------------------------------- - -(source_file - (type_declaration - (type_spec - (type_identifier) - (struct_type - (field_declaration_list - (field_declaration - (field_identifier) - (type_identifier)) - (field_declaration - (field_identifier) - (type_identifier))))))) - -================================================================================ -Ellipsis args -================================================================================ - -foo(..., 5) - --------------------------------------------------------------------------------- - -(source_file - (expression_statement - (call_expression - (identifier) - (argument_list - (semgrep_ellipsis) - (int_literal))))) - -================================================================================ -Ellipsis in if -================================================================================ - -if (...) { - ... -} else { - ... -} - --------------------------------------------------------------------------------- - -(source_file - (if_statement - (parenthesized_expression - (semgrep_ellipsis)) - (block - (semgrep_ellipsis)) - (block - (semgrep_ellipsis)))) - -================================================================================ -Metavariable in import -================================================================================ - -import ( - $NAME "crypto/rand" -) - --------------------------------------------------------------------------------- - -(source_file - (import_declaration - (import_spec_list - (import_spec - (package_identifier) - (interpreted_string_literal))))) - -================================================================================ -Deep expression -================================================================================ - -<... 1 ...> - --------------------------------------------------------------------------------- - -(source_file - (semgrep_deep_ellipsis - (int_literal))) - -================================================================================ -Deep expression again -================================================================================ - -x := <... foo() ...> - --------------------------------------------------------------------------------- - -(source_file - (short_var_declaration - (expression_list - (identifier)) - (expression_list - (semgrep_deep_ellipsis - (call_expression - (identifier) - (argument_list)))))) - -================================================================================ -Typed metavariables -================================================================================ - -x := ($TY : bool) - --------------------------------------------------------------------------------- - -(source_file - (short_var_declaration - (expression_list - (identifier)) - (expression_list - (typed_metavar - (identifier) - (type_identifier))))) - -================================================================================ -Implicit length array type -================================================================================ - -x := [...] bool {} - --------------------------------------------------------------------------------- - -(source_file - (short_var_declaration - (expression_list - (identifier)) - (expression_list - (composite_literal - (implicit_length_array_type - (type_identifier)) - (literal_value))))) diff --git a/lang/semgrep-grammars/src/tree-sitter-go b/lang/semgrep-grammars/src/tree-sitter-go index 81a11f8..05900fa 160000 --- a/lang/semgrep-grammars/src/tree-sitter-go +++ b/lang/semgrep-grammars/src/tree-sitter-go @@ -1 +1 @@ -Subproject commit 81a11f8252998ee6b98d59e6da91fc307491e53d +Subproject commit 05900faa3cdb5d2d8c8bd5e77ee698487e0a8611 From dd2297080c3b7625a4e9f70feec3e77b20f9cabe Mon Sep 17 00:00:00 2001 From: Martin Jambon Date: Fri, 13 Sep 2024 17:10:50 -0700 Subject: [PATCH 13/17] Update core --- core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core b/core index 7ef16ec..b3c7e8c 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 7ef16ec546a213e45560c15f779d186d55cb5db5 +Subproject commit b3c7e8ce4b941f0bbcc133abc176f7502fd00936 From ba53bc79be9cbc4200eb4aae23fcbadaff09d824 Mon Sep 17 00:00:00 2001 From: Martin Jambon Date: Mon, 16 Sep 2024 17:00:21 -0700 Subject: [PATCH 14/17] Promote html parser from tree-sitter 0.20.6 to 0.22.6 --- lang/language-variants-0.20.6 | 1 - lang/language-variants-0.22.6 | 1 + lang/languages-0.20.6 | 1 - lang/languages-0.22.6 | 1 + 4 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/language-variants-0.20.6 b/lang/language-variants-0.20.6 index 512b0f1..391680c 100644 --- a/lang/language-variants-0.20.6 +++ b/lang/language-variants-0.20.6 @@ -6,7 +6,6 @@ elixir fsharp hack hcl -html java javascript lua diff --git a/lang/language-variants-0.22.6 b/lang/language-variants-0.22.6 index 6d800e1..2944501 100644 --- a/lang/language-variants-0.22.6 +++ b/lang/language-variants-0.22.6 @@ -6,6 +6,7 @@ cpp dockerfile go haskell +html jsonnet julia kotlin diff --git a/lang/languages-0.20.6 b/lang/languages-0.20.6 index 590bf4b..e61996b 100644 --- a/lang/languages-0.20.6 +++ b/lang/languages-0.20.6 @@ -5,7 +5,6 @@ elixir fsharp hack hcl -html java javascript lua diff --git a/lang/languages-0.22.6 b/lang/languages-0.22.6 index 6d800e1..2944501 100644 --- a/lang/languages-0.22.6 +++ b/lang/languages-0.22.6 @@ -6,6 +6,7 @@ cpp dockerfile go haskell +html jsonnet julia kotlin From 96fd7cea7d757e00bc206c7799ddafd8f355241e Mon Sep 17 00:00:00 2001 From: Martin Jambon Date: Tue, 17 Sep 2024 18:01:26 -0700 Subject: [PATCH 15/17] Use a patched version of tree-sitter-vue that avoids HTML parsing errors in programs where both semgrep-vue and semgrep-html are used. --- .gitmodules | 2 +- lang/semgrep-grammars/src/tree-sitter-vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 5eb2eec..35283a7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -48,7 +48,7 @@ url = https://github.com/returntocorp/ocaml-tree-sitter-core.git [submodule "lang/semgrep-grammars/src/tree-sitter-vue"] path = lang/semgrep-grammars/src/tree-sitter-vue - url = https://github.com/ikatyang/tree-sitter-vue.git + url = https://github.com/semgrep/tree-sitter-vue.git [submodule "lang/semgrep-grammars/src/tree-sitter-html"] path = lang/semgrep-grammars/src/tree-sitter-html url = https://github.com/tree-sitter/tree-sitter-html.git diff --git a/lang/semgrep-grammars/src/tree-sitter-vue b/lang/semgrep-grammars/src/tree-sitter-vue index 91fe275..3acd603 160000 --- a/lang/semgrep-grammars/src/tree-sitter-vue +++ b/lang/semgrep-grammars/src/tree-sitter-vue @@ -1 +1 @@ -Subproject commit 91fe2754796cd8fba5f229505a23fa08f3546c06 +Subproject commit 3acd603e6a7fbf043fe1b5c5c89dca7506c0f44b From 6cf0323f48f9d80287975dede6ac274956556747 Mon Sep 17 00:00:00 2001 From: Martin Jambon Date: Tue, 17 Sep 2024 20:17:04 -0700 Subject: [PATCH 16/17] Add safeguard against running into the same tree-sitter-vue issue again --- lang/semgrep-grammars/src/semgrep-vue/prep | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lang/semgrep-grammars/src/semgrep-vue/prep b/lang/semgrep-grammars/src/semgrep-vue/prep index 8ecabfd..929e00c 100755 --- a/lang/semgrep-grammars/src/semgrep-vue/prep +++ b/lang/semgrep-grammars/src/semgrep-vue/prep @@ -17,6 +17,19 @@ cat ../tree-sitter-vue/src/scanner.cc \ cd src ln -sf ../../tree-sitter-vue/src/tree_sitter_html/scanner.cc scanner_html.h ln -sf ../../tree-sitter-vue/src/tree_sitter_html/tag.h tag.h + + # Sanity check + if grep tree_sitter_html_ scanner_html.h; then + cat >&2 < Date: Wed, 18 Sep 2024 09:46:56 -0700 Subject: [PATCH 17/17] Update core --- core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core b/core index b3c7e8c..e063ec5 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit b3c7e8ce4b941f0bbcc133abc176f7502fd00936 +Subproject commit e063ec5749bb217a594773c13308145f453d5d0c