Skip to content

Additions to query grammar necessary to properly support jsx fragments #1478

Closed
@pokey

Description

@pokey

Desired syntax

(
  (jsx_fragment) @xmlElement @_.inside @_.iterationScope
  (#child-range! @_.inside 1 -2 false false)
  (#child-range! @_.iterationScope 1 -2 false false)
)

(
  (jsx_fragment) @xmlStartTag @xmlTags @_.domain
  (#child-range! @xmlStartTag 0 2)
  (#child-range! @xmlTags 0 2)
  (#allow-multiple! @xmlTags)
)

(
  (jsx_fragment) @xmlEndTag @xmlTags @_.domain
  (#child-range! @xmlEndTag -3)
  (#child-range! @xmlTags -3)
  (#allow-multiple! @xmlTags)
)

(
  (jsx_fragment
    "<" @name @_.domain.start
    ">" @_.domain.end
  )
  (#end! @name)
  (#make-range! @_.domain @_.domain.start @_.domain.end)
)

Required features

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions