Skip to content

Why the behavior is different from python binding? #174

Description

@880019

there is alternation pattern:

([
(jsx_text) @i18n_issue
(jsx_attribute
  (property_identifier) @attr_name
  (#match? @attr_name "^(alt|placeholder|aria-label|title)$")
  (string) @i18n_issue
)
])

It works in python binding, but (jsx_text) @i18n_issue is ignored in Java binding.

my Java code is:

try (var query = new Query(JsLanguage, source);
     var cursor = new QueryCursor(query)) {
   var items = cursor.findCaptures(tree.getRootNode()).toList();
   // dump each item in items
   // it proves "(jsx_text) @i18n_issue" never be used.
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions