name: SQL fileTypes:

scopeName: source.sql repository:

string_interpolation: 
  name: string.interpolated.sql
  captures: 
    "1": 
      name: punctuation.definition.string.end.sql
  match: (#\{)([^\}]*)(\})
comments: 
  patterns: 
  - name: comment.line.double-dash.sql
    captures: 
      "1": 
        name: punctuation.definition.comment.sql
    match: (--).*$\n?
  - name: comment.line.number-sign.sql
    captures: 
      "1": 
        name: punctuation.definition.comment.sql
    match: (#).*$\n?
  - name: comment.block.c
    captures: 
      "0": 
        name: punctuation.definition.comment.sql
    begin: /\*
    end: \*/
string_escape: 
  name: constant.character.escape.sql
  match: \\.
strings: 
  patterns: 
  - name: string.quoted.single.sql
    captures: 
      "1": 
        name: punctuation.definition.string.begin.sql
      "3": 
        name: punctuation.definition.string.end.sql
    match: (')[^'\\]*(')
    comment: 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.
  - name: string.quoted.single.sql
    endCaptures: 
      "0": 
        name: punctuation.definition.string.end.sql
    begin: "'"
    beginCaptures: 
      "0": 
        name: punctuation.definition.string.begin.sql
    end: "'"
    patterns: 
    - include: "#string_escape"
  - name: string.quoted.other.backtick.sql
    captures: 
      "1": 
        name: punctuation.definition.string.begin.sql
      "3": 
        name: punctuation.definition.string.end.sql
    match: (`)[^`\\]*(`)
    comment: 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.
  - name: string.quoted.other.backtick.sql
    endCaptures: 
      "0": 
        name: punctuation.definition.string.end.sql
    begin: "`"
    beginCaptures: 
      "0": 
        name: punctuation.definition.string.begin.sql
    end: "`"
    patterns: 
    - include: "#string_escape"
  - name: string.quoted.double.sql
    captures: 
      "1": 
        name: punctuation.definition.string.begin.sql
      "3": 
        name: punctuation.definition.string.end.sql
    match: (")[^"#]*(")
    comment: 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.
  - name: string.quoted.double.sql
    endCaptures: 
      "0": 
        name: punctuation.definition.string.end.sql
    begin: "\""
    beginCaptures: 
      "0": 
        name: punctuation.definition.string.begin.sql
    end: "\""
    patterns: 
    - include: "#string_interpolation"
  - name: string.other.quoted.brackets.sql
    endCaptures: 
      "0": 
        name: punctuation.definition.string.end.sql
    begin: "%\\{"
    beginCaptures: 
      "0": 
        name: punctuation.definition.string.begin.sql
    end: \}
    patterns: 
    - include: "#string_interpolation"
regexps: 
  patterns: 
  - name: string.regexp.sql
    endCaptures: 
      "0": 
        name: punctuation.definition.string.end.sql
    begin: /(?=\S.*/)
    beginCaptures: 
      "0": 
        name: punctuation.definition.string.begin.sql
    end: /
    patterns: 
    - include: "#string_interpolation"
    - name: constant.character.escape.slash.sql
      match: \\/
  - name: string.regexp.modr.sql
    endCaptures: 
      "0": 
        name: punctuation.definition.string.end.sql
    begin: "%r\\{"
    beginCaptures: 
      "0": 
        name: punctuation.definition.string.begin.sql
    end: \}
    patterns: 
    - include: "#string_interpolation"
    comment: We should probably handle nested bracket pairs!?! -- Allan

uuid: C49120AC-6ECC-11D9-ACC8-000D93589AF6 foldingStartMarker: s*(s*$ patterns:

foldingStopMarker: ^s*) keyEquivalent: ^~S