diff --git a/.gitignore b/.gitignore index e69de29b..723ef36f 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +.idea \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b81..00000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/go-tree-sitter.iml b/.idea/go-tree-sitter.iml deleted file mode 100644 index 5e764c4f..00000000 --- a/.idea/go-tree-sitter.iml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 12e6436c..00000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1ddf..00000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/bindings.go b/bindings.go index fa4985f5..7fe9d690 100644 --- a/bindings.go +++ b/bindings.go @@ -801,6 +801,7 @@ func NewQuery(pattern []byte, lang *Language) (*Query, error) { q := &Query{c: c} + // Copied from: https://github.com/klothoplatform/go-tree-sitter/commit/e351b20167b26d515627a4a1a884528ede5fef79 // this is just used for syntax validation - it does not actually filter anything for i := uint32(0); i < q.PatternCount(); i++ { predicates := q.PredicatesForPattern(i) @@ -1062,6 +1063,8 @@ func (qc *QueryCursor) NextCapture() (*QueryMatch, uint32, bool) { return qm, uint32(captureIndex), true } +// Copied From: https://github.com/klothoplatform/go-tree-sitter/commit/e351b20167b26d515627a4a1a884528ede5fef79 + func splitPredicates(steps []QueryPredicateStep) [][]QueryPredicateStep { var predicateSteps [][]QueryPredicateStep var currentSteps []QueryPredicateStep