grammars/source.perl6fe.json in github-linguist-5.0.5 vs grammars/source.perl6fe.json in github-linguist-5.0.6
- old
+ new
@@ -226,10 +226,22 @@
"name": "comment.internal.left_double_right_double.perl6fe"
}
]
},
{
+ "begin": "\\s*#`„",
+ "end": "”|“",
+ "name": "comment.multiline.hash-tick.left_double-low-q_right_double.perl6fe",
+ "patterns": [
+ {
+ "begin": "„",
+ "end": "”|“",
+ "name": "comment.internal.left_double-low-q_right_double.perl6fe"
+ }
+ ]
+ },
+ {
"begin": "\\s*#`‘",
"end": "’",
"name": "comment.multiline.hash-tick.left_single_right_single.perl6fe",
"patterns": [
{
@@ -313,10 +325,37 @@
"include": "source.quoting.perl6fe#q_left_double_right_double_string_content"
}
]
},
{
+ "begin": "„",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.begin.perl6fe"
+ }
+ },
+ "end": "”|“",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.end.perl6fe"
+ }
+ },
+ "name": "string.quoted.left_double-low-q_right_double.perl6fe",
+ "patterns": [
+ {
+ "match": "\\\\[„”|“abtnfre\\\\\\{\\}]",
+ "name": "constant.character.escape.perl6fe"
+ },
+ {
+ "include": "#interpolation"
+ },
+ {
+ "include": "source.quoting.perl6fe#q_left_double-low-q_right_double_string_content"
+ }
+ ]
+ },
+ {
"begin": "(?<=\\W|^)‘",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.perl6fe"
}
@@ -477,11 +516,11 @@
"name": "punctuation.definition.regexp.perl6fe"
}
}
},
{
- "begin": "(?x)\n(?<= ^|\\s )\n(?:\n (m|rx|s|S)\n (\n (?:\n (?<!:P5) # < This can maybe be removed because we\n \\s*:\\w+\n (?!\\s*:P5) # < include p5_regex above it\n )*\n )\n)\n\\s*\n([^\\#\\p{Ps}\\p{Pe}\\p{Pi}\\p{Pf}\\w'\\-<>\\-]) # Whatever",
+ "begin": "(?x)\n(?<= ^|[=,(\\[~]|when|=> ) \\s*\n(?:\n (m|rx)\n (\n (?:\n (?<!:P5) # < This can maybe be removed because we\n \\s*:\\w+\n (?!\\s*:P5) # < include p5_regex above it\n )*\n )\n) # With the m or rx\n\\s*\n([/]) # Solidus",
"beginCaptures": {
"1": {
"name": "string.regexp.construct.perl6fe"
},
"2": {
@@ -489,11 +528,11 @@
},
"3": {
"name": "punctuation.definition.regexp.perl6fe"
}
},
- "end": "(?x) (?: (?<!\\\\)|(?<=\\\\\\\\) ) (\\3)",
+ "end": "(?x) (?: (?<!\\\\)|(?<=\\\\\\\\)|(?<!')|(?<=\\\\ ') ) (/)",
"endCaptures": {
"1": {
"name": "punctuation.definition.regexp.perl6fe"
}
},
@@ -506,11 +545,11 @@
"include": "source.regexp.perl6fe"
}
]
},
{
- "begin": "(?x)\n(?<= ^|[=,(\\[~]|when|=> ) \\s*\n(?:\n (m|rx)\n (\n (?:\n (?<!:P5) # < This can maybe be removed because we\n \\s*:\\w+\n (?!\\s*:P5) # < include p5_regex above it\n )*\n )\n) # With the m or rx\n\\s*\n([/]) # Solidus",
+ "begin": "(?x)\n(?<= ^|[=,(\\[~]|when|=> ) \\s*\n(?:\n (m|rx)\n (\n (?:\n (?<!:P5) # < This can maybe be removed because we\n \\s*:\\w+\n (?!\\s*:P5) # < include p5_regex above it\n )*\n )\n) # With the m or rx\n\\s*\n([{]) # Left curly brace",
"beginCaptures": {
"1": {
"name": "string.regexp.construct.perl6fe"
},
"2": {
@@ -518,17 +557,17 @@
},
"3": {
"name": "punctuation.definition.regexp.perl6fe"
}
},
- "end": "(?x) (?: (?<!\\\\)|(?<=\\\\\\\\) ) (/)",
+ "end": "(?x) (?: (?<!\\\\)|(?<=\\\\\\\\) ) (\\})",
"endCaptures": {
"1": {
"name": "punctuation.definition.regexp.perl6fe"
}
},
- "contentName": "string.regexp.perl6fe",
+ "contentName": "fstring.regexp.perl6fe",
"patterns": [
{
"include": "#interpolation"
},
{
@@ -613,10 +652,39 @@
"include": "source.quoting.perl6fe#q_hw_cornerbracket_string_content"
}
]
},
{
+ "begin": "(?x)\n(?<= ^|\\s )\n(?:\n (m|rx|s|S)\n (\n (?:\n (?<!:P5) # < This can maybe be removed because we\n \\s*:\\w+\n (?!\\s*:P5) # < include p5_regex above it\n )*\n )\n)\n\\s*\n([^#\\p{Ps}\\p{Pe}\\p{Pi}\\p{Pf}\\w'\\-<>\\-])",
+ "beginCaptures": {
+ "1": {
+ "name": "string.regexp.construct.perl6fe"
+ },
+ "2": {
+ "name": "entity.name.section.adverb.regexp.perl6fe"
+ },
+ "3": {
+ "name": "punctuation.definition.regexp.perl6fe"
+ }
+ },
+ "end": "(?x) (?: (?<!\\\\)|(?<=\\\\\\\\) ) (\\3)",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.regexp.perl6fe"
+ }
+ },
+ "contentName": "string.regexp.perl6fe",
+ "patterns": [
+ {
+ "include": "#interpolation"
+ },
+ {
+ "include": "source.regexp.perl6fe"
+ }
+ ]
+ },
+ {
"include": "#shellquotes"
},
{
"begin": "(?x) (?: ( qq|qqx|qqw ) \\s* ( (?:\\s*:\\w+)*\\s*: (?: to|heredoc ) )\\s* | (qqto) \\s* ( (?:\\s*:\\w+)* )\\s* ) / (\\S+) /",
"beginCaptures": {
@@ -642,28 +710,34 @@
"name": "entity.other.attribute-name.heredoc.delimiter.perl6fe"
}
},
"patterns": [
{
- "include": "#interpolation"
- },
- {
"begin": "(?<=/)",
"end": "\\n",
"patterns": [
{
"include": "$self"
}
],
"name": "meta.heredoc.continuation.perl6fe"
},
{
+ "begin": "^",
+ "end": "$",
+ "patterns": [
+ {
+ "include": "#interpolation"
+ }
+ ]
+ },
+ {
"match": "(?x) ^ (?: . | \\n )* $",
"name": "string.quoted.qq.heredoc.perl6fe"
}
],
- "name": "meta.heredoc.perl6fe"
+ "name": "string.quoted.heredoc.perl6fe"
},
{
"begin": "(?x) (?: ( [qQ](?!/)|qw|qww|qx|qqx ) \\s* ( (?:\\s*:\\w+)*\\s*: (?: to|heredoc ) )\\s* | (qto|Qto) \\s* ( (?:\\s*:\\w+)* )\\s* ) / (\\S+) /",
"beginCaptures": {
"1": {
@@ -867,11 +941,11 @@
"include": "source.quoting.perl6fe#q_bracket_string_content"
}
]
},
{
- "match": "(?x) ( [+:\\-.*/] | \\|\\| )? (?<! = ) = (?! [>=~] )",
+ "match": "(?x) (?: [+:\\-.*/] | \\|\\| )? (?<! = ) = (?! [>=~] )",
"name": "storage.modifier.assignment.perl6fe"
},
{
"begin": "(?x) (?<! \\+< | \\+\\s|\\+ ) \\s* (<) (?<! > ) (?= [^<]* (?: [^<] ) > )",
"beginCaptures": {
@@ -890,11 +964,11 @@
{
"match": "\\b(for|loop|repeat|while|until|gather|given)(?!\\-)\\b",
"name": "keyword.control.repeat.perl6fe"
},
{
- "match": "(?x)\n\\b (?<! [\\-:.] )\n(\n take|do|when|next|last|redo|return|return-rw\n |contend|maybe|defer|default|exit\n |continue|break|goto|leave|supply\n |async|lift|await|start|react|whenever|parse\n)\n(?! - ) \\b",
+ "match": "(?x)\n\\b (?<! [\\-:.] )\n(\n take|do|when|next|last|redo|return|return-rw\n |contend|maybe|defer|default|exit|quietly\n |continue|break|goto|leave|supply\n |async|lift|await|start|react|whenever|parse\n)\n(?! - ) \\b",
"name": "keyword.control.flowcontrol.perl6fe"
},
{
"match": "(?x)\n\\b (?<! [\\-:] )\n(\n make|made\n)\n(?! - ) \\b",
"name": "keyword.control.flowcontrol.regex.perl6fe"
@@ -910,11 +984,11 @@
{
"match": "\\b(?<![\\-:])(die|fail|try|warn)(?!\\-)\\b(?!\\s*=>)",
"name": "keyword.control.control-handlers.perl6fe"
},
{
- "match": "(?x)\\b(?<![\\-:])( prec|irs|ofs|ors|export|raw|deep |binary|unary|reparsed|rw|parsed |cached|readonly|defequiv|will |ref|copy|inline|tighter|looser |equiv|assoc|required )(?!\\-)\\b (?!\\s*=>)",
+ "match": "(?x)\\b(?<![\\-:])( prec|irs|ofs|ors|export|raw|deep |binary|unary|reparsed|rw|parsed |cached|readonly|defequiv|will |ref|copy|inline|tighter|looser |equiv|assoc|required|pure )(?!\\-)\\b (?!\\s*=>)",
"name": "entity.name.type.trait.perl6fe"
},
{
"match": "\\b(NaN|Inf)(?!\\-)\\b",
"name": "constant.numeric.perl6fe"
@@ -922,11 +996,11 @@
{
"match": "\\b(True|False)\\b",
"name": "constant.language.boolean.perl6fe"
},
{
- "match": "(?x)\\b(?<![\\-:])( fatal|internals|MONKEY\\-TYPING|nqp| strict|trace|worries|invocant|parameters|experimental| cur|soft|variables|attributes|v6(?:\\.\\w)*|lib|Test|NativeCall )(?!\\-) \\b (?!\\s*=>)",
+ "match": "(?x)\\b(?<![\\-:])( fatal|internals|MONKEY\\-TYPING|nqp|QAST| strict|trace|worries|invocant|parameters|experimental| cur|soft|variables|attributes|v6(?:\\.\\w)*|lib|Test|NativeCall )(?!\\-) \\b (?!\\s*=>)",
"name": "constant.language.pragma.perl6fe"
},
{
"match": "(?x)(?<![:\\-\\w]) (Backtrace|Exception|Failure|X) (?: \\:\\:[a-zA-Z]+ )* \\b",
"captures": {
@@ -934,11 +1008,11 @@
"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|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|IntStr|NumStr| RatStr|ComplexStr|CArray|Pointer|long|longlong )\\b (?!\\s*=>)",
+ "match": "(?x)\\b(?<!:)(\n AST|Any|Array|Associative|Attribute|Bag|BagHash|Baggy|\n Blob|Block|Bool|Callable|Capture|Channel|Code|Complex|Cool|\n CurrentThreadScheduler|Cursor|Date|DateTime|Dateish|Duration|\n Enum|FatRat|Grammar|Hash|IO|Instant|Iterable|\n Iterator|Junction|Label|List|Lock|Macro|Map|Match|Metamodel|\n Method|Mix|MixHash|Mixy|Mu|Nil|Numeric|ObjAt|Pair|\n Parameter|Pod|Positional|PositionalBindFailover|Proc|Promise|\n Proxy|QuantHash|Range|Rat|Rational|Real|Regex|Routine|Scheduler|\n Seq|Set|SetHash|Setty|Signature|Slip|Stash|Str|str|Stringy|Sub|\n Submethod|Supply|Tap|Temporal|Thread|ThreadPoolScheduler|\n Variable|Version|Whatever|WhateverCode|bool|size_t|\n Int|int|int1|int2|int4|int8|int16|int32|int64|\n Rat|rat|rat1|rat2|rat4|rat8|rat16|rat32|rat64|\n Buf|buf|buf1|buf2|buf4|buf8|buf16|buf32|buf64|\n UInt|uint|uint1|uint2|uint4|uint8|uint16|uint32|uint64|\n utf8|utf16|utf32|Num|num|num32|num64|IntStr|NumStr|\n RatStr|ComplexStr|CArray|Pointer|long|longlong|\n # These are for types which have sub types\n Order|More|Less|Same\n)\\b (?!\\s*=>)",
"captures": {
"1": {
"name": "support.type.perl6fe"
},
"2": {
@@ -974,11 +1048,11 @@
}
},
"name": "meta.operator.non.ligature.perl6fe"
},
{
- "match": "(?x) <== | <=> | => | --> | -> | \\+\\| | \\+\\+ | -- | \\*\\* | \\?\\?\\? | \\?\\? | \\!\\!\\! | \\!\\! | && | \\+\\^ | \\?\\^ | %% | \\+& | \\+< | \\+> | \\+\\^ | \\.\\.(?!\\.) | \\.\\.\\^ | \\^\\.\\. | \\^\\.\\.\\^ | \\?\\| | !=(?!\\=) | !==(?!\\=) | <=(?!>) | >= | === | == | =:= | ~~ | \\x{2245} | \\|\\| | \\^\\^ | \\/\\/ | := | ::= | \\.\\.\\.",
+ "match": "(?x) <== | ==> | <=> | => | --> | -> | \\+\\| | \\+\\+ | -- | \\*\\* | \\?\\?\\? | \\?\\? | \\!\\!\\! | \\!\\! | && | \\+\\^ | \\?\\^ | %% | \\+& | \\+< | \\+> | \\+\\^ | \\.\\.(?!\\.) | \\.\\.\\^ | \\^\\.\\. | \\^\\.\\.\\^ | \\?\\| | !=(?!\\=) | !==(?!\\=) | <=(?!>) | >= | === | == | =:= | ~~ | \\x{2245} | \\|\\| | \\^\\^ | \\/\\/ | := | ::= | \\.\\.\\.",
"name": "keyword.operator.multi-symbol.perl6fe"
},
{
"include": "#special_variables"
},
@@ -1000,19 +1074,28 @@
{
"match": "\\*\\s*(?=\\])",
"name": "constant.language.whatever.hack.perl6fe"
},
{
- "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|mkdir |normalize|pack|unpack|quotemeta|comb|samecase|sameaccent|chars |nfd|nfc|nfkd|nfkc|printf|sprintf|caller|evalfile|run|runinstead |nothing|want|bless|chr|ord|ords|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|cmp-ok |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|can-ok |postcircumfix|minmax|lazy|count|unwrap|getc|pi|tau|context|void |quasi|body|each|contains|rewinddir|subst|can|isa|flush|arity |assuming|rewind|callwith|callsame|nextwith|nextsame|attr|does-ok |eval-elsewhere|none|not|srand|so|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 |prepend|categorize|antipairs|categorize-list|parse-base|base |starts-with|ends-with|put|append|tail|\\x{03C0}|\\x{03C4}|\\x{212F} |get|words|new-from-pairs|uniname|uninames|uniprop|uniprops |slurp-rest|throw|break|keep|match )(?!\\-)\\b(?!\\s*=>)",
+ "match": "(?x)\\b(?<![\\-\\\\])( :: )?(exists)(?!\\-)\\b(?!\\s*=>)",
"captures": {
"1": {
"name": "keyword.operator.colon.perl6fe"
}
},
"name": "support.function.perl6fe"
},
{
+ "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|mkdir |normalize|pack|unpack|quotemeta|comb|samecase|sameaccent|chars |nfd|nfc|nfkd|nfkc|printf|sprintf|caller|evalfile|run|runinstead |nothing|want|bless|chr|ord|ords|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|cmp-ok |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|can-ok |postcircumfix|minmax|lazy|count|unwrap|getc|pi|tau|context|void |quasi|body|each|contains|rewinddir|subst|can|isa|flush|arity |assuming|rewind|callwith|callsame|nextwith|nextsame|attr|does-ok |eval-elsewhere|none|not|srand|so|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 |prepend|categorize|antipairs|categorize-list|parse-base|base |starts-with|ends-with|put|append|tail|\\x{03C0}|\\x{03C4}|\\x{212F} |get|words|new-from-pairs|uniname|uninames|uniprop|uniprops |slurp-rest|throw|break|keep|match|trim-leading|trim-trailing |is-lazy|pull-one|push-exactly|push-at-least|push-all|push-until-lazy |sink-all|skip-at-least|skip-at-least-pull-one )(?!\\-)\\b(?!\\s*=>)",
+ "captures": {
+ "1": {
+ "name": "keyword.operator.colon.perl6fe"
+ }
+ },
+ "name": "support.function.perl6fe"
+ },
+ {
"match": "(?x)\\b(?<![\\-:]|\\\\)(?<=\\.) (e|d|f|s|l|r|w|rw|x|rwx|z|abspath|basename|extension|dirname |watch|is-absolute|parts|volume|path|is-relative|parent|child |resolve|dir) (?!\\-)\\b(?!\\s*=>)",
"name": "support.function.perl6fe"
},
{
"include": "#numbers"
@@ -1074,11 +1157,11 @@
{
"match": "(?x)\n(?<= ^ | [=,;^\\s{\\[(/] | \\.\\. )\n[-−+]?\n0[bodx]\\w+",
"name": "constant.numeric.radix.perl6fe"
},
{
- "match": "(?x)\n (?<= ^ | [×÷*=,:;^\\s{\\[(/] | \\.\\. )\n (?: [+-−] )?\n(?:\n (?: \\d+ (?: [\\_\\d]+ \\d )? )\n (?: \\. \\d+ (?: [\\_\\d]+ \\d )? )?\n)\n(?: e (?:-|−)? \\d+ (?: [\\_\\d]+ \\d )? )?",
+ "match": "(?x)\n (?<= ^ | [×÷*=,:;^\\s{\\[(/] | \\.\\. | … )\n (?: \\^? [+-−] )?\n(?:\n (?: \\d+ (?: [\\_\\d]+ \\d )? )\n (?: \\. \\d+ (?: [\\_\\d]+ \\d )? )?\n)\n(?: e (?:-|−)? \\d+ (?: [\\_\\d]+ \\d )? )?",
"name": "constant.numeric.perl6fe"
},
{
"match": "(?x)\n (?<= ^ | [×÷*=,:;^\\s{\\[(/] | \\.\\. )\n (?: [+-−] )?\n(?:\n (?: \\. \\d+ (?: [\\_\\d]+ \\d )? )\n)\n(?: e (?:-|−)? \\d+ (?: [\\_\\d]+ \\d )? )?",
"name": "constant.numeric.perl6fe"
@@ -2251,10 +2334,10 @@
},
{
"include": "#regexp-variables"
},
{
- "begin": "(\\{)",
+ "begin": "(?x) (?<! m|rx|m:i|rx:i) (\\{)",
"beginCaptures": {
"1": {
"name": "punctuation.section.embedded.begin.perl6fe"
}
},
\ No newline at end of file