Files
elm-language-client-vscode/syntaxes/elm.tmLanguage
2018-07-09 02:05:22 +02:00

603 lines
13 KiB
Plaintext

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>elm</string>
</array>
<key>name</key>
<string>Elm</string>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.entity.elm</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.definition.entity.elm</string>
</dict>
</dict>
<key>match</key>
<string>(`)[a-zA-Z_']*?(`)</string>
<key>name</key>
<string>keyword.operator.function.infix.elm</string>
</dict>
<dict>
<key>match</key>
<string>\(\)</string>
<key>name</key>
<string>constant.language.unit.elm</string>
</dict>
<dict>
<key>begin</key>
<string>^\b((effect|port)\s+)?(module)\s+</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.elm</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>keyword.other.elm</string>
</dict>
</dict>
<key>end</key>
<string>$|;</string>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.elm</string>
</dict>
</dict>
<key>name</key>
<string>meta.declaration.module.elm</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#module_name</string>
</dict>
<dict>
<key>begin</key>
<string>(where)\s*\{</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.elm</string>
</dict>
</dict>
<key>end</key>
<string>\}</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#type_signature</string>
</dict>
</array>
</dict>
<dict>
<key>match</key>
<string>(exposing)</string>
<key>name</key>
<string>keyword.other.elm</string>
</dict>
<dict>
<key>include</key>
<string>#module_exports</string>
</dict>
<dict>
<key>match</key>
<string>(where)</string>
<key>name</key>
<string>keyword.other.elm</string>
</dict>
<dict>
<key>match</key>
<string>[a-z]+</string>
<key>name</key>
<string>invalid</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>^\b(import)\s+((open)\s+)?</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.elm</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>invalid</string>
</dict>
</dict>
<key>end</key>
<string>($|;)</string>
<key>name</key>
<string>meta.import.elm</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>(as|exposing)</string>
<key>name</key>
<string>keyword.import.elm</string>
</dict>
<dict>
<key>include</key>
<string>#module_name</string>
</dict>
<dict>
<key>include</key>
<string>#module_exports</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(\[)(glsl)(\|)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.elm</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>support.function.prelude.elm</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>keyword.other.elm</string>
</dict>
</dict>
<key>end</key>
<string>(\|\])</string>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.elm</string>
</dict>
</dict>
<key>name</key>
<string>entity.glsl.elm</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>source.glsl</string>
</dict>
</array>
</dict>
<dict>
<key>match</key>
<string>\b(type alias|type|case|of|let|in|as)\s+</string>
<key>name</key>
<string>keyword.other.elm</string>
</dict>
<dict>
<key>match</key>
<string>\b(if|then|else)\s+</string>
<key>name</key>
<string>keyword.control.elm</string>
</dict>
<dict>
<key>comment</key>
<string>Floats are always decimal</string>
<key>match</key>
<string>\b([0-9]+\.[0-9]+([eE][+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+)\b</string>
<key>name</key>
<string>constant.numeric.float.elm</string>
</dict>
<dict>
<key>match</key>
<string>\b([0-9]+)\b</string>
<key>name</key>
<string>constant.numeric.elm</string>
</dict>
<dict>
<key>begin</key>
<string>"""</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.elm</string>
</dict>
</dict>
<key>end</key>
<string>"""</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.elm</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.double.elm</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\(NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\'\&amp;])</string>
<key>name</key>
<string>constant.character.escape.elm</string>
</dict>
<dict>
<key>match</key>
<string>\^[A-Z@\[\]\\\^_]</string>
<key>name</key>
<string>constant.character.escape.control.elm</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.elm</string>
</dict>
</dict>
<key>end</key>
<string>"</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.elm</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.double.elm</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\(NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\"'\&amp;])</string>
<key>name</key>
<string>constant.character.escape.elm</string>
</dict>
<dict>
<key>match</key>
<string>\^[A-Z@\[\]\\\^_]</string>
<key>name</key>
<string>constant.character.escape.control.elm</string>
</dict>
</array>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.elm</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>constant.character.escape.elm</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.elm</string>
</dict>
</dict>
<key>match</key>
<string>(?x)
(')
(?:
[\ -\[\]-~] # Basic Char
| (\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE
|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS
|US|SP|DEL|[abfnrtv\\\"'\&amp;])) # Escapes
| (\^[A-Z@\[\]\\\^_]) # Control Chars
)
(')</string>
<key>name</key>
<string>string.quoted.single.elm</string>
</dict>
<dict>
<key>begin</key>
<string>^(port\s+)?([a-z_][a-zA-Z0-9_']*|\([|!%$+\-.,=&lt;/&gt;]+\))\s*((:)([:]+)?)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.port.elm</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>entity.name.function.elm</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>keyword.other.colon.elm</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>invalid</string>
</dict>
</dict>
<key>end</key>
<string>$\n?</string>
<key>name</key>
<string>meta.function.type-declaration.elm</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#type_signature</string>
</dict>
</array>
</dict>
<dict>
<key>match</key>
<string>\bport\s+</string>
<key>name</key>
<string>keyword.other.port.elm</string>
</dict>
<dict>
<key>match</key>
<string>\b[A-Z]\w*\b</string>
<key>name</key>
<string>constant.other.elm</string>
</dict>
<dict>
<key>include</key>
<string>#comments</string>
</dict>
<dict>
<key>match</key>
<string>^[a-z][A-Za-z0-9_']*\s+</string>
<key>name</key>
<string>entity.name.function.elm</string>
</dict>
<dict>
<key>include</key>
<string>#infix_op</string>
</dict>
<dict>
<key>match</key>
<string>[|!%$?~+:\-.=&lt;/&gt;&amp;\\*^]+</string>
<key>name</key>
<string>keyword.operator.elm</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>support.function.delimiter.elm</string>
</dict>
</dict>
<key>match</key>
<string>([\[\]\{\},])</string>
<key>name</key>
<string>constant.language.delimiter.elm</string>
</dict>
<dict>
<key>match</key>
<string>([\(\)])</string>
<key>name</key>
<string>keyword.other.parenthesis.elm</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>block_comment</key>
<dict>
<key>applyEndPatternLast</key>
<integer>1</integer>
<key>begin</key>
<string>\{-(?!#)</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.elm</string>
</dict>
</dict>
<key>end</key>
<string>-\}</string>
<key>name</key>
<string>comment.block.elm</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#block_comment</string>
</dict>
</array>
</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.elm</string>
</dict>
</dict>
<key>match</key>
<string>(--).*$\n?</string>
<key>name</key>
<string>comment.line.double-dash.elm</string>
</dict>
<dict>
<key>include</key>
<string>#block_comment</string>
</dict>
</array>
</dict>
<key>infix_op</key>
<dict>
<key>match</key>
<string>(\([|!%$+:\-.=&lt;/&gt;]+\)|\(,+\))</string>
<key>name</key>
<string>entity.name.function.infix.elm</string>
</dict>
<key>module_exports</key>
<dict>
<key>begin</key>
<string>\(</string>
<key>end</key>
<string>\)</string>
<key>name</key>
<string>meta.declaration.exports.elm</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\b[a-z][a-zA-Z_'0-9]*</string>
<key>name</key>
<string>entity.name.function.elm</string>
</dict>
<dict>
<key>match</key>
<string>\b[A-Z][A-Za-z_'0-9]*</string>
<key>name</key>
<string>storage.type.elm</string>
</dict>
<dict>
<key>match</key>
<string>,</string>
<key>name</key>
<string>punctuation.separator.comma.elm</string>
</dict>
<dict>
<key>include</key>
<string>#infix_op</string>
</dict>
<dict>
<key>comment</key>
<string>So named because I don't know what to call this.</string>
<key>match</key>
<string>\(.*?\)</string>
<key>name</key>
<string>meta.other.unknown.elm</string>
</dict>
</array>
</dict>
<key>module_name</key>
<dict>
<key>match</key>
<string>[A-Z][A-Za-z._']*</string>
<key>name</key>
<string>support.other.module.elm</string>
</dict>
<key>type_signature</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>entity.other.inherited-class.elm</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>variable.other.generic-type.elm</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>keyword.other.big-arrow.elm</string>
</dict>
</dict>
<key>match</key>
<string>\(\s*([A-Z][A-Za-z]*)\s+([a-z][A-Za-z_']*)\)\s*(=&gt;)</string>
<key>name</key>
<string>meta.class-constraint.elm</string>
</dict>
<dict>
<key>match</key>
<string>-&gt;</string>
<key>name</key>
<string>keyword.other.arrow.elm</string>
</dict>
<dict>
<key>match</key>
<string>=&gt;</string>
<key>name</key>
<string>keyword.other.big-arrow.elm</string>
</dict>
<dict>
<key>match</key>
<string>\b[a-z][a-zA-Z0-9_']*\b</string>
<key>name</key>
<string>variable.other.generic-type.elm</string>
</dict>
<dict>
<key>match</key>
<string>\b[A-Z][a-zA-Z0-9_']*\b</string>
<key>name</key>
<string>storage.type.elm</string>
</dict>
<dict>
<key>match</key>
<string>\(\)</string>
<key>name</key>
<string>support.constant.unit.elm</string>
</dict>
<dict>
<key>include</key>
<string>#comments</string>
</dict>
</array>
</dict>
</dict>
<key>scopeName</key>
<string>source.elm</string>
<key>uuid</key>
<string>2cb90e5e-6e98-456d-9a8a-b59935dbc4b0</string>
</dict>
</plist>