Skip to content

Why the behavior is different from python binding? #174

@880019

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.
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions