From 49c556723aa528ef1773754e1a0e83b748c2d338 Mon Sep 17 00:00:00 2001 From: Tanner Bennett Date: Mon, 26 Apr 2021 14:20:37 -0500 Subject: [PATCH] Update php.cson to detect SQL CTEs SQL "common table expressions" (CTE) begin with the `WITH` keyword. More info: https://docs.microsoft.com/en-us/sql/t-sql/queries/with-common-table-expression-transact-sql?view=sql-server-ver15#examples --- grammars/php.cson | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grammars/php.cson b/grammars/php.cson index 1d711d3..9c87ffb 100644 --- a/grammars/php.cson +++ b/grammars/php.cson @@ -2697,7 +2697,7 @@ 'match': '\\\\(?:\\\\(?:\\\\[\\\\\']?|[^\'])|.)' 'name': 'constant.character.escape.php' 'sql-string-double-quoted': - 'begin': '"\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER|AND)\\b)' + 'begin': '"\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER|AND|WITH)\\b)' 'beginCaptures': '0': 'name': 'punctuation.definition.string.begin.php' @@ -2766,7 +2766,7 @@ } ] 'sql-string-single-quoted': - 'begin': '\'\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER|AND)\\b)' + 'begin': '\'\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER|AND|WITH)\\b)' 'beginCaptures': '0': 'name': 'punctuation.definition.string.begin.php'