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?
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.
(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.cfor this, though, and it would also have knock on effects downstream (although these would be small and manageable).Would such a change be welcome?