Skip to content

Feature request: Expose tag from dollar quoted strings #281

Description

@dbaynard

I use this grammar with neovim and I would like to take advantage of the language injection functionality. One elegant way to do this is to parse the language indicated in a dollar quoted string tag.

select $${"some":"json"}$$::jsonb;
select $json${"some":"json"}$json$::jsonb;

(It seems linguist, via https://github.com/textmate/sql.tmbundle, gets the highlighting here correct — I'm not sure how, though.)

At the moment, the whole text (including the tags) gets returned as a (literal). I would like to return an expression like (quoted_string tag: (literal) value: (literal)).

It looks like this requires a change to scanner.c for this, though, and it would also have knock on effects downstream (although these would be small and manageable).

Would such a change be welcome?

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions