Skip to content

Commit

Permalink
python update (#521)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonspark authored Jan 15, 2025
1 parent 386698b commit 0610ec8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
29 changes: 17 additions & 12 deletions lang/semgrep-grammars/src/semgrep-python/test/corpus/semgrep.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,22 @@ Metavariable in match
case str():
print("oh no")
---
(module
(match_statement
(identifier)
(case_clause
(case_pattern

(module
(match_statement
(identifier)
(block
(case_clause
(case_pattern
(class_pattern
(dotted_name
(identifier))))
(block
(expression_statement
(call
(identifier)
(argument_list)))
(block
(expression_statement
(call
(identifier)
(argument_list
(string))))))))
(argument_list
(string
(string_start)
(string_content)
(string_end))))))))))
2 changes: 1 addition & 1 deletion lang/semgrep-grammars/src/tree-sitter-python
Submodule tree-sitter-python updated 63 files
+46 −0 .editorconfig
+37 −2 .gitattributes
+59 −0 .github/ISSUE_TEMPLATE/bug_report.yml
+1 −0 .github/ISSUE_TEMPLATE/config.yml
+36 −0 .github/ISSUE_TEMPLATE/feature_request.yml
+54 −22 .github/workflows/ci.yml
+19 −0 .github/workflows/fuzz.yml
+26 −0 .github/workflows/lint.yml
+35 −0 .github/workflows/publish.yml
+39 −6 .gitignore
+0 −6 .npmignore
+60 −0 CMakeLists.txt
+96 −0 Cargo.lock
+15 −16 Cargo.toml
+94 −0 Makefile
+16 −0 Package.resolved
+38 −0 Package.swift
+17 −6 README.md
+18 −7 binding.gyp
+16 −0 bindings/c/tree-sitter-python.h
+10 −0 bindings/c/tree-sitter-python.pc.in
+13 −0 bindings/go/binding.go
+15 −0 bindings/go/binding_test.go
+14 −22 bindings/node/binding.cc
+9 −0 bindings/node/binding_test.js
+28 −0 bindings/node/index.d.ts
+7 −15 bindings/node/index.js
+11 −0 bindings/python/tests/test_binding.py
+34 −0 bindings/python/tree_sitter_python/__init__.py
+6 −0 bindings/python/tree_sitter_python/__init__.pyi
+27 −0 bindings/python/tree_sitter_python/binding.c
+0 −0 bindings/python/tree_sitter_python/py.typed
+0 −36 bindings/rust/README.md
+12 −18 bindings/rust/build.rs
+21 −33 bindings/rust/lib.rs
+16 −0 bindings/swift/TreeSitterPython/python.h
+12 −0 bindings/swift/TreeSitterPythonTests/TreeSitterPythonTests.swift
+5 −0 eslint.config.mjs
+7 −0 go.mod
+34 −0 go.sum
+409 −207 grammar.js
+1,486 −0 package-lock.json
+47 −20 package.json
+33 −0 pyproject.toml
+20 −9 queries/highlights.scm
+2 −0 queries/tags.scm
+0 −36 script/parse-examples
+62 −0 setup.py
+1,438 −341 src/grammar.json
+812 −70 src/node-types.json
+96,105 −65,757 src/parser.c
+436 −0 src/scanner.c
+0 −408 src/scanner.cc
+54 −0 src/tree_sitter/alloc.h
+291 −0 src/tree_sitter/array.h
+55 −13 src/tree_sitter/parser.h
+6 −2 test/corpus/errors.txt
+243 −16 test/corpus/expressions.txt
+347 −81 test/corpus/literals.txt
+1,236 −232 test/corpus/pattern_matching.txt
+388 −38 test/corpus/statements.txt
+15 −0 test/tags/main.py
+42 −0 tree-sitter.json

0 comments on commit 0610ec8

Please sign in to comment.