├── .gitignore ├── .vscode └── launch.json ├── .vscodeignore ├── README.md ├── example.sql ├── icon.png ├── language-configuration.json ├── package.json └── syntaxes └── MySQL.tmLanguage /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .vsix 3 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | { 3 | "version": "0.1.0", 4 | "configurations": [ 5 | { 6 | "name": "Launch Extension", 7 | "type": "extensionHost", 8 | "request": "launch", 9 | "runtimeExecutable": "${execPath}", 10 | "args": ["--extensionDevelopmentPath=${workspaceRoot}" ] 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | .gitignore 4 | vsc-extension-quickstart.md 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MySQL Syntax 2 | 3 | This extension adds specific language syntax for MySQL. It's a port of the Sublime plugin [adael/sublimetext-mysql-syntax](https://github.com/adael/sublimetext-mysql-syntax). 4 | 5 | ## Having trouble? 6 | 7 | If something doesn't look right, please let me know on twitter [@jakebathman](https://twitter.com/jakebathman) or [submit an issue](https://github.com/jakebathman/mysql-syntax) 8 | 9 | ## Link to the store 10 | 11 | https://marketplace.visualstudio.com/items?itemName=jakebathman.mysql-syntax 12 | -------------------------------------------------------------------------------- /example.sql: -------------------------------------------------------------------------------- 1 | -- Single-line comment 2 | # Single-line comment 3 | 4 | /* 5 | Multi-line 6 | comment 7 | */ 8 | 9 | SELECT A.foo FROM TableOne AS A 10 | WHERE A.bar = "baz" OR A.baz = 42 11 | 12 | SELECT A.foo as bar, A.baz as "foo" FROM B.TableOne A 13 | 14 | SELECT A.foo as bar, A.baz, A.bang as "foo" FROM B.TableOne A 15 | SELECT A.foo as bar, A.bang as "foo" FROM B.TableOne A 16 | SELECT A.foo as f, A.baz, A.bang as "foo" FROM B.TableOne A 17 | SELECT A.`foo` as bar, A.baz, A.bang as "foo" FROM B.TableOne A 18 | 19 | 20 | -- Issue #7 21 | "foo \"bar\" baz" 22 | "foo \'bar\' baz" 23 | 'foo \"bar\" baz' 24 | 'foo \'bar\' baz' 25 | "foo bar baz" 26 | 'foo bar baz' 27 | 28 | "Multi-line strings 29 | are supported" 30 | 'Multi-line strings 31 | are supported' 32 | 33 | SET @variable = 1; 34 | SET @$_ = 2; 35 | SET @"quoted-variable" = 3; 36 | SET @'quoted-variable' = 3; 37 | SET @`quoted-variable` = 3; 38 | 39 | SELECT 1 && 1; 40 | SELECT 1 OR NULL; 41 | SELECT 5 & 2*3; 42 | SELECT 2 BETWEEN 1 AND 3; 43 | 44 | SELECT COUNT(*) AS cpt, MAX(t.pos) AS max_pos 45 | FROM `my_table` 46 | LEFT JOIN `other_table` AS t 47 | WHERE `somecol` IS NOT NULL 48 | ORDER BY t.other_col DESC; 49 | 50 | 51 | -- Issue #3 52 | if isnull(blahblah) = 1 then 53 | else 54 | end if 55 | 56 | -- Issue #4 57 | select somefield into somevariable from sometable where condition = 0; 58 | 59 | -- Issue #5 60 | prepare variable from 'call string(?)'; 61 | deallocate prepare variable; 62 | 63 | -- Issue #6 64 | execute processToExecute using variable1, variable2; 65 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebathman/mysql-syntax/bf4c8cc20535b16cccf2888d3f07cf60f116c140/icon.png -------------------------------------------------------------------------------- /language-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": { 3 | // symbol used for single line comment. Remove this entry if your language does not support line comments 4 | "lineComment": ["//", "#"], 5 | // symbols used for start and end a block comment. Remove this entry if your language does not support block comments 6 | "blockComment": [ "/*", "*/" ] 7 | }, 8 | // symbols used as brackets 9 | "brackets": [ 10 | ["{", "}"], 11 | ["[", "]"], 12 | ["(", ")"] 13 | ], 14 | // symbols that are auto closed when typing 15 | "autoClosingPairs": [ 16 | ["{", "}"], 17 | ["[", "]"], 18 | ["(", ")"], 19 | ["\"", "\""], 20 | ["'", "'"], 21 | ["`", "`"] 22 | ], 23 | // symbols that that can be used to surround a selection 24 | "surroundingPairs": [ 25 | ["{", "}"], 26 | ["[", "]"], 27 | ["(", ")"], 28 | ["\"", "\""], 29 | ["'", "'"], 30 | ["`", "`"] 31 | ] 32 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mysql-syntax", 3 | "displayName": "MySQL Syntax", 4 | "description": "MySQL syntax highlighting support", 5 | "version": "1.3.1", 6 | "publisher": "jakebathman", 7 | "engines": { 8 | "vscode": "^1.18.0" 9 | }, 10 | "categories": [ 11 | "Languages" 12 | ], 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/jakebathman/mysql-syntax" 16 | }, 17 | "keywords": [ 18 | "syntax", 19 | "mysql" 20 | ], 21 | "icon": "icon.png", 22 | "contributes": { 23 | "languages": [{ 24 | "id": "sql", 25 | "aliases": ["MySQL", "sql"], 26 | "extensions": [".sql",".ddl",".dml"], 27 | "configuration": "./language-configuration.json" 28 | }], 29 | "grammars": [{ 30 | "language": "sql", 31 | "scopeName": "source.sql", 32 | "path": "./syntaxes/MySQL.tmLanguage" 33 | }] 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /syntaxes/MySQL.tmLanguage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | fileTypes 6 | 7 | sql 8 | ddl 9 | dml 10 | 11 | foldingStartMarker 12 | \s*\(\s*$ 13 | foldingStopMarker 14 | ^\s*\) 15 | keyEquivalent 16 | ^~S 17 | name 18 | MySQL 19 | patterns 20 | 21 | 22 | include 23 | #comments 24 | 25 | 26 | captures 27 | 28 | 1 29 | 30 | name 31 | keyword.other.create.sql 32 | 33 | 2 34 | 35 | name 36 | keyword.other.sql 37 | 38 | 5 39 | 40 | name 41 | entity.name.function.sql 42 | 43 | 44 | match 45 | (?i:^\s*(create(\s+temporary)?)\s+(aggregate|conversion|database|domain|function|procedure|group|(unique\s+)?index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\s+)(['"`]?)(\w+)\5 46 | name 47 | meta.create.sql 48 | 49 | 50 | captures 51 | 52 | 1 53 | 54 | name 55 | keyword.other.create.sql 56 | 57 | 2 58 | 59 | name 60 | keyword.other.sql 61 | 62 | 63 | match 64 | (?i:^\s*(drop(\s+temporary)?)\s+(aggregate|conversion|database|domain|function|procedure|group|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)) 65 | name 66 | meta.drop.sql 67 | 68 | 69 | captures 70 | 71 | 1 72 | 73 | name 74 | keyword.other.create.sql 75 | 76 | 2 77 | 78 | name 79 | keyword.other.sql 80 | 81 | 82 | match 83 | (?i:^\s*(truncate(\s+table)?)) 84 | name 85 | meta.truncate.sql 86 | 87 | 88 | captures 89 | 90 | 1 91 | 92 | name 93 | keyword.other.create.sql 94 | 95 | 2 96 | 97 | name 98 | keyword.other.table.sql 99 | 100 | 3 101 | 102 | name 103 | entity.name.function.sql 104 | 105 | 4 106 | 107 | name 108 | keyword.other.cascade.sql 109 | 110 | 111 | match 112 | (?i:\s*(drop)\s+(table)\s+(\w+)(\s+cascade)?\b) 113 | name 114 | meta.drop.sql 115 | 116 | 117 | captures 118 | 119 | 1 120 | 121 | name 122 | keyword.other.create.sql 123 | 124 | 2 125 | 126 | name 127 | keyword.other.table.sql 128 | 129 | 130 | match 131 | (?i:^\s*(alter)\s+(aggregate|conversion|database|domain|function|procedure|group|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\s+) 132 | name 133 | meta.alter.sql 134 | 135 | 136 | captures 137 | 138 | 1 139 | 140 | name 141 | storage.type.sql 142 | 143 | 10 144 | 145 | name 146 | constant.numeric.sql 147 | 148 | 11 149 | 150 | name 151 | storage.type.sql 152 | 153 | 12 154 | 155 | name 156 | storage.type.sql 157 | 158 | 13 159 | 160 | name 161 | storage.type.sql 162 | 163 | 14 164 | 165 | name 166 | constant.numeric.sql 167 | 168 | 15 169 | 170 | name 171 | storage.type.sql 172 | 173 | 2 174 | 175 | name 176 | storage.type.sql 177 | 178 | 3 179 | 180 | name 181 | constant.numeric.sql 182 | 183 | 4 184 | 185 | name 186 | storage.type.sql 187 | 188 | 5 189 | 190 | name 191 | constant.numeric.sql 192 | 193 | 6 194 | 195 | name 196 | storage.type.sql 197 | 198 | 7 199 | 200 | name 201 | constant.numeric.sql 202 | 203 | 8 204 | 205 | name 206 | constant.numeric.sql 207 | 208 | 9 209 | 210 | name 211 | storage.type.sql 212 | 213 | 214 | match 215 | (?xi) 216 | 217 | # normal stuff, capture 1 218 | \b(bigint|bigserial|bit|boolean|box|bytea|cidr|circle|date|double\sprecision|inet|int|integer|line|lseg|macaddr|money|oid|path|point|polygon|real|serial|smallint|sysdate|text)\b 219 | 220 | # numeric suffix, capture 2 + 3i 221 | |\b(bit\svarying|character\s(?:varying)?|tinyint|var\schar|float|interval)\((\d+)\) 222 | 223 | # optional numeric suffix, capture 4 + 5i 224 | |\b(char|number|varchar\d?)\b(?:\((\d+)\))? 225 | 226 | # special case, capture 6 + 7i + 8i 227 | |\b(numeric)\b(?:\((\d+),(\d+)\))? 228 | 229 | # special case, captures 9, 10i, 11 230 | |\b(times)(?:\((\d+)\))(\swithoutstimeszone\b)? 231 | 232 | # special case, captures 12, 13, 14i, 15 233 | |\b(timestamp)(?:(s)\((\d+)\)(\swithoutstimeszone\b)?)? 234 | 235 | 236 | 237 | 238 | match 239 | (?i:\b((?:primary|foreign)\s+key|references|on\sdelete(\s+cascade)?|check|constraint)\b) 240 | name 241 | storage.modifier.sql 242 | 243 | 244 | match 245 | \b\d+\b 246 | name 247 | constant.numeric.sql 248 | 249 | 250 | 251 | captures 252 | 253 | 1 254 | 255 | name 256 | keyword.other.sql 257 | 258 | 2 259 | 260 | name 261 | variable.other.member 262 | 263 | 3 264 | 265 | name 266 | keyword.other.DML.sql 267 | 268 | 4 269 | 270 | name 271 | variable.other.member 272 | 273 | 274 | match 275 | (?i:^\s*(select)\s+(.*)\s+(into)\s+((?:\w+)(?:\,\s+)?)+) 276 | name 277 | meta.create.sql 278 | 279 | 280 | 281 | captures 282 | 283 | 1 284 | 285 | name 286 | keyword.other.DML.sql 287 | 288 | 2 289 | 290 | name 291 | variable.other.member 292 | 293 | 294 | match 295 | (?i:^\b((?:deallocate\s+)?prepare)\s+(.+?)\b) 296 | name 297 | meta.prepare.sql 298 | 299 | 300 | 301 | captures 302 | 303 | 1 304 | 305 | name 306 | keyword.other.DML.sql 307 | 308 | 2 309 | 310 | name 311 | variable.other.member 312 | 313 | 3 314 | 315 | name 316 | keyword.other.DML.sql 317 | 318 | 319 | match 320 | (?i:^\b(execute)\s+(.+?)\b(?:\s+(using)?)?) 321 | name 322 | meta.prepare.sql 323 | 324 | 325 | 326 | captures 327 | 328 | 1 329 | 330 | name 331 | keyword.other.DML.sql 332 | 333 | 2 334 | 335 | name 336 | constant.other.database-name.sql 337 | 338 | 3 339 | 340 | name 341 | constant.other.table-name.sql 342 | 343 | 4 344 | 345 | name 346 | keyword.other.alias.sql 347 | 348 | 5 349 | 350 | name 351 | constant.other.database-name.sql 352 | 353 | 354 | match 355 | (?i)\b(FROM)\s+(?:(\w+)\.)?(\w+)\b(?:\s+(AS))?(?:\s+(?!where)(\w+))? 356 | name 357 | meta.select.sql 358 | 359 | 360 | 361 | captures 362 | 363 | 1 364 | 365 | name 366 | constant.other.database-name.sql 367 | 368 | 2 369 | 370 | name 371 | constant.other.table-name.sql 372 | 373 | 3 374 | 375 | name 376 | keyword.other.alias.sql 377 | 378 | 379 | match 380 | (?i)(\w+\.)?(\S+?)\s+(AS)\s+([\w'"`]+) 381 | 382 | 383 | match 384 | (?i:\b(select(\s+distinct)?|insert\s+(ignore\s+)?into|update|delete|from|set|where|group\sby|or|like|and|union(\s+all)?|having|order\sby|limit|(inner|cross)\s+join|straight_join|(left|right)(\s+outer)?\s+join|natural(\s+(left|right)(\s+outer)?)?\s+join)\b) 385 | name 386 | keyword.other.DML.sql 387 | 388 | 389 | match 390 | (?i:\b(on|((is\s+)?not\s+)?null)\b) 391 | name 392 | keyword.other.DDL.create.II.sql 393 | 394 | 395 | match 396 | (?i:\bvalues\b) 397 | name 398 | keyword.other.DML.II.sql 399 | 400 | 401 | match 402 | (?i:\b(begin(\s+work)?|start\s+transaction|commit(\s+work)?|rollback(\s+work)?)\b) 403 | name 404 | keyword.other.LUW.sql 405 | 406 | 407 | match 408 | (?i:\b(grant(\swith\sgrant\soption)?|revoke)\b) 409 | name 410 | keyword.other.authorization.sql 411 | 412 | 413 | match 414 | (?i:\bin\b) 415 | name 416 | keyword.other.data-integrity.sql 417 | 418 | 419 | match 420 | (?i:^\s*(comment\s+on\s+(table|column|aggregate|constraint|database|domain|function|procedure|index|operator|rule|schema|sequence|trigger|type|view))\s+.*?\s+(is)\s+) 421 | name 422 | keyword.other.object-comments.sql 423 | 424 | 425 | match 426 | (?i:^\s*(add\s+(column|index|key|constraint|unique|fulltext|spatial))) 427 | name 428 | keyword.other.alter-add.sql 429 | 430 | 431 | match 432 | (?i)\b(DESC|ASC)\b 433 | name 434 | keyword.other.order.sql 435 | 436 | 437 | match 438 | \* 439 | name 440 | keyword.operator.star.sql 441 | 442 | 443 | match 444 | [!<>]?=|<>|<|>|NOT IN|\bIN\b|BETWEEN|!=|<=>|<=|=>|<|> 445 | name 446 | keyword.operator.comparison.sql 447 | 448 | 449 | match 450 | -|\+|/ 451 | name 452 | keyword.operator.math.sql 453 | 454 | 455 | match 456 | \|\| 457 | name 458 | keyword.operator.concatenator.sql 459 | 460 | 461 | comment 462 | All functions and operators in MySQL 5.7 463 | match 464 | (?i)\b(abs|acos|adddate|addtime|aes_decrypt|aes_encrypt|any_value|area|asbinary|ascii|asin|astext|asymmetric_decrypt|asymmetric_derive|asymmetric_encrypt|asymmetric_sign|asymmetric_verify|atan|atan2|avg|benchmark|bin|bit_and|bit_count|bit_length|bit_or|bit_xor|buffer|cast|ceil|ceiling|centroid|char|char_length|character_length|charset|coalesce|coercibility|collation|compress|concat|concat_ws|connection_id|contains|conv|convert|convert_tz|convexhull|cos|cot|count|crc32|create_asymmetric_priv_key|create_asymmetric_pub_key|create_dh_parameters|create_digest|crosses|curdate|current_date|current_time|current_timestamp|current_user|curtime|database|date|date_add|date_format|date_sub|datediff|day|dayname|dayofmonth|dayofweek|dayofyear|decode|default|degrees|des_decrypt|des_encrypt|dimension|disjoint|distance|elt|encode|encrypt|endpoint|envelope|equals|exp|export_set|exteriorring|extract|extractvalue|field|find_in_set|floor|format|found_rows|from_base64|from_days|from_unixtime|geomcollfromtext|geomcollfromwkb|geometrycollection|geometryn|geometrytype|geomfromtext|geomfromwkb|get_format|get_lock|glength|greatest|group_concat|gtid_subset|gtid_subtract|hex|hour|ifnull|in|inet_aton|inet_ntoa|inet6_aton|inet6_ntoa|insert|instr|interiorringn|intersects|interval|is_free_lock|is_ipv4|is_ipv4_compat|is_ipv4_mapped|is_ipv6|is_used_lock|isclosed|isempty|isnull|issimple|json_append|json_array|json_array_append|json_array_insert|json_contains|json_contains_path|json_depth|json_extract|json_insert|json_keys|json_length|json_merge|json_merge_preserve|json_object|json_quote|json_remove|json_replace|json_search|json_set|json_type|json_unquote|json_valid|last_insert_id|lcase|least|left|length|linefromtext|linefromwkb|linestring|ln|load_file|localtime|locate|log|log10|log2|lower|lpad|ltrim|make_set|makedate|maketime|master_pos_wait|max|mbrcontains|mbrcoveredby|mbrcovers|mbrdisjoint|mbrequal|mbrequals|mbrintersects|mbroverlaps|mbrtouches|mbrwithin|md5|microsecond|mid|min|minute|mlinefromtext|mlinefromwkb|mod|month|monthname|mpointfromtext|mpointfromwkb|mpolyfromtext|mpolyfromwkb|multilinestring|multipoint|multipolygon|name_const|now|nullif|numgeometries|numinteriorrings|numpoints|oct|octet_length|old_password|ord|overlaps|password|period_add|period_diff|pi|point|pointfromtext|pointfromwkb|pointn|polyfromtext|polyfromwkb|polygon|position|pow|power|quarter|quote|radians|rand|random_bytes|release_all_locks|release_lock|repeat|replace|reverse|right|round|row_count|rpad|rtrim|schema|sec_to_time|second|session_user|sha1|sha2|sign|sin|sleep|soundex|space|sqrt|srid|st_area|st_asbinary|st_asgeojson|st_astext|st_buffer|st_buffer_strategy|st_centroid|st_contains|st_convexhull|st_crosses|st_difference|st_dimension|st_disjoint|st_distance|st_distance_sphere|st_endpoint|st_envelope|st_equals|st_exteriorring|st_geohash|st_geomcollfromtext|st_geomcollfromwkb|st_geometryn|st_geometrytype|st_geomfromgeojson|st_geomfromtext|st_geomfromwkb|st_interiorringn|st_intersection|st_intersects|st_isclosed|st_isempty|st_issimple|st_isvalid|st_latfromgeohash|st_length|st_linefromtext|st_linefromwkb|st_longfromgeohash|st_makeenvelope|st_mlinefromtext|st_mlinefromwkb|st_mpointfromtext|st_mpointfromwkb|st_mpolyfromtext|st_mpolyfromwkb|st_numgeometries|st_numinteriorring|st_numpoints|st_overlaps|st_pointfromgeohash|st_pointfromtext|st_pointfromwkb|st_pointn|st_polyfromtext|st_polyfromwkb|st_simplify|st_srid|st_startpoint|st_symdifference|st_touches|st_union|st_validate|st_within|st_x|st_y|startpoint|std|stddev|stddev_pop|stddev_samp|str_to_date|strcmp|subdate|substr|substring|substring_index|subtime|sum|sysdate|system_user|tan|time|time_format|time_to_sec|timediff|timestamp|timestampadd|timestampdiff|to_base64|to_days|to_seconds|touches|trim|truncate|ucase|uncompress|uncompressed_length|unhex|unix_timestamp|updatexml|upper|user|utc_date|utc_time|utc_timestamp|uuid|uuid_short|validate_password_strength|values|var_pop|var_samp|variance|version|wait_for_executed_gtid_set|wait_until_sql_thread_after_gtids|week|weekday|weekofyear|weight_string|within|x|y|year|yearweek|-|\*|xor|=|\:=|between|and|binary|&|~|\||\^|case|div|<=>|>|>=|is|is not|is not null|is null|->|->>|last_day|<<|<|<=|like|localtimestamp|match|%|mod|not|!|!=|<>|not in|not like|not regexp|\|\||or|\+|regexp|>>|rlike|sounds like)\b 465 | name 466 | support.function.sql 467 | 468 | 469 | comment 470 | List of SQL99 built-in functions from http://www.oreilly.com/catalog/sqlnut/chapter/ch04.html 471 | match 472 | (?i)\b(CURRENT_(DATE|TIME(STAMP)?|USER)|(SESSION|SYSTEM)_USER)\b 473 | name 474 | support.function.scalar.sql 475 | 476 | 477 | comment 478 | List of SQL99 built-in functions from http://www.oreilly.com/catalog/sqlnut/chapter/ch04.html 479 | match 480 | (?i)\b(AVG|COUNT|MIN|MAX|SUM)(?=\s*\() 481 | name 482 | support.function.aggregate.sql 483 | 484 | 485 | match 486 | (?i)\b(DELIMITER|CONCATENATE|CONVERT|LOWER|SUBSTRING|TRANSLATE|TRIM|UPPER)\b 487 | name 488 | support.function.string.sql 489 | 490 | 491 | captures 492 | 493 | 1 494 | 495 | name 496 | constant.other.database-name.sql 497 | 498 | 2 499 | 500 | name 501 | constant.other.table-name.sql 502 | 503 | 504 | match 505 | \b(\w+?)\.(\w+)\b 506 | 507 | 508 | 509 | 510 | match 511 | (?i:(@[^\s]+)) 512 | name 513 | variable.other.sql 514 | 515 | 516 | 517 | match 518 | (?i:\b(unsigned|auto_increment|cursor)\b) 519 | name 520 | storage.type.sql 521 | 522 | 523 | 524 | match 525 | (?i:\b(call|end(?! if)|for each row|declare)\b) 526 | name 527 | keyword.other.LUW.sql 528 | 529 | 530 | 531 | captures 532 | 533 | 1 534 | 535 | name 536 | keyword.control.sql 537 | 538 | 539 | match 540 | (?i:\b(if|then|elseif|else|end if)\b) 541 | 542 | 543 | include 544 | #strings 545 | 546 | 547 | include 548 | #regexps 549 | 550 | 551 | repository 552 | 553 | comments 554 | 555 | patterns 556 | 557 | 558 | captures 559 | 560 | 1 561 | 562 | name 563 | punctuation.definition.comment.sql 564 | 565 | 566 | match 567 | (--).*$\n? 568 | name 569 | comment.line.double-dash.sql 570 | 571 | 572 | captures 573 | 574 | 1 575 | 576 | name 577 | punctuation.definition.comment.sql 578 | 579 | 580 | match 581 | (#).*$\n? 582 | name 583 | comment.line.number-sign.sql 584 | 585 | 586 | begin 587 | /\* 588 | captures 589 | 590 | 0 591 | 592 | name 593 | punctuation.definition.comment.sql 594 | 595 | 596 | end 597 | \*/ 598 | name 599 | comment 600 | 601 | 602 | 603 | regexps 604 | 605 | patterns 606 | 607 | 608 | begin 609 | /(?=\S.*/) 610 | beginCaptures 611 | 612 | 0 613 | 614 | name 615 | punctuation.definition.string.begin.sql 616 | 617 | 618 | end 619 | / 620 | endCaptures 621 | 622 | 0 623 | 624 | name 625 | punctuation.definition.string.end.sql 626 | 627 | 628 | name 629 | string.regexp.sql 630 | patterns 631 | 632 | 633 | include 634 | #string_interpolation 635 | 636 | 637 | match 638 | \\/ 639 | name 640 | constant.character.escape.slash.sql 641 | 642 | 643 | 644 | 645 | begin 646 | %r\{ 647 | beginCaptures 648 | 649 | 0 650 | 651 | name 652 | punctuation.definition.string.begin.sql 653 | 654 | 655 | comment 656 | We should probably handle nested bracket pairs!?! -- Allan 657 | end 658 | \} 659 | endCaptures 660 | 661 | 0 662 | 663 | name 664 | punctuation.definition.string.end.sql 665 | 666 | 667 | name 668 | string.regexp.modr.sql 669 | patterns 670 | 671 | 672 | include 673 | #string_interpolation 674 | 675 | 676 | 677 | 678 | 679 | string_escape 680 | 681 | match 682 | \\. 683 | name 684 | constant.character.escape.sql 685 | 686 | string_interpolation 687 | 688 | captures 689 | 690 | 1 691 | 692 | name 693 | punctuation.definition.string.end.sql 694 | 695 | 696 | match 697 | (#\{)([^\}]*)(\}) 698 | name 699 | string.interpolated.sql 700 | 701 | strings 702 | 703 | patterns 704 | 705 | 706 | captures 707 | 708 | 1 709 | 710 | name 711 | punctuation.definition.string.begin.sql 712 | 713 | 3 714 | 715 | name 716 | punctuation.definition.string.end.sql 717 | 718 | 719 | comment 720 | this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines. 721 | match 722 | (')[^'\\]*(') 723 | name 724 | string.quoted.single.sql 725 | 726 | 727 | begin 728 | ' 729 | beginCaptures 730 | 731 | 0 732 | 733 | name 734 | punctuation.definition.string.begin.sql 735 | 736 | 737 | end 738 | ' 739 | endCaptures 740 | 741 | 0 742 | 743 | name 744 | punctuation.definition.string.end.sql 745 | 746 | 747 | name 748 | string.quoted.single.sql 749 | patterns 750 | 751 | 752 | include 753 | #string_escape 754 | 755 | 756 | 757 | 758 | captures 759 | 760 | 1 761 | 762 | name 763 | punctuation.definition.string.begin.sql 764 | 765 | 3 766 | 767 | name 768 | punctuation.definition.string.end.sql 769 | 770 | 771 | comment 772 | this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines. 773 | match 774 | (`)[^`\\]*(`) 775 | name 776 | string.quoted.other.backtick.sql 777 | 778 | 779 | begin 780 | ` 781 | beginCaptures 782 | 783 | 0 784 | 785 | name 786 | punctuation.definition.string.begin.sql 787 | 788 | 789 | end 790 | ` 791 | endCaptures 792 | 793 | 0 794 | 795 | name 796 | punctuation.definition.string.end.sql 797 | 798 | 799 | name 800 | string.quoted.other.backtick.sql 801 | patterns 802 | 803 | 804 | include 805 | #string_escape 806 | 807 | 808 | 809 | 810 | captures 811 | 812 | 1 813 | 814 | name 815 | punctuation.definition.string.begin.sql 816 | 817 | 3 818 | 819 | name 820 | punctuation.definition.string.end.sql 821 | 822 | 823 | comment 824 | this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines. 825 | match 826 | (")(?:[^"#]|\"|\')*(") 827 | name 828 | string.quoted.double.sql 829 | 830 | 831 | begin 832 | " 833 | beginCaptures 834 | 835 | 0 836 | 837 | name 838 | punctuation.definition.string.begin.sql 839 | 840 | 841 | end 842 | " 843 | endCaptures 844 | 845 | 0 846 | 847 | name 848 | punctuation.definition.string.end.sql 849 | 850 | 851 | name 852 | string.quoted.double.sql 853 | patterns 854 | 855 | 856 | include 857 | #string_interpolation 858 | 859 | 860 | 861 | 862 | begin 863 | %\{ 864 | beginCaptures 865 | 866 | 0 867 | 868 | name 869 | punctuation.definition.string.begin.sql 870 | 871 | 872 | end 873 | \} 874 | endCaptures 875 | 876 | 0 877 | 878 | name 879 | punctuation.definition.string.end.sql 880 | 881 | 882 | name 883 | string.other.quoted.brackets.sql 884 | patterns 885 | 886 | 887 | include 888 | #string_interpolation 889 | 890 | 891 | 892 | 893 | 894 | 895 | scopeName 896 | source.sql 897 | uuid 898 | A41BE23A-7EF9-11E5-857F-40167E632F0F 899 | 900 | --------------------------------------------------------------------------------