diff --git a/syntaxes/lit-sql.json b/syntaxes/lit-sql.json index cc5128f..673fd2e 100644 --- a/syntaxes/lit-sql.json +++ b/syntaxes/lit-sql.json @@ -3,25 +3,28 @@ "injectionSelector": "L:source -comment -string", "patterns": [ { - "name": "taggedTemplates", + "name": "string.template.js", "contentName": "meta.embedded.block.sql", - "begin": "sql((`))", + "begin": "((sql)|(sql)((\\.)([_$[:alpha:]][_$[:alnum:]]*))?)(`)", "beginCaptures": { - "1": { - "name": "entity.name.function.tagged-template.js" - }, "2": { - "name": "string.js" + "name": "entity.name.function.tagged-template.js" }, "3": { + "name": "variable.other.object.js" + }, + "5": { + "name": "punctuation.accessor" + }, + "6": { + "name": "entity.name.function.tagged-template.js" + }, + "7": { "name": "punctuation.definition.string.template.begin.js" } }, "end": "(`)", "endCaptures": { - "0": { - "name": "string.js" - }, "1": { "name": "punctuation.definition.string.template.end.js" } diff --git a/test.js b/test.js index 77e30c5..5387f56 100755 --- a/test.js +++ b/test.js @@ -1 +1,2 @@ const query = sql`SELECT * FROM users`; +const query2 = sql.User`SELECT * FROM users`;