From 282ba57263773ebc93e39ed3a029ee253852a9b7 Mon Sep 17 00:00:00 2001 From: Killian Widdis Date: Thu, 27 Oct 2016 11:10:31 -0700 Subject: [PATCH] pattern recognition for SQL heredoc --- grammars/shell-unix-bash.cson | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/grammars/shell-unix-bash.cson b/grammars/shell-unix-bash.cson index adf6fa7..6df33c6 100644 --- a/grammars/shell-unix-bash.cson +++ b/grammars/shell-unix-bash.cson @@ -577,6 +577,50 @@ } ] } + { + 'begin': '(<<)-("|\'|)(SQL)\\2' + 'beginCaptures': + '1': + 'name': 'keyword.operator.heredoc.shell' + '3': + 'name': 'keyword.control.heredoc-token.shell' + 'captures': + '0': + 'name': 'punctuation.definition.string.shell' + 'contentName': 'source.sql' + 'end': '^\\t*(SQL)\\b' + 'endCaptures': + '1': + 'name': 'keyword.control.heredoc-token.shell' + 'name': 'string.unquoted.heredoc.sql.shell' + 'patterns': [ + { + 'include': 'source.sql' + } + ] + } + { + 'begin': '(<<)("|\'|)(SQL)\\2' + 'beginCaptures': + '1': + 'name': 'keyword.operator.heredoc.shell' + '3': + 'name': 'keyword.control.heredoc-token.shell' + 'captures': + '0': + 'name': 'punctuation.definition.string.shell' + 'contentName': 'source.sql' + 'end': '^(SQL)\\b' + 'endCaptures': + '1': + 'name': 'keyword.control.heredoc-token.shell' + 'name': 'string.unquoted.heredoc.sql.shell' + 'patterns': [ + { + 'include': 'source.sql' + } + ] + } { 'begin': '(<<)-("|\'|)\\\\?(\\w+)\\2' 'beginCaptures':