<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
      <key>name</key>
      <string>leoToml</string>
      <key>scopeName</key>
      <string>source.leo.leoToml</string>
      <key>scope</key>
      <string>source.leo.leoToml</string>
    <key>fileTypes</key>
    <array>
      <string>toml</string>
    </array>
    <key>extension</key>
    <array>
      <string>toml</string>
    </array>
    <key>patterns</key>
    <array>
      <dict>
        <key>include</key>
        <string>#comments</string>
      </dict>
      <dict>
        <key>begin</key>
        <string>^\s*(\[\[\]\]|\[\[\..*\]\]|\[\[.*\.\]\]|\[\[.*\.\..*\]\]|\[\[.*[\[\]#].*\]\]|\[\[.*\]\].+\n)</string>
        <key>comment</key>
        <string>Table arrays have the same error conditions given for standard tables.
  See below.
  </string>
        <key>end</key>
        <string>(?=^\s*\[?\[.*\]\]?)</string>
        <key>name</key>
        <string>invalid.illegal.table-array.toml</string>
      </dict>
      <dict>
        <key>begin</key>
        <string>^\s*(\[\[)(.+)(\]\])\s*</string>
        <key>beginCaptures</key>
        <dict>
          <key>1</key>
          <dict>
            <key>name</key>
            <string>punctuation.definition.table-array.begin.toml</string>
          </dict>
          <key>2</key>
          <dict>
            <key>name</key>
            <string>entity.table-array.toml</string>
          </dict>
          <key>3</key>
          <dict>
            <key>name</key>
            <string>punctuation.definition.table-array.end.toml</string>
          </dict>
        </dict>
        <key>comment</key>
        <string>A named array of hash tables</string>
        <key>end</key>
        <string>(?=^\s*\[?\[.*\]\]?)</string>
        <key>name</key>
        <string>meta.tag.table-array.toml</string>
        <key>patterns</key>
        <array>
          <dict>
            <key>include</key>
            <string>#comments</string>
          </dict>
          <dict>
            <key>include</key>
            <string>#keys</string>
          </dict>
        </array>
      </dict>
      <dict>
        <key>begin</key>
        <string>^\s*(\[\]|\[\..*\]|\[.*\.\]|\[.*\.\..*\]|\[.*[\[\]#].*\]|\[.*\].+\n)</string>
        <key>comment</key>
        <string>Each table name segment must be non-empty, must not contain the characters
  '[', ']' or '#' and is delimited by a '.'.  Tables "appear in square
  brackets *on a line by themselves*"
  </string>
        <key>end</key>
        <string>(?=^\s*\[?\[.*\]\]?)</string>
        <key>name</key>
        <string>invalid.illegal.table.toml</string>
      </dict>
      <dict>
        <key>begin</key>
        <string>^\s*(\[)(.+)(\])\s*</string>
        <key>beginCaptures</key>
        <dict>
          <key>1</key>
          <dict>
            <key>name</key>
            <string>punctuation.definition.table.begin.toml</string>
          </dict>
          <key>2</key>
          <dict>
            <key>name</key>
            <string>entity.table.toml</string>
          </dict>
          <key>3</key>
          <dict>
            <key>name</key>
            <string>punctuation.definition.table.end.toml</string>
          </dict>
        </dict>
        <key>comment</key>
        <string>A named hash table</string>
        <key>end</key>
        <string>(?=^\s*\[?\[.*\]\]?)</string>
        <key>name</key>
        <string>meta.tag.table.toml</string>
        <key>patterns</key>
        <array>
          <dict>
            <key>include</key>
            <string>#comments</string>
          </dict>
          <dict>
            <key>include</key>
            <string>#keys</string>
          </dict>
        </array>
      </dict>
    </array>
    <key>repository</key>
    <dict>
      <key>comments</key>
      <dict>
        <key>patterns</key>
        <array>
          <dict>
            <key>captures</key>
            <dict>
              <key>1</key>
              <dict>
                <key>name</key>
                <string>punctuation.definition.comment.toml</string>
              </dict>
            </dict>
            <key>comment</key>
            <string>Comments - whole line or partial</string>
            <key>match</key>
            <string>((#).*$)</string>
            <key>name</key>
            <string>comment.line.number-sign.toml</string>
          </dict>
        </array>
      </dict>
      <key>dataTypes</key>
      <dict>
        <key>patterns</key>
        <array>
          <dict>
            <key>begin</key>
            <string>"""</string>
            <key>beginCaptures</key>
            <dict>
              <key>0</key>
              <dict>
                <key>name</key>
                <string>punctuation.definition.string.begin.toml</string>
              </dict>
            </dict>
            <key>comment</key>
            <string>Multi-line String</string>
            <key>end</key>
            <string>(?&lt;!\\)"""</string>
            <key>endCaptures</key>
            <dict>
              <key>0</key>
              <dict>
                <key>name</key>
                <string>punctuation.definition.string.end.toml</string>
              </dict>
            </dict>
            <key>name</key>
            <string>string.quoted.double.toml</string>
            <key>patterns</key>
            <array>
              <dict>
                <key>include</key>
                <string>#escapes</string>
              </dict>
              <dict>
                <key>match</key>
                <string>\\\n\s*</string>
                <key>name</key>
                <string>constant.character.escape.whitespace.toml</string>
              </dict>
            </array>
          </dict>
          <dict>
            <key>begin</key>
            <string>"</string>
            <key>beginCaptures</key>
            <dict>
              <key>0</key>
              <dict>
                <key>name</key>
                <string>punctuation.definition.string.begin.toml</string>
              </dict>
            </dict>
            <key>comment</key>
            <string>String</string>
            <key>end</key>
            <string>(?&lt;!\\)"</string>
            <key>endCaptures</key>
            <dict>
              <key>0</key>
              <dict>
                <key>name</key>
                <string>punctuation.definition.string.end.toml</string>
              </dict>
            </dict>
            <key>name</key>
            <string>string.quoted.double.toml</string>
            <key>patterns</key>
            <array>
              <dict>
                <key>include</key>
                <string>#escapes</string>
              </dict>
            </array>
          </dict>
          <dict>
            <key>begin</key>
            <string>'''</string>
            <key>beginCaptures</key>
            <dict>
              <key>0</key>
              <dict>
                <key>name</key>
                <string>punctuation.definition.string.begin.toml</string>
              </dict>
            </dict>
            <key>comment</key>
            <string>Multi-line Literal String</string>
            <key>end</key>
            <string>(?&lt;!\\)'''</string>
            <key>endCaptures</key>
            <dict>
              <key>0</key>
              <dict>
                <key>name</key>
                <string>punctuation.definition.string.end.toml</string>
              </dict>
            </dict>
            <key>name</key>
            <string>string.quoted.single.toml</string>
          </dict>
          <dict>
            <key>begin</key>
            <string>'</string>
            <key>beginCaptures</key>
            <dict>
              <key>0</key>
              <dict>
                <key>name</key>
                <string>punctuation.definition.string.begin.toml</string>
              </dict>
            </dict>
            <key>comment</key>
            <string>Literal String</string>
            <key>end</key>
            <string>(?&lt;!\\)'</string>
            <key>endCaptures</key>
            <dict>
              <key>0</key>
              <dict>
                <key>name</key>
                <string>punctuation.definition.string.end.toml</string>
              </dict>
            </dict>
            <key>name</key>
            <string>string.quoted.single.toml</string>
          </dict>
          <dict>
            <key>comment</key>
            <string>Datetime - ISO8601 dates</string>
            <key>match</key>
            <string>(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])T(0[0-9]|1[0-9]|2[0-3]):(0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]):(0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])Z</string>
            <key>name</key>
            <string>constant.other.date.toml</string>
          </dict>
          <dict>
            <key>comment</key>
            <string>Float</string>
            <key>match</key>
            <string>(-?[0-9]+)\.([0-9]+)</string>
            <key>name</key>
            <string>constant.numeric.float.toml</string>
          </dict>
          <dict>
            <key>comment</key>
            <string>Integer</string>
            <key>match</key>
            <string>-?[0-9]+</string>
            <key>name</key>
            <string>constant.numeric.integer.toml</string>
          </dict>
          <dict>
            <key>comment</key>
            <string>Boolean</string>
            <key>match</key>
            <string>(true|false)</string>
            <key>name</key>
            <string>constant.language.boolean.toml</string>
          </dict>
          <dict>
            <key>begin</key>
            <string>\[</string>
            <key>beginCaptures</key>
            <dict>
              <key>0</key>
              <dict>
                <key>name</key>
                <string>punctuation.definition.array.begin.toml</string>
              </dict>
            </dict>
            <key>comment</key>
            <string>Array</string>
            <key>end</key>
            <string>\]</string>
            <key>endCaptures</key>
            <dict>
              <key>0</key>
              <dict>
                <key>name</key>
                <string>punctuation.definition.array.end.toml</string>
              </dict>
            </dict>
            <key>name</key>
            <string>meta.array.toml</string>
            <key>patterns</key>
            <array>
              <dict>
                <key>include</key>
                <string>#comments</string>
              </dict>
              <dict>
                <key>include</key>
                <string>#dataTypes</string>
              </dict>
            </array>
          </dict>
        </array>
      </dict>
      <key>escapes</key>
      <dict>
        <key>patterns</key>
        <array>
          <dict>
            <key>match</key>
            <string>\\[btnfr"/\\]</string>
            <key>name</key>
            <string>constant.character.escape.toml</string>
          </dict>
          <dict>
            <key>captures</key>
            <dict>
              <key>1</key>
              <dict>
                <key>name</key>
                <string>constant.character.escape.unicode.16-bit-hex.toml</string>
              </dict>
              <key>2</key>
              <dict>
                <key>name</key>
                <string>constant.character.escape.unicode.32-bit-hex.toml</string>
              </dict>
            </dict>
            <key>match</key>
            <string>(\\U[0-9A-Fa-f]{8})|(\\u[0-9A-Fa-f]{4})</string>
          </dict>
          <dict>
            <key>match</key>
            <string>\\.</string>
            <key>name</key>
            <string>invalid.illegal.character.escape.toml</string>
          </dict>
        </array>
      </dict>
      <key>keys</key>
      <dict>
        <key>patterns</key>
        <array>
          <dict>
            <key>begin</key>
            <string>^\s*([^\[]+)\s*(\=)\s*</string>
            <key>beginCaptures</key>
            <dict>
              <key>1</key>
              <dict>
                <key>name</key>
                <string>entity.name.tag.toml</string>
              </dict>
              <key>2</key>
              <dict>
                <key>name</key>
                <string>punctuation.separator.key-value.toml</string>
              </dict>
            </dict>
            <key>end</key>
            <string>(?=(\s*[^\[]+\s*=\s*|^\s*\[?\[.*\]\]?))</string>
            <key>patterns</key>
            <array>
              <dict>
                <key>include</key>
                <string>#comments</string>
              </dict>
              <dict>
                <key>include</key>
                <string>#dataTypes</string>
              </dict>
            </array>
          </dict>
        </array>
      </dict>
    </dict>
  </dict>
</plist>