grammars/source.icurry.json in github-linguist-7.20.0 vs grammars/source.icurry.json in github-linguist-7.21.0
- old
+ new
@@ -1 +1 @@
-{"name":"Curry Interface","scopeName":"source.icurry","patterns":[{"name":"meta.declaration.interface.icurry","begin":"^(interface)\\b","end":"\\b(where)\\b\\s*{|(^(?!\\s))","patterns":[{"include":"#interface_name"},{"include":"#comments"},{"name":"invalid","match":"[a-z]+"}],"beginCaptures":{"1":{"name":"keyword.other.icurry keyword.interface.icurry"}},"endCaptures":{"1":{"name":"keyword.interface.icurry"}}},{"name":"meta.import.icurry","begin":"^(import)\\b","end":"(^(?!\\s))","patterns":[{"name":"keyword.other.icurry keyword.import.icurry","match":"\\b(qualified|as|hiding)\\b"},{"include":"#interface_name"},{"include":"#module_exports"},{"include":"#comments"}],"beginCaptures":{"1":{"name":"keyword.other.icurry keyword.import.icurry"}}},{"name":"meta.preprocessor.c pragma.preprocessor.icurry","begin":"^\\s*(#)\\s*\\w+","end":"$","beginCaptures":{"1":{"name":"punctuation.definition.preprocessor.c punctuation.pragma.preprocessor.icurry"}}},{"include":"#pragma"},{"name":"meta.function.foreign-declaration.icurry","begin":"^(foreign)\\s+(import|export)((\\s+\\w+))(\\s+\\\"(\\\\.|[^\\\"])*\\\")?\\s*","end":"^(?!\\s)","patterns":[{"include":"#foreign_function_signature"}],"beginCaptures":{"1":{"name":"keyword.declaration.foreign.icurry"},"2":{"name":"keyword.declaration.foreign.icurry"},"3":{"name":"keyword.declaration.foreign.icurry"},"5":{"name":"string.quoted.double.icurry"}}},{"include":"#type_declarations"},{"include":"#function_declarations"},{"include":"#expression_stuff"}],"repository":{"block_comment":{"name":"comment.block.icurry","begin":"\\{-(?!#)","end":"(?\u003c!#)-\\}","patterns":[{"include":"#block_comment"},{"include":"#comments"}],"captures":{"0":{"name":"punctuation.comment.icurry"}},"applyEndPatternLast":true},"class_declaration":{"name":"meta.declaration.class.icurry","begin":"^(\\s*)(class)\\b","end":"\\b(where)\\b|(^(?!\\1\\s))","patterns":[{"include":"#type"}],"beginCaptures":{"2":{"name":"keyword.declaration.class.icurry"}},"endCaptures":{"1":{"name":"keyword.declaration.class.icurry"}}},"comments":{"patterns":[{"name":"comment.line.icurry","match":"(---*(?!([!#\\$%\u0026\\*\\+\\./\u003c=\u003e\\?@\\\\\\^\\|\\-~:]|[^[^\\p{S}\\p{P}]_\"'\\(\\),;\\[\\]`\\{}]))).*$\\n?","captures":{"1":{"name":"punctuation.comment.icurry"}}},{"include":"#block_comment"}]},"common_keywords":{"name":"keyword.other.icurry","match":"\\b(where|case|fcase|of|let|in|default|do|mdo|if|then|else|free)\\b"},"constructor_signature":{"name":"meta.declaration.function.icurry","begin":"^(\\s+)([A-Z][\\w']*|\\(\\W+\\))\\s*((::)|∷)","end":"^(?!\\1\\s)","patterns":[{"include":"#type"}],"beginCaptures":{"2":{"name":"constant.other.icurry entity.name.constructor.icurry"},"3":{"name":"keyword.other.double-colon.icurry"}}},"ctor_names":{"patterns":[{"name":"constant.other.icurry entity.name.constructor.icurry","match":"(?\u003c!')\\b[A-Z][\\w']*"},{"name":"constant.other.icurry entity.name.constructor.icurry","match":"\\(\\)"}]},"data_declaration":{"name":"meta.declaration.data.icurry","begin":"^(\\s*)(data|newtype)\\s+([A-Z][\\w']*)?","end":"^(?!\\1\\s)","patterns":[{"name":"keyword.declaration.data.icurry","match":"where"},{"begin":"([=\\|])","end":"(?\u003c!')\\b([A-Z][\\w']*)","patterns":[{"include":"#comments"}],"beginCaptures":{"1":{"name":"keyword.operator.icurry"}},"endCaptures":{"1":{"name":"constant.other.icurry entity.name.constructor.icurry"}}},{"include":"#deriving"},{"include":"#constructor_signature"},{"include":"#record_declaration"},{"include":"#comments"},{"include":"#type"}],"beginCaptures":{"2":{"name":"keyword.declaration.data.icurry"},"3":{"name":"constant.other.icurry entity.name.type.icurry"}}},"deriving":{"name":"keyword.other.icurry keyword.declaration.data.icurry","match":"\\b(deriving)\\b"},"expression_stuff":{"patterns":[{"name":"storage.interface.icurry entity.name.interface.icurry","match":"([A-Z][\\w']*\\.)+"},{"name":"support.function.prelude.icurry","match":"\\b(abs|acos|acosh|all|and|any|appendFile|asTypeOf|asin|asinh|atan|atan2|atanh|break|ceiling|compare|concat|concatMap|const|cos|cosh|icurry|cycle|decodeFloat|div|divMod|drop|dropWhile|either|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromEnum|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|head|id|init|interact|ioError|isDenormalized|isIEEE|isInfinite|isNaN|isNegativeZero|iterate|last|lcm|length|lex|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|odd|or|otherwise|pi|pred|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|read|readFile|readIO|readList|readLn|readParen|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showList|showParen|showString|shows|showsPrec|significand|signum|sin|sinh|snd|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|toEnum|toInteger|toRational|truncate|uncurry|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\\b"},{"name":"support.function.prelude.icurry invalid.icurry","match":"\\b(error|undefined)\\b"},{"include":"#infix_op"},{"name":"keyword.operator.icurry punctuation.list.icurry","match":"\\[|\\]"},{"name":"punctuation.separator.comma.icurry","match":","},{"name":"keyword.operator.function.infix.icurry","match":"(`)([A-Z][\\w']*\\.)*[a-z][\\w']*(`)","captures":{"1":{"name":"punctuation.definition.entity.icurry"},"3":{"name":"punctuation.definition.entity.icurry"}}},{"name":"record.expression.icurry","begin":"(\\{)(?!-)","end":"(?\u003c!-)(\\})","patterns":[{"match":"(?\u003c!')\\b[a-z][\\w']+\\s+(=)","captures":{"2":{"name":"keyword.operator.icurry"}}},{"include":"#expression_stuff"}],"beginCaptures":{"1":{"name":"keyword.operator.icurry punctuation.record.icurry"}},"endCaptures":{"1":{"name":"keyword.operator.icurry punctuation.record.icurry"}}},{"name":"constant.other.icurry entity.name.constructor.icurry","match":"\\(\\)"},{"name":"constant.other.icurry entity.name.constructor.icurry","match":"\\[\\]"},{"include":"#comments"},{"name":"keyword.operator.icurry","match":"[@|!%$?~+:.\\-*=\u003c/\u003e\\\\∘→⇒⇔←⇐≤≥≡⋮\\[\\]]+"},{"include":"#common_keywords"},{"include":"#literals"},{"include":"#quasi_quote"},{"include":"#ctor_names"}]},"field_signature":{"name":"meta.declaration.field.icurry","begin":"(?=.*?((::)|∷))","end":"(?=[,}])","patterns":[{"name":"meta.declaration.field.signature.icurry","begin":"((::)|∷)","end":"(?=[,}])","patterns":[{"include":"#type"}],"beginCaptures":{"1":{"name":"keyword.other.double-colon.icurry"}}},{"name":"entity.name.function.icurry","match":"((?\u003c!')\\b[a-z_][\\w']*|\\(\\W+\\))"}]},"fixity_declaration":{"name":"keyword.declaration.fixity.icurry","match":"\\binfix[lr]?\\b"},"foreign_function_signature":{"name":"meta.declaration.function.icurry","begin":"(\\s*)([a-z_][\\w']*|\\(\\W+\\))\\s*((::)|∷)","end":"^(?!\\s)","patterns":[{"include":"#type"}],"beginCaptures":{"2":{"name":"entity.name.function.icurry"},"3":{"name":"keyword.other.double-colon.icurry"}}},"function_declarations":{"patterns":[{"include":"#function_signature"},{"include":"#function_definition"},{"include":"#infix_function_definition"},{"include":"#fixity_declaration"}]},"function_definition":{"name":"meta.definition.function.icurry","begin":"^\\s*(?\u003c!')\\b([a-z_][\\w']*|\\(\\W+\\))\\s+(?![^\\w\\s='\"\\(\\[])(?=((([\\w\\.,'\"_]+|(?:\\w+\\@)?\\(.*\\)|\\[.*\\])\\s+)*[=\\|]))","end":"(=)","patterns":[{"include":"#expression_stuff"}],"beginCaptures":{"1":{"name":"entity.name.function.icurry"}},"endCaptures":{"1":{"name":"keyword.operator.icurry"}}},"function_signature":{"name":"meta.declaration.function.icurry","begin":"^(\\s*)(?!--)(?:(\\(\\W\\)|[\\w']+)|[\\(\\[])(?=[\\w',\\s\\[\\]\\(\\)]*((?:::)|∷))","end":"^(?!\\1\\s)|(?=})","patterns":[{"name":"meta.declaration.function.names.icurry","begin":"(?=.*((::)|∷))","end":"((::)|∷)","patterns":[{"name":"entity.name.function.icurry","match":"((?\u003c!')\\b[a-z_][\\w']*|\\(\\W+\\))"}],"endCaptures":{"1":{"name":"keyword.other.double-colon.icurry"}}},{"include":"#type"}],"beginCaptures":{"2":{"name":"entity.name.function.icurry"}}},"infix_function_definition":{"name":"meta.definition.function.icurry","begin":"^\\s*(?=(([\\w'\\.'\"]+|(?:\\w+@)?\\(.*\\)|\\[.*\\])\\s+)+([^\"'_,\\(\\);\\[\\]`\\{\\}\\:\\w\\s]+|`[a-z][\\w']*`)((\\s*[\\w'\\.'\"]+|\\s*(?:\\w+@)?\\(.*\\)|\\s*\\[.*\\]))+\\s*=)","end":"( [^\"'_,\\(\\);\\[\\]`\\{\\}\\:\\w\\s]+|`[a-z][\\w']*`)","patterns":[{"include":"#expression_stuff"}],"endCaptures":{"1":{"name":"entity.name.function.icurry"}}},"infix_op":{"name":"keyword.operator.icurry","match":"(\\([^\\w \\)]+\\)|\\(,+\\))"},"instance_declaration":{"name":"meta.declaration.instance.icurry","begin":"^(\\s*)(instance)\\b","end":"\\b(where)\\s*{\\b|(^(?!\\1\\s))","patterns":[{"include":"#type"},{"include":"#comments"}],"beginCaptures":{"2":{"name":"keyword.declaration.instance.icurry"}},"endCaptures":{"1":{"name":"keyword.declaration.instance.icurry"}}},"interface_name":{"name":"storage.interface.icurry","match":"([A-Z][\\w']*)(\\.[A-Z][\\w']*)*"},"literals":{"patterns":[{"name":"constant.numeric.icurry","match":"\\b([0-9]+\\.[0-9]+([eE][+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+)\\b"},{"name":"constant.numeric.icurry","match":"\\b([0-9]+|0([xX][0-9a-fA-F]+|[oO][0-7]+))\\b"},{"name":"string.quoted.double.icurry","begin":"\"","end":"\"","patterns":[{"name":"constant.character.escape.icurry","match":"\\\\(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\\\\\\\"'\\\u0026])"},{"name":"constant.character.escape.octal.icurry","match":"\\\\o[0-7]+|\\\\x[0-9A-Fa-f]+|\\\\[0-9]+"},{"name":"constant.character.escape.control.icurry","match":"\\^[A-Z@\\[\\]\\\\\\^_]"}]},{"name":"string.quoted.single.icurry","match":"(?x)\n (')\n (?:\n [\\ -\u0026(-\\[\\]-~\"] # Basic Char\n | (\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE\n |DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS\n |US|SP|DEL|[abfnrtv\\\\\\\"'\\\u0026])) # Escapes\n | (\\\\o[0-7]+) # Octal Escapes\n | (\\\\x[0-9A-Fa-f]+) # Hexadecimal Escapes\n | (\\^[A-Z@\\[\\]\\\\\\^_]) # Control Chars\n )\n (')\n ","captures":{"2":{"name":"constant.character.escape.icurry"},"3":{"name":"constant.character.escape.octal.icurry"},"4":{"name":"constant.character.escape.hexadecimal.icurry"},"5":{"name":"constant.character.escape.control.icurry"}}}]},"pattern_function_definition":{"name":"meta.definition.function.icurry","begin":"^\\s*(?=\\(.*\\)|\\[.*\\]|([A-Z][\\w']*(\\s+([\\w\\s,']*|\\(.*\\)|\\[.*\\]|\\{.*\\}))*)\\s*=)","end":"(=)","patterns":[{"match":"(?\u003c!')\\b([a-z_][\\w']*)\\b","captures":{"1":{"name":"entity.name.function.icurry"}}},{"include":"#expression_stuff"}],"endCaptures":{"1":{"name":"keyword.operator.icurry"}}},"pragma":{"name":"pragma.icurry","begin":"(\\{-#)\\s+([A-Z_]+)\\b","end":"#-\\}","patterns":[{"name":"keyword.other.preprocessor.icurry pragma.support.language.icurry","match":"\\b([A-Z][a-z]*)+\\b"},{"name":"keyword.other.preprocessor.icurry pragma.support.flag.icurry","match":"(-+[a-z]+)+"}],"beginCaptures":{"1":{"name":"punctuation.pragma.icurry"},"2":{"name":"keyword.preprocessor.icurry pragma.name.icurry"}}},"quasi_quote":{"name":"string.quoted.quasi.icurry","begin":"(\\[)([a-z]\\w*)?(\\|)","end":"(\\|\\])","beginCaptures":{"1":{"name":"punctuation.quasi-quoter.icurry keyword.operator.icurry"},"2":{"name":"entity.name.function.icurry"},"3":{"name":"punctuation.quasi-quoter.icurry keyword.operator.icurry"}},"endCaptures":{"1":{"name":"punctuation.quasi-quoter.icurry keyword.operator.icurry"}}},"record_declaration":{"name":"meta.declaration.record.icurry","begin":"(\\{)(?!-)","end":"(?\u003c!-)(\\})","patterns":[{"include":"#field_signature"},{"include":"#comments"}],"beginCaptures":{"1":{"name":"keyword.operator.icurry punctuation.record.icurry"}},"endCaptures":{"1":{"name":"keyword.operator.icurry punctuation.record.icurry"}}},"type":{"patterns":[{"name":"keyword.operator.arrow.icurry","match":"-\u003e|→"},{"name":"keyword.operator.big-arrow.icurry","match":"=\u003e|⇒"},{"name":"storage.type.icurry support.type.icurry","match":"\\b(Int(eger)?|Maybe|Either|Bool|Float|Double|Char|String|Ordering|ShowS|ReadS|FilePath|IO(Error)?)\\b"},{"name":"variable.generic.icurry","match":"(?\u003c!')\\b[a-z][\\w']*\\b"},{"name":"storage.type.icurry","match":"(?\u003c!')\\b[A-Z][\\w']*\\b"},{"name":"storage.type.icurry","match":"\\(\\)"},{"name":"meta.type_signature.brace.icurry","begin":"(\\()","end":"(\\))","patterns":[{"include":"#type"}],"beginCaptures":{"1":{"name":"keyword.operator.icurry"}},"endCaptures":{"1":{"name":"keyword.operator.icurry"}}},{"name":"meta.type_signature.list.icurry","begin":"(\\[)","end":"(\\])","patterns":[{"include":"#type"}],"beginCaptures":{"1":{"name":"keyword.operator.icurry"}},"endCaptures":{"1":{"name":"keyword.operator.icurry"}}},{"include":"#comments"}]},"type_declaration":{"name":"meta.declaration.type.icurry","begin":"^(\\s*)(type)\\s+([A-Z][\\w']*)?","end":"^(?!\\1\\s)","patterns":[{"include":"#comments"},{"name":"keyword.operator.icurry","match":"="},{"include":"#type"}],"beginCaptures":{"2":{"name":"keyword.declaration.data.icurry"},"3":{"name":"constant.other.icurry entity.name.type.icurry"}}},"type_declarations":{"patterns":[{"include":"#data_declaration"},{"include":"#type_declaration"},{"include":"#class_declaration"},{"include":"#instance_declaration"}]}}}
+{"name":"Curry Interface","scopeName":"source.icurry","patterns":[{"include":"#import"},{"include":"#hiding_declaration"},{"include":"#interface_declaration"},{"include":"#instance_declaration"},{"include":"#class_declaration"},{"include":"#data_declaration"},{"include":"#type_declaration"},{"include":"#function_declarations"},{"include":"#pragma"}],"repository":{"class_declaration":{"name":"meta.declaration.class.icurry","begin":"\\b(class)\\b","end":"{","patterns":[{"include":"#type"}],"beginCaptures":{"1":{"name":"keyword.other.icurry"}},"endCaptures":{"1":{"name":"keyword.other.scope.icurry"}}},"data_declaration":{"name":"meta.declaration.data.icurry","begin":"\\b(data)|(newtype)","end":";|}","patterns":[{"include":"#type"}],"beginCaptures":{"1":{"name":"keyword.declaration.data.icurry"},"2":{"name":"keyword.declaration.newtype.icurry"}}},"function_declarations":{"patterns":[{"include":"#infix_function_definition"},{"include":"#function_signature"}]},"function_signature":{"name":"meta.declaration.function.icurry","begin":"(?:\\b(\\w+)|(\\([^\\)]+\\)))(?:\\s+(\\d+))?(?:\\s*(::))?","end":";|}","patterns":[{"include":"#type"}],"beginCaptures":{"1":{"name":"entity.name.function.icurry"},"2":{"name":"entity.name.function.operator.icurry"},"3":{"name":"constant.numeric.arity.icurry"},"4":{"name":"keyword.other.double-colon.icurry"}}},"hiding_declaration":{"name":"meta.hiding.icurry","begin":"^(hiding)\\s+(data|class)\\b","end":";|}","patterns":[{"include":"#type"}],"beginCaptures":{"1":{"name":"keyword.other.icurry keyword.import.icurry"},"2":{"name":"keyword.other.icurry"}}},"import":{"name":"meta.import.icurry","begin":"^(import)\\b","end":";|}","patterns":[{"include":"#module_name"}],"beginCaptures":{"1":{"name":"keyword.other.icurry keyword.import.icurry"}}},"infix_function_definition":{"name":"meta.declaration.function.infix.icurry","begin":"\\b(infix(?:[rl])?)\\s+(\\d+)","end":";|}","beginCaptures":{"1":{"name":"keyword.other.infix.icurry"},"2":{"name":"constant.numeric.fixity.icurry"}}},"instance_declaration":{"name":"meta.declaration.instance.icurry","begin":"\\b(instance)\\b","end":"{","patterns":[{"include":"#type"}],"beginCaptures":{"1":{"name":"keyword.other.icurry"}},"endCaptures":{"1":{"name":"keyword.other.scope.icurry"}}},"interface_declaration":{"name":"meta.declaration.interface.icurry","begin":"\\b(interface)\\b","end":"\\b(where)\\s*{","patterns":[{"include":"#type"}],"beginCaptures":{"1":{"name":"keyword.other.icurry"}},"endCaptures":{"1":{"name":"keyword.other.scope.icurry"}}},"module_name":{"name":"storage.module.icurry","match":"([A-Z][\\w']*)(\\.[A-Z][\\w']*)*"},"pragma":{"name":"meta.preprocessor.icurry pragma.icurry","begin":"(\\{-#)\\s+([A-Z_]+)\\b","end":"(#-\\})","patterns":[{"name":"keyword.other.preprocessor.icurry pragma.support.language.icurry","match":"\\b([A-Z][a-z]*)+\\b"},{"name":"keyword.other.preprocessor.icurry pragma.support.flag.icurry","match":"(-+[a-z]+)+"}],"beginCaptures":{"1":{"name":"punctuation.preprocessor.icurry punctuation.pragma.icurry"},"2":{"name":"keyword.preprocessor.icurry pragma.name.icurry"}},"endCaptures":{"1":{"name":"punctuation.preprocessor.icurry punctuation.pragma.icurry"}}},"type":{"patterns":[{"name":"keyword.operator.arrow.icurry","match":"-\u003e|→"},{"name":"keyword.operator.big-arrow.icurry","match":"=\u003e|⇒"},{"name":"variable.generic.icurry","match":"(?\u003c!')\\b[a-z][\\w']*\\b"},{"name":"storage.type.icurry","match":"(?\u003c!')\\b[A-Z][\\w']*\\b"},{"name":"storage.type.icurry","match":"\\(\\)"},{"name":"meta.type_signature.brace.icurry","begin":"(\\()","end":"(\\))","patterns":[{"include":"#type"}],"beginCaptures":{"1":{"name":"keyword.operator.icurry"}},"endCaptures":{"1":{"name":"keyword.operator.icurry"}}},{"name":"meta.type_signature.list.icurry","begin":"(\\[)","end":"(\\])","patterns":[{"include":"#type"}],"beginCaptures":{"1":{"name":"keyword.operator.icurry"}},"endCaptures":{"1":{"name":"keyword.operator.icurry"}}}]},"type_declaration":{"name":"meta.declaration.type.icurry","begin":"\\b(type)","end":";|}","patterns":[{"include":"#type"}],"beginCaptures":{"1":{"name":"keyword.declaration.type.icurry"}}}}}