grammars/source.perl6fe.json in github-linguist-4.8.2 vs grammars/source.perl6fe.json in github-linguist-4.8.3
- old
+ new
@@ -680,17 +680,19 @@
{
"match": "\\b\\$\\w+\\b",
"name": "variable.other.perl6fe"
},
{
- "match": "(?x)\\b(?<![\\-:])( macro|sub|submethod|method |multi|proto|only|category )(?!\\-)\\b",
- "name": "storage.type.declare.routine.perl6fe"
- },
- {
- "begin": "(?x)(?<= macro|sub|submethod|method )(?!\\-)\\s+(!)?(?=\\w)",
+ "begin": "(?x)(?<![%$&@]|\\w) (multi\\s+)? (macro|sub|submethod|method|multi|proto|only|category)\\s+ (!)?(?=\\w)",
"beginCaptures": {
"1": {
+ "name": "storage.type.declarator.multi.perl6fe"
+ },
+ "2": {
+ "name": "storage.type.declarator.type.perl6fe"
+ },
+ "3": {
"name": "support.class.method.private.perl6fe"
}
},
"end": "\\s*(?=[\\(\\{])",
"contentName": "entity.name.function.perl6fe"
@@ -817,11 +819,11 @@
{
"match": "\\b(True|False)\\b",
"name": "constant.language.boolean.perl6fe"
},
{
- "match": "(?x)\\b(?<![\\-:])( fatal|internals|MONKEY\\-TYPING|nqp| strict|trace|worries|invocant|parameters| cur|soft|variables|attributes|v6|lib )(?!\\-)\\b",
+ "match": "(?x)\\b(?<![\\-:])( fatal|internals|MONKEY\\-TYPING|nqp| strict|trace|worries|invocant|parameters|experimental| cur|soft|variables|attributes|v6(?:\\.\\w)*|lib|Test|NativeCall )(?!\\-)\\b",
"name": "constant.language.pragma.perl6fe"
},
{
"match": "(?x)(?<![:\\-\\w]) (Backtrace|Exception|Failure|X) (?: \\:\\:[a-zA-Z]+ )* \\b",
"captures": {
@@ -829,21 +831,33 @@
"name": "support.type.exception.perl6fe"
}
}
},
{
- "match": "(?x)\\b(?<!:)( AST|Any|Array|Associative|Attribute|Bag|BagHash|Baggy| Blob|Block|Bool|Callable|Capture|Channel|Code|Complex|Cool| CurrentThreadScheduler|Cursor|Date|DateTime|Dateish|Duration| Enum|FatRat|Grammar|Hash|IO|Instant|Iterable| Iterator|Junction|Label|List|Lock|Macro|Map|Match|Metamodel| Method|Mix|MixHash|Mixy|Mu|Nil|Num|Numeric|ObjAt|Pair|Parameter| Pod|Positional|PositionalBindFailover|Proc|Promise|Proxy| QuantHash|Range|Rat|Rational|Real|Regex|Routine|Scheduler|Seq| Set|SetHash|Setty|Signature|Slip|Stash|Str|Stringy|Sub| Submethod|Supply|Tap|Temporal|Thread|ThreadPoolScheduler| Variable|Version|Whatever|WhateverCode|bool|size_t| Int|int|int1|int2|int4|int8|int16|int32|int64| Rat|rat|rat1|rat2|rat4|rat8|rat16|rat32|rat64| Buf|buf|buf1|buf2|buf4|buf8|buf16|buf32|buf64| UInt|uint|uint1|uint2|uint4|uint8|uint16|uint32|uint64| utf8|utf16|utf32 )(?!\\:\\:)(?:\\:([DU]))?\\b",
+ "match": "(?x)\\b(?<!:)( AST|Any|Array|Associative|Attribute|Bag|BagHash|Baggy| Blob|Block|Bool|Callable|Capture|Channel|Code|Complex|Cool| CurrentThreadScheduler|Cursor|Date|DateTime|Dateish|Duration| Enum|FatRat|Grammar|Hash|IO|Instant|Iterable| Iterator|Junction|Label|List|Lock|Macro|Map|Match|Metamodel| Method|Mix|MixHash|Mixy|Mu|Nil|Numeric|ObjAt|Pair| Parameter|Pod|Positional|PositionalBindFailover|Proc|Promise| Proxy|QuantHash|Range|Rat|Rational|Real|Regex|Routine|Scheduler| Seq|Set|SetHash|Setty|Signature|Slip|Stash|Str|str|Stringy|Sub| Submethod|Supply|Tap|Temporal|Thread|ThreadPoolScheduler| Variable|Version|Whatever|WhateverCode|bool|size_t| Int|int|int1|int2|int4|int8|int16|int32|int64| Rat|rat|rat1|rat2|rat4|rat8|rat16|rat32|rat64| Buf|buf|buf1|buf2|buf4|buf8|buf16|buf32|buf64| UInt|uint|uint1|uint2|uint4|uint8|uint16|uint32|uint64| utf8|utf16|utf32|Num|num|num32|num64 )(?!\\:\\:)\\b",
"captures": {
"1": {
"name": "support.type.perl6fe"
},
"2": {
"name": "support.class.type.adverb.perl6fe"
}
}
},
{
+ "match": "(?<=\\w)(\\:)([DU_])\\b",
+ "name": "meta.adverb.definedness.perl6fe",
+ "captures": {
+ "1": {
+ "name": "keyword.operator.adverb.perl6fe"
+ },
+ "2": {
+ "name": "keyword.other.special-method.definedness.perl6fe"
+ }
+ }
+ },
+ {
"match": "(?x)\\b( div|mod|gcd|lcm|x|xx|temp|let|but|cmp|leg| eq|ne|gt|ge|lt|le|before|after|eqv|min|max|ff|fff|not|so|Z| and|andthen|or|orelse )\\b| \\b(X)(?!:)\\b",
"name": "keyword.operator.word.perl6fe"
},
{
"match": "(=)(~)(=)",
@@ -859,21 +873,40 @@
}
},
"name": "meta.operator.non.ligature.perl6fe"
},
{
- "match": "(?x) <=> | => | -> | \\+\\| | \\+\\+ | -- | \\*\\* | \\?\\?\\? | \\?\\? | \\!\\!\\! | \\!\\! | && | \\+\\^ | \\?\\^ | %% | \\+& | \\+< | \\+> | \\+\\^ | \\.\\.(?!\\.) | \\.\\.\\^ | \\^\\.\\. | \\^\\.\\.\\^ | \\?\\| | !=(?!\\=) | !==(?!\\=) | <=(?!>) | >= | === | == | =:= | ~~ | \\x{2245} | \\|\\| | \\^\\^ | \\/\\/ | := | ::= | \\.\\.\\.",
+ "match": "(?x) <=> | => | --> | -> | \\+\\| | \\+\\+ | -- | \\*\\* | \\?\\?\\? | \\?\\? | \\!\\!\\! | \\!\\! | && | \\+\\^ | \\?\\^ | %% | \\+& | \\+< | \\+> | \\+\\^ | \\.\\.(?!\\.) | \\.\\.\\^ | \\^\\.\\. | \\^\\.\\.\\^ | \\?\\| | !=(?!\\=) | !==(?!\\=) | <=(?!>) | >= | === | == | =:= | ~~ | \\x{2245} | \\|\\| | \\^\\^ | \\/\\/ | := | ::= | \\.\\.\\.",
"name": "keyword.operator.multi-symbol.perl6fe"
},
{
"include": "#special_variables"
},
{
+ "match": "(?x)(?<=\\[) \\s* (\\*) \\s* ([\\-\\*%\\^\\+\\/]|div|mod|gcd|lcm) \\s* (\\d+) \\s* (?=\\])",
+ "name": "meta.subscript.whatever.perl6fe",
+ "captures": {
+ "1": {
+ "name": "constant.language.whatever.perl6fe"
+ },
+ "2": {
+ "name": "keyword.operator.minus.back-from.perl6fe"
+ },
+ "3": {
+ "name": "constant.numeric.back-from.perl6fe"
+ }
+ }
+ },
+ {
+ "match": "\\*\\s*(?=\\])",
+ "name": "constant.language.whatever.hack.perl6fe"
+ },
+ {
"include": "#variables"
},
{
- "match": "(?x)\\b(?<![\\-:]|\\\\)( eager|hyper|substr|index|rindex|grep|map|sort|join|lines|hints |chmod|split|reduce|min|max|reverse|truncate|zip|cat|roundrobin |classify|first|sum|keys|values|pairs|defined|delete|exists |elems|end|kv|any|all|one|wrap|shape|key|value|name|pop|push |shift|splice|unshift|floor|ceiling|abs|exp|log|log10|rand|sign |sqrt|sin|cos|tan|round|strand|roots|cis|unpolar|polar|atan2 |pick|chop|chomp|lc|lcfirst|uc|ucfirst|capitalize |normalize|pack|unpack|quotemeta|comb|samecase|sameaccent|chars |nfd|nfc|nfkd|nfkc|printf|sprintf|caller|evalfile|run|runinstead |nothing|want|bless|chr|ord|gmtime|time|eof|localtime|gethost |getpw|chroot|getlogin|getpeername|kill|fork|wait|perl|graphs |codes|bytes|clone|print|open|read|write|readline|say|seek|close |opendir|readdir|slurp|spurt|shell|run|pos|fmt|vec|link|unlink |symlink|unique|pair|asin|atan|sec|cosec|cotan|asec|acosec|acotan |sinh|cosh|tanh|asinh|done|acos|acosh|atanh|sech|cosech|cotanh |sech|acosech|acotanh|asech|ok|nok|plan-ok|dies-ok|lives-ok|skip |todo|pass|flunk|force-todo|use-ok|isa-ok|diag|is-deeply|isnt |like|skip-rest|unlike|cmp-ok|eval-dies-ok|nok-error |eval-lives-ok|approx|is-approx|throws-ok|version-lt|plan|EVAL |succ|pred|times|nonce|once|signature|new|connect|operator|undef |undefine|sleep|from|to|infix|postfix|prefix|circumfix |postcircumfix|minmax|lazy|count|unwrap|getc|pi|tau|e|context|void |quasi|body|each|contains|rewinddir|subst|can|isa|flush|arity |assuming|rewind|callwith|callsame|nextwith|nextsame|attr |eval-elsewhere|none|srand|trim|trim-start|trim-end|lastcall |WHAT|WHY|WHERE|HOW|WHICH|VAR|WHO|WHENCE|ACCEPTS|REJECTS|not |iterator|by|re|im|invert|flip|gist|flat|tree|is-prime |throws-like|trans|race|hyper|tap|emit|done|quit|dd|note |starts-with|ends-with|put|append|tail|\\x{03C0}|\\x{03C4}|\\x{212F} )(?!\\-)\\b(?!\\s*=>)",
+ "match": "(?x)\\b(?<![\\-:]|\\\\)( eager|hyper|substr|index|rindex|grep|map|sort|join|lines|hints |chmod|split|reduce|min|max|reverse|truncate|zip|cat|roundrobin |classify|first|sum|keys|values|pairs|defined|delete|exists |elems|end|kv|any|all|one|wrap|shape|key|value|name|pop|push |shift|splice|unshift|floor|ceiling|abs|exp|log|log10|rand|sign |sqrt|sin|cos|tan|round|strand|roots|cis|unpolar|polar|atan2 |pick|chop|chomp|lc|lcfirst|uc|ucfirst|capitalize |normalize|pack|unpack|quotemeta|comb|samecase|sameaccent|chars |nfd|nfc|nfkd|nfkc|printf|sprintf|caller|evalfile|run|runinstead |nothing|want|bless|chr|ord|gmtime|time|eof|localtime|gethost |getpw|chroot|getlogin|getpeername|kill|fork|wait|perl|graphs |codes|bytes|clone|print|open|read|write|readline|say|seek|close |opendir|readdir|slurp|spurt|shell|run|pos|fmt|vec|link|unlink |symlink|unique|pair|asin|atan|sec|cosec|cotan|asec|acosec|acotan |sinh|cosh|tanh|asinh|done|acos|acosh|atanh|sech|cosech|cotanh |sech|acosech|acotanh|asech|ok|nok|plan-ok|dies-ok|lives-ok|skip |todo|pass|flunk|force-todo|use-ok|isa-ok|diag|is-deeply|isnt |like|skip-rest|unlike|cmp-ok|eval-dies-ok|nok-error |eval-lives-ok|approx|is-approx|throws-ok|version-lt|plan|EVAL |succ|pred|times|nonce|once|signature|new|connect|operator|undef |undefine|sleep|from|to|infix|postfix|prefix|circumfix |postcircumfix|minmax|lazy|count|unwrap|getc|pi|tau|e|context|void |quasi|body|each|contains|rewinddir|subst|can|isa|flush|arity |assuming|rewind|callwith|callsame|nextwith|nextsame|attr |eval-elsewhere|none|srand|trim|trim-start|trim-end|lastcall |WHAT|WHY|WHERE|HOW|WHICH|VAR|WHO|WHENCE|ACCEPTS|REJECTS|not |iterator|by|re|im|invert|flip|gist|flat|tree|is-prime |throws-like|trans|race|hyper|tap|emit|done-testing|quit|dd|note |starts-with|ends-with|put|append|tail|\\x{03C0}|\\x{03C4}|\\x{212F} )(?!\\-)\\b(?!\\s*=>)",
"name": "support.function.perl6fe"
},
{
"match": "(?x) (?<!\\(|\\*)\\%| [\\^\\+><\\*\\!\\?~\\/\\|]| (?<!\\$)\\.| (?<!:):(?!:)| (?<=\\s)\\-(?=[\\s\\(\\{\\[])| (?<!\\w)[o\\x{2218}](?!\\w)",
"name": "keyword.operator.generic.perl6fe"
@@ -930,10 +963,10 @@
{
"match": "(?<=[=,;\\^\\s\\{\\[\\(\\/]|\\.\\.)0[bodx]\\w+",
"name": "constant.numeric.radix.perl6fe"
},
{
- "match": "(?x) (?<=[=,;\\^\\s\\{\\[\\(\\/]|\\.\\.) (?:[\\+\\-])? (?: \\d+ (?:[\\_\\d]+\\d)? ) (?: \\. \\d+ (?:[\\_\\d]+\\d)? )? (?: e \\d+ (?:[\\_\\d]+\\d)? )?",
+ "match": "(?x) (?<=[=,:;\\^\\s\\{\\[\\(\\/]|\\.\\.) (?:[\\+\\-])? (?: \\d+ (?:[\\_\\d]+\\d)? ) (?: \\. \\d+ (?:[\\_\\d]+\\d)? )? (?: e \\d+ (?:[\\_\\d]+\\d)? )?",
"name": "constant.numeric.perl6fe"
}
]
},
"comment-block-delimited": {
\ No newline at end of file