Skip to content

Support importing query files from other query files #1483

Closed
@pokey

Description

@pokey

The problem

  • We'd like to support using the same patterns across multiple languages like we do with our node matchers today, eg
    • xml / html,
    • typescript / javascript / typescriptreact / javascriptreact,
    • c / cpp, etc
  • For some languages, forcing them to live in a single query file could get unwieldy. Eg we might want one file just devoted to Typescript's namedFunction

The solution

  • Support a convention where we use a special syntax within comments to do imports
  • Would look like the following:
    ;; import javascript.scm

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