From acdb4e941a6c5006aea61a750716e5c31622151e Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 15 Feb 2017 11:38:41 +0100 Subject: [PATCH] [perl] update grammar --- extensions/perl/OSSREADME.json | 1 + extensions/perl/package.json | 7 +- extensions/perl/syntaxes/Perl 6.tmLanguage | 490 --- extensions/perl/syntaxes/Perl.plist | 3707 ----------------- extensions/perl/syntaxes/perl.tmLanguage.json | 2546 +++++++++++ .../perl/syntaxes/perl6.tmLanguage.json | 319 ++ 6 files changed, 2871 insertions(+), 4199 deletions(-) delete mode 100644 extensions/perl/syntaxes/Perl 6.tmLanguage delete mode 100644 extensions/perl/syntaxes/Perl.plist create mode 100644 extensions/perl/syntaxes/perl.tmLanguage.json create mode 100644 extensions/perl/syntaxes/perl6.tmLanguage.json diff --git a/extensions/perl/OSSREADME.json b/extensions/perl/OSSREADME.json index 18c0332c143..f7bae4f235b 100644 --- a/extensions/perl/OSSREADME.json +++ b/extensions/perl/OSSREADME.json @@ -4,6 +4,7 @@ "version": "0.0.0", "license": "TextMate Bundle License", "repositoryURL": "https://github.com/textmate/perl.tmbundle", + "description": "The files syntaxes/perl.tmLanguage.json and syntaxes/perl6.tmLanguage.json were derived from Perl.plist and Perl 6.tmLanguage from https://github.com/textmate/perl.tmbundle.", "licenseDetail": [ "Copyright (c) textmate-perl.tmbundle project authors", "", diff --git a/extensions/perl/package.json b/extensions/perl/package.json index 9b141930dd0..1e230765ac9 100644 --- a/extensions/perl/package.json +++ b/extensions/perl/package.json @@ -3,6 +3,9 @@ "version": "0.1.0", "publisher": "vscode", "engines": { "vscode": "*" }, + "scripts": { + "update-grammar": "node ../../build/npm/update-grammar.js textmate/perl.tmbundle Syntaxes/Perl.plist ./syntaxes/perl.tmLanguage.json Syntaxes/Perl%206.tmLanguage ./syntaxes/perl6.tmLanguage.json" + }, "contributes": { "languages": [{ "id": "perl", @@ -20,11 +23,11 @@ "grammars": [{ "language": "perl", "scopeName": "source.perl", - "path": "./syntaxes/Perl.plist" + "path": "./syntaxes/perl.tmLanguage.json" }, { "language": "perl6", "scopeName": "source.perl.6", - "path": "./syntaxes/Perl 6.tmLanguage" + "path": "./syntaxes/perl.tmLanguage.json" }] } } \ No newline at end of file diff --git a/extensions/perl/syntaxes/Perl 6.tmLanguage b/extensions/perl/syntaxes/Perl 6.tmLanguage deleted file mode 100644 index a70f908c2bc..00000000000 --- a/extensions/perl/syntaxes/Perl 6.tmLanguage +++ /dev/null @@ -1,490 +0,0 @@ - - - - - fileTypes - - p6 - pl6 - pm6 - nqp - - firstLineMatch - (^#!.*\b(perl6|nqp)\b)|use\s+v6 - keyEquivalent - ^~P - name - Perl 6 - patterns - - - begin - ^=begin - end - ^=end - name - comment.block.perl - - - begin - (^[ \t]+)?(?=#) - beginCaptures - - 1 - - name - punctuation.whitespace.comment.leading.perl - - - end - (?!\G) - patterns - - - begin - # - beginCaptures - - 0 - - name - punctuation.definition.comment.perl - - - end - \n - name - comment.line.number-sign.perl - - - - - captures - - 1 - - name - storage.type.class.perl.6 - - 3 - - name - entity.name.type.class.perl.6 - - - match - (class|enum|grammar|knowhow|module|package|role|slang|subset)(\s+)(((?:::|')?(?:([a-zA-Z_\x{C0}-\x{FF}\$])([a-zA-Z0-9_\x{C0}-\x{FF}\\$]|[\-'][a-zA-Z0-9_\x{C0}-\x{FF}\$])*))+) - name - meta.class.perl.6 - - - begin - (?<=\s)' - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - ' - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.quoted.single.perl - patterns - - - match - \\['\\] - name - constant.character.escape.perl - - - - - begin - " - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - " - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.quoted.double.perl - patterns - - - match - \\[abtnfre"\\] - name - constant.character.escape.perl - - - - - begin - q(q|to|heredoc)*\s*:?(q|to|heredoc)*\s*/(.+)/ - end - \3 - name - string.quoted.single.heredoc.perl - - - begin - (q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\s*{{ - end - }} - name - string.quoted.double.heredoc.brace.perl - patterns - - - include - #qq_brace_string_content - - - - - begin - (q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\s*\(\( - end - \)\) - name - string.quoted.double.heredoc.paren.perl - patterns - - - include - #qq_paren_string_content - - - - - begin - (q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\s*\[\[ - end - \]\] - name - string.quoted.double.heredoc.bracket.perl - patterns - - - include - #qq_bracket_string_content - - - - - begin - (q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\s*{ - end - } - name - string.quoted.single.heredoc.brace.perl - patterns - - - include - #qq_brace_string_content - - - - - begin - (q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\s*/ - end - / - name - string.quoted.single.heredoc.slash.perl - patterns - - - include - #qq_slash_string_content - - - - - begin - (q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\s*\( - end - \) - name - string.quoted.single.heredoc.paren.perl - patterns - - - include - #qq_paren_string_content - - - - - begin - (q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\s*\[ - end - \] - name - string.quoted.single.heredoc.bracket.perl - patterns - - - include - #qq_bracket_string_content - - - - - begin - (q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\s*' - end - ' - name - string.quoted.single.heredoc.single.perl - patterns - - - include - #qq_single_string_content - - - - - begin - (q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\s*" - end - " - name - string.quoted.single.heredoc.double.perl - patterns - - - include - #qq_double_string_content - - - - - match - \b\$\w+\b - name - variable.other.perl - - - match - \b(macro|sub|submethod|method|multi|proto|only|rule|token|regex|category)\b - name - storage.type.declare.routine.perl - - - match - \b(self)\b - name - variable.language.perl - - - match - \b(use|require)\b - name - keyword.other.include.perl - - - match - \b(if|else|elsif|unless)\b - name - keyword.control.conditional.perl - - - match - \b(let|my|our|state|temp|has|constant)\b - name - storage.type.variable.perl - - - match - \b(for|loop|repeat|while|until|gather|given)\b - name - keyword.control.repeat.perl - - - match - \b(take|do|when|next|last|redo|return|contend|maybe|defer|default|exit|make|continue|break|goto|leave|async|lift)\b - name - keyword.control.flowcontrol.perl - - - match - \b(is|as|but|trusts|of|returns|handles|where|augment|supersede)\b - name - storage.modifier.type.constraints.perl - - - match - \b(BEGIN|CHECK|INIT|START|FIRST|ENTER|LEAVE|KEEP|UNDO|NEXT|LAST|PRE|POST|END|CATCH|CONTROL|TEMP)\b - name - meta.function.perl - - - match - \b(die|fail|try|warn)\b - name - keyword.control.control-handlers.perl - - - match - \b(prec|irs|ofs|ors|export|deep|binary|unary|reparsed|rw|parsed|cached|readonly|defequiv|will|ref|copy|inline|tighter|looser|equiv|assoc|required)\b - name - storage.modifier.perl - - - match - \b(NaN|Inf)\b - name - constant.numeric.perl - - - match - \b(oo|fatal)\b - name - keyword.other.pragma.perl - - - match - \b(Object|Any|Junction|Whatever|Capture|MatchSignature|Proxy|Matcher|Package|Module|ClassGrammar|Scalar|Array|Hash|KeyHash|KeySet|KeyBagPair|List|Seq|Range|Set|Bag|Mapping|Void|UndefFailure|Exception|Code|Block|Routine|Sub|MacroMethod|Submethod|Regex|Str|str|Blob|Char|ByteCodepoint|Grapheme|StrPos|StrLen|Version|NumComplex|num|complex|Bit|bit|bool|True|FalseIncreasing|Decreasing|Ordered|Callable|AnyCharPositional|Associative|Ordering|KeyExtractorComparator|OrderingPair|IO|KitchenSink|RoleInt|int|int1|int2|int4|int8|int16|int32|int64Rat|rat|rat1|rat2|rat4|rat8|rat16|rat32|rat64Buf|buf|buf1|buf2|buf4|buf8|buf16|buf32|buf64UInt|uint|uint1|uint2|uint4|uint8|uint16|uint32uint64|Abstraction|utf8|utf16|utf32)\b - name - support.type.perl6 - - - match - \b(div|xx|x|mod|also|leg|cmp|before|after|eq|ne|le|lt|not|gt|ge|eqv|ff|fff|and|andthen|or|xor|orelse|extra|lcm|gcd)\b - name - keyword.operator.perl - - - match - (\$|@|%|&)(\*|:|!|\^|~|=|\?|(<(?=.+>)))?([a-zA-Z_\x{C0}-\x{FF}\$])([a-zA-Z0-9_\x{C0}-\x{FF}\$]|[\-'][a-zA-Z0-9_\x{C0}-\x{FF}\$])* - name - variable.other.identifier.perl.6 - - - match - \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|p5chop|chomp|p5chomp|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|uniq|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|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|WHERE|HOW|WHICH|VAR|WHO|WHENCE|ACCEPTS|REJECTS|not|true|iterator|by|re|im|invert|flip|gist|flat|tree|is-prime|throws_like|trans)\b - name - support.function.perl - - - repository - - qq_brace_string_content - - begin - { - end - } - patterns - - - include - #qq_brace_string_content - - - - qq_bracket_string_content - - begin - \[ - end - \] - patterns - - - include - #qq_bracket_string_content - - - - qq_double_string_content - - begin - " - end - " - patterns - - - include - #qq_double_string_content - - - - qq_paren_string_content - - begin - \( - end - \) - patterns - - - include - #qq_paren_string_content - - - - qq_single_string_content - - begin - ' - end - ' - patterns - - - include - #qq_single_string_content - - - - qq_slash_string_content - - begin - \\/ - end - \\/ - patterns - - - include - #qq_slash_string_content - - - - - scopeName - source.perl.6 - uuid - E685440C-0E20-4424-9693-864D5240A269 - - \ No newline at end of file diff --git a/extensions/perl/syntaxes/Perl.plist b/extensions/perl/syntaxes/Perl.plist deleted file mode 100644 index 9b608d3030e..00000000000 --- a/extensions/perl/syntaxes/Perl.plist +++ /dev/null @@ -1,3707 +0,0 @@ - - - - - comment - - TODO: Include RegExp syntax - - fileTypes - - pl - pm - pod - t - PL - psgi - vcl - - firstLineMatch - ^#!.*\bperl\b - keyEquivalent - ^~P - name - Perl - patterns - - - include - #line_comment - - - begin - ^= - captures - - 0 - - name - punctuation.definition.comment.perl - - - end - ^=cut - name - comment.block.documentation.perl - - - include - #variable - - - applyEndPatternLast - 1 - begin - \b(?=qr\s*[^\s\w]) - comment - string.regexp.compile.perl - end - ((([egimosxradlupc]*)))(?=(\s+\S|\s*[;\,\#\{\}\)]|\s*$)) - endCaptures - - 1 - - name - string.regexp.compile.perl - - 2 - - name - punctuation.definition.string.perl - - 3 - - name - keyword.control.regexp-option.perl - - - patterns - - - begin - (qr)\s*\{ - captures - - 0 - - name - punctuation.definition.string.perl - - 1 - - name - support.function.perl - - - end - \} - name - string.regexp.compile.nested_braces.perl - patterns - - - include - #escaped_char - - - include - #variable - - - include - #nested_braces_interpolated - - - - - begin - (qr)\s*\[ - captures - - 0 - - name - punctuation.definition.string.perl - - 1 - - name - support.function.perl - - - end - \] - name - string.regexp.compile.nested_brackets.perl - patterns - - - include - #escaped_char - - - include - #variable - - - include - #nested_brackets_interpolated - - - - - begin - (qr)\s*< - captures - - 0 - - name - punctuation.definition.string.perl - - 1 - - name - support.function.perl - - - end - > - name - string.regexp.compile.nested_ltgt.perl - patterns - - - include - #escaped_char - - - include - #variable - - - include - #nested_ltgt_interpolated - - - - - begin - (qr)\s*\( - captures - - 0 - - name - punctuation.definition.string.perl - - 1 - - name - support.function.perl - - - end - \) - name - string.regexp.compile.nested_parens.perl - patterns - - - comment - This is to prevent thinks like qr/foo$/ to treat $/ as a variable - match - \$(?=[^\s\w\\'\{\[\(\<]) - - - include - #escaped_char - - - include - #variable - - - include - #nested_parens_interpolated - - - - - begin - (qr)\s*' - captures - - 0 - - name - punctuation.definition.string.perl - - 1 - - name - support.function.perl - - - end - ' - name - string.regexp.compile.single-quote.perl - patterns - - - include - #escaped_char - - - - - begin - (qr)\s*([^\s\w'\{\[\(\<]) - captures - - 0 - - name - punctuation.definition.string.perl - - 1 - - name - support.function.perl - - - end - \2 - name - string.regexp.compile.simple-delimiter.perl - patterns - - - comment - This is to prevent thinks like qr/foo$/ to treat $/ as a variable - match - \$(?=[^\s\w'\{\[\(\<]) - name - keyword.control.anchor.perl - - - include - #escaped_char - - - include - #variable - - - include - #nested_parens_interpolated - - - - - - - applyEndPatternLast - 1 - begin - (?<!\{|\+|\-)\b(?=m\s*[^\sa-zA-Z0-9]) - comment - string.regexp.find-m.perl - end - ((([egimosxradlupc]*)))(?=(\s+\S|\s*[;\,\#\{\}\)]|\s*$)) - endCaptures - - 1 - - name - string.regexp.find-m.perl - - 2 - - name - punctuation.definition.string.perl - - 3 - - name - keyword.control.regexp-option.perl - - - patterns - - - begin - (m)\s*\{ - captures - - 0 - - name - punctuation.definition.string.perl - - 1 - - name - support.function.perl - - - end - \} - name - string.regexp.find-m.nested_braces.perl - patterns - - - include - #escaped_char - - - include - #variable - - - include - #nested_braces_interpolated - - - - - begin - (m)\s*\[ - captures - - 0 - - name - punctuation.definition.string.perl - - 1 - - name - support.function.perl - - - end - \] - name - string.regexp.find-m.nested_brackets.perl - patterns - - - include - #escaped_char - - - include - #variable - - - include - #nested_brackets_interpolated - - - - - begin - (m)\s*< - captures - - 0 - - name - punctuation.definition.string.perl - - 1 - - name - support.function.perl - - - end - > - name - string.regexp.find-m.nested_ltgt.perl - patterns - - - include - #escaped_char - - - include - #variable - - - include - #nested_ltgt_interpolated - - - - - begin - (m)\s*\( - captures - - 0 - - name - punctuation.definition.string.perl - - 1 - - name - support.function.perl - - - end - \) - name - string.regexp.find-m.nested_parens.perl - patterns - - - include - #escaped_char - - - include - #variable - - - include - #nested_parens_interpolated - - - - - begin - (m)\s*' - captures - - 0 - - name - punctuation.definition.string.perl - - 1 - - name - support.function.perl - - - end - ' - name - string.regexp.find-m.single-quote.perl - patterns - - - include - #escaped_char - - - - - begin - (?<!\{|\+|\-)(m)\s*([^\sa-zA-Z0-9'\{\[\(\<]) - captures - - 0 - - name - punctuation.definition.string.perl - - 1 - - name - support.function.perl - - - end - \2 - name - string.regexp.find-m.simple-delimiter.perl - patterns - - - comment - This is to prevent thinks like qr/foo$/ to treat $/ as a variable - match - \$(?=[^\sa-zA-Z0-9'\{\[\(\<]) - name - keyword.control.anchor.perl - - - include - #escaped_char - - - include - #variable - - - begin - \[ - beginCaptures - - 1 - - name - punctuation.definition.character-class.begin.perl - - - end - \] - endCaptures - - 1 - - name - punctuation.definition.character-class.end.perl - - - name - constant.other.character-class.set.perl - patterns - - - comment - This is to prevent thinks like qr/foo$/ to treat $/ as a variable - match - \$(?=[^\s\w'\{\[\(\<]) - name - keyword.control.anchor.perl - - - include - #escaped_char - - - - - include - #nested_parens_interpolated - - - - - - - applyEndPatternLast - 1 - begin - \b(?=(?<!\&)(s)(\s+\S|\s*[;\,\#\{\}\(\)\[<]|$)) - comment - string.regexp.replace.perl - end - ((([egimosxradlupc]*)))(?=(\s+\S|\s*[;\,\#\{\}\)\]>]|\s*$)) - endCaptures - - 1 - - name - string.regexp.replace.perl - - 2 - - name - punctuation.definition.string.perl - - 3 - - name - keyword.control.regexp-option.perl - - - patterns - - - begin - (s)\s*\{ - captures - - 0 - - name - punctuation.definition.string.perl - - 1 - - name - support.function.perl - - - end - \} - name - string.regexp.nested_braces.perl - patterns - - - include - #escaped_char - - - include - #nested_braces - - - - - begin - (s)\s*\[ - captures - - 0 - - name - punctuation.definition.string.perl - - 1 - - name - support.function.perl - - - end - \] - name - string.regexp.nested_brackets.perl - patterns - - - include - #escaped_char - - - include - #nested_brackets - - - - - begin - (s)\s*< - captures - - 0 - - name - punctuation.definition.string.perl - - 1 - - name - support.function.perl - - - end - > - name - string.regexp.nested_ltgt.perl - patterns - - - include - #escaped_char - - - include - #nested_ltgt - - - - - begin - (s)\s*\( - captures - - 0 - - name - punctuation.definition.string.perl - - 1 - - name - support.function.perl - - - end - \) - name - string.regexp.nested_parens.perl - patterns - - - include - #escaped_char - - - include - #nested_parens - - - - - begin - \{ - captures - - 0 - - name - punctuation.definition.string.perl - - - end - \} - name - string.regexp.format.nested_braces.perl - patterns - - - include - #escaped_char - - - include - #variable - - - include - #nested_braces_interpolated - - - - - begin - \[ - captures - - 0 - - name - punctuation.definition.string.perl - - - end - \] - name - string.regexp.format.nested_brackets.perl - patterns - - - include - #escaped_char - - - include - #variable - - - include - #nested_brackets_interpolated - - - - - begin - < - captures - - 0 - - name - punctuation.definition.string.perl - - - end - > - name - string.regexp.format.nested_ltgt.perl - patterns - - - include - #escaped_char - - - include - #variable - - - include - #nested_ltgt_interpolated - - - - - begin - \( - captures - - 0 - - name - punctuation.definition.string.perl - - - end - \) - name - string.regexp.format.nested_parens.perl - patterns - - - include - #escaped_char - - - include - #variable - - - include - #nested_parens_interpolated - - - - - begin - ' - captures - - 0 - - name - punctuation.definition.string.perl - - - end - ' - name - string.regexp.format.single_quote.perl - patterns - - - match - \\['\\] - name - constant.character.escape.perl - - - - - begin - ([^\s\w\[({<;]) - captures - - 0 - - name - punctuation.definition.string.perl - - - end - \1 - name - string.regexp.format.simple_delimiter.perl - patterns - - - include - #escaped_char - - - include - #variable - - - - - match - \s+ - - - - - begin - \b(?=s([^\sa-zA-Z0-9\[({<]).*\1([egimosxradlupc]*)([\}\)\;\,]|\s+)) - comment - string.regexp.replaceXXX - end - ((([egimosxradlupc]*)))(?=([\}\)\;\,]|\s+|$)) - endCaptures - - 1 - - name - string.regexp.replace.perl - - 2 - - name - punctuation.definition.string.perl - - 3 - - name - keyword.control.regexp-option.perl - - - patterns - - - begin - (s\s*)([^\sa-zA-Z0-9\[({<]) - captures - - 0 - - name - punctuation.definition.string.perl - - 1 - - name - support.function.perl - - - end - (?=\2) - name - string.regexp.replaceXXX.simple_delimiter.perl - patterns - - - include - #escaped_char - - - - - begin - ' - captures - - 0 - - name - punctuation.definition.string.perl - - - end - ' - name - string.regexp.replaceXXX.format.single_quote.perl - patterns - - - match - \\['\\] - name - constant.character.escape.perl.perl - - - - - begin - ([^\sa-zA-Z0-9\[({<]) - captures - - 0 - - name - punctuation.definition.string.perl - - - end - \1 - name - string.regexp.replaceXXX.format.simple_delimiter.perl - patterns - - - include - #escaped_char - - - include - #variable - - - - - - - begin - \b(?=(?<!\\)s\s*([^\s\w\[({<>])) - comment - string.regexp.replace.extended - end - ((([egimosradlupc]*x[egimosradlupc]*)))\b - endCaptures - - 1 - - name - string.regexp.replace.perl - - 2 - - name - punctuation.definition.string.perl - - 3 - - name - keyword.control.regexp-option.perl - - - patterns - - - begin - (s)\s*(.) - captures - - 0 - - name - punctuation.definition.string.perl - - 1 - - name - support.function.perl - - - end - (?=\2) - name - string.regexp.replace.extended.simple_delimiter.perl - patterns - - - include - #escaped_char - - - - - begin - ' - captures - - 0 - - name - punctuation.definition.string.perl - - - end - '(?=[egimosradlupc]*x[egimosradlupc]*)\b - name - string.regexp.replace.extended.simple_delimiter.perl - patterns - - - include - #escaped_char - - - - - begin - (.) - captures - - 0 - - name - punctuation.definition.string.perl - - - end - \1(?=[egimosradlupc]*x[egimosradlupc]*)\b - name - string.regexp.replace.extended.simple_delimiter.perl - patterns - - - include - #escaped_char - - - include - #variable - - - - - - - begin - (?<=\(|\{|~|&)\s*((\/)) - beginCaptures - - 1 - - name - string.regexp.find.perl - - 2 - - name - punctuation.definition.string.perl - - - contentName - string.regexp.find.perl - end - ((\1([egimosxradlupc]*)))(?=(\s+\S|\s*[;\,\#\{\}\)]|\s*$)) - endCaptures - - 1 - - name - string.regexp.find.perl - - 2 - - name - punctuation.definition.string.perl - - 3 - - name - keyword.control.regexp-option.perl - - - patterns - - - comment - This is to prevent thinks like /foo$/ to treat $/ as a variable - match - \$(?=\/) - name - keyword.control.anchor.perl - - - include - #escaped_char - - - include - #variable - - - - - captures - - 1 - - name - constant.other.key.perl - - - match - \b(\w+)\s*(?==>) - - - match - (?<={)\s*\w+\s*(?=}) - name - constant.other.bareword.perl - - - captures - - 1 - - name - keyword.control.perl - - 2 - - name - entity.name.type.class.perl - - - match - ^\s*(package)\s+([^\s;]+) - name - meta.class.perl - - - captures - - 1 - - name - storage.type.sub.perl - - 2 - - name - entity.name.function.perl - - 3 - - name - storage.type.method.perl - - - match - \b(sub)(?:\s+([-a-zA-Z0-9_]+))?\s*(?:\([\$\@\*;]*\))?[^\w\{] - name - meta.function.perl - - - captures - - 1 - - name - entity.name.function.perl - - 2 - - name - punctuation.definition.parameters.perl - - 3 - - name - variable.parameter.function.perl - - - match - ^\s*(BEGIN|UNITCHECK|CHECK|INIT|END|DESTROY)\b - name - meta.function.perl - - - begin - ^(?=(\t| {4})) - end - (?=[^\t\s]) - name - meta.leading-tabs - patterns - - - captures - - 1 - - name - meta.odd-tab - - 2 - - name - meta.even-tab - - - match - (\t| {4})(\t| {4})? - - - - - captures - - 1 - - name - support.function.perl - - 2 - - name - punctuation.definition.string.perl - - 5 - - name - punctuation.definition.string.perl - - 8 - - name - punctuation.definition.string.perl - - - match - \b(tr|y)\s*([^A-Za-z0-9\s])(.*?)(?<!\\)(\\{2})*(\2)(.*?)(?<!\\)(\\{2})*(\2) - name - string.regexp.replace.perl - - - match - \b(__FILE__|__LINE__|__PACKAGE__|__SUB__)\b - name - constant.language.perl - - - begin - \b(__DATA__|__END__)\n? - beginCaptures - - 1 - - name - constant.language.perl - - - contentName - text.plain - end - \z - - - match - (?<!->)\b(continue|die|do|else|elsif|exit|for|foreach|goto|if|last|next|redo|return|select|unless|until|wait|while|switch|case|require|use|eval)\b - name - keyword.control.perl - - - match - \b(my|our|local)\b - name - storage.modifier.perl - - - match - (?<!\w)\-[rwx0RWXOezsfdlpSbctugkTBMAC]\b - name - keyword.operator.filetest.perl - - - match - \b(and|or|xor|as|not)\b - name - keyword.operator.logical.perl - - - match - (<=>|=>|->) - name - keyword.operator.comparison.perl - - - begin - (((<<) *"HTML"))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.doublequote.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 4 - - patterns - - - include - $self - - - - - contentName - text.html.embedded.perl - end - (^HTML$) - patterns - - - include - #escaped_char - - - include - #variable - - - include - text.html.basic - - - - - begin - (((<<) *"XML"))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.doublequote.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 4 - - patterns - - - include - $self - - - - - contentName - text.xml.embedded.perl - end - (^XML$) - patterns - - - include - #escaped_char - - - include - #variable - - - include - text.xml - - - - - begin - (((<<) *"CSS"))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.doublequote.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 4 - - patterns - - - include - $self - - - - - contentName - text.css.embedded.perl - end - (^CSS$) - patterns - - - include - #escaped_char - - - include - #variable - - - include - source.css - - - - - begin - (((<<) *"JAVASCRIPT"))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.doublequote.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 4 - - patterns - - - include - $self - - - - - contentName - text.js.embedded.perl - end - (^JAVASCRIPT$) - patterns - - - include - #escaped_char - - - include - #variable - - - include - source.js - - - - - begin - (((<<) *"SQL"))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.doublequote.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 4 - - patterns - - - include - $self - - - - - contentName - source.sql.embedded.perl - end - (^SQL$) - patterns - - - include - #escaped_char - - - include - #variable - - - include - source.sql - - - - - begin - (((<<) *"POSTSCRIPT"))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.doublequote.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 4 - - patterns - - - include - $self - - - - - contentName - text.postscript.embedded.perl - end - (^POSTSCRIPT$) - patterns - - - include - #escaped_char - - - include - #variable - - - include - source.postscript - - - - - begin - (((<<) *"([^"]*)"))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.doublequote.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 4 - - patterns - - - include - $self - - - - - contentName - string.unquoted.heredoc.doublequote.perl - end - (^\4$) - patterns - - - include - #escaped_char - - - include - #variable - - - - - begin - (((<<) *'HTML'))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.quote.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 4 - - patterns - - - include - $self - - - - - contentName - text.html.embedded.perl - end - (^HTML$) - patterns - - - include - text.html.basic - - - - - begin - (((<<) *'XML'))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.quote.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 4 - - patterns - - - include - $self - - - - - contentName - text.xml.embedded.perl - end - (^XML$) - patterns - - - include - text.xml - - - - - begin - (((<<) *'CSS'))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.quote.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 4 - - patterns - - - include - $self - - - - - contentName - text.css.embedded.perl - end - (^CSS$) - patterns - - - include - source.css - - - - - begin - (((<<) *'JAVASCRIPT'))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.quote.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 4 - - patterns - - - include - $self - - - - - contentName - text.js.embedded.perl - end - (^JAVASCRIPT$) - patterns - - - include - source.js - - - - - begin - (((<<) *'SQL'))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.quote.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 4 - - patterns - - - include - $self - - - - - contentName - source.sql.embedded.perl - end - (^SQL$) - patterns - - - include - source.sql - - - - - begin - (((<<) *'POSTSCRIPT'))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.quote.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 4 - - patterns - - - include - $self - - - - - contentName - source.postscript.embedded.perl - end - (^POSTSCRIPT$) - patterns - - - include - source.postscript - - - - - begin - (((<<) *'([^']*)'))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.quote.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 4 - - patterns - - - include - $self - - - - - contentName - string.unquoted.heredoc.quote.perl - end - (^\4$) - - - begin - (((<<) *\\((?![=\d\$\( ])[^;,'"`\s\)]*)))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.quote.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 4 - - patterns - - - include - $self - - - - - contentName - string.unquoted.heredoc.quote.perl - end - (^\4$) - - - begin - (((<<) *`([^`]*)`))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.backtick.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 4 - - patterns - - - include - $self - - - - - contentName - string.unquoted.heredoc.backtick.perl - end - (^\4$) - patterns - - - include - #escaped_char - - - include - #variable - - - - - begin - (((<<) *HTML\b))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 4 - - patterns - - - include - $self - - - - - contentName - text.html.embedded.perl - end - (^HTML$) - patterns - - - include - #escaped_char - - - include - #variable - - - include - text.html.basic - - - - - begin - (((<<) *XML\b))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 4 - - patterns - - - include - $self - - - - - contentName - text.xml.embedded.perl - end - (^XML$) - patterns - - - include - #escaped_char - - - include - #variable - - - include - text.xml - - - - - begin - (((<<) *JAVASCRIPT\b))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 4 - - patterns - - - include - $self - - - - - contentName - source.js.embedded.perl - end - (^JAVASCRIPT$) - patterns - - - include - #escaped_char - - - include - #variable - - - include - source.js - - - - - begin - (((<<) *SQL\b))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 4 - - patterns - - - include - $self - - - - - contentName - source.sql.embedded.perl - end - (^SQL$) - patterns - - - include - #escaped_char - - - include - #variable - - - include - source.sql - - - - - begin - (((<<) *POSTSCRIPT\b))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 4 - - patterns - - - include - $self - - - - - contentName - source.postscript.embedded.perl - end - (^POSTSCRIPT$) - patterns - - - include - #escaped_char - - - include - #variable - - - include - source.postscript - - - - - begin - (((<<) *((?![=\d\$\( ])[^;,'"`\s\)]*)))(.*)\n? - captures - - 1 - - name - punctuation.definition.string.perl - - 2 - - name - string.unquoted.heredoc.perl - - 3 - - name - punctuation.definition.heredoc.perl - - 5 - - patterns - - - include - $self - - - - - contentName - string.unquoted.heredoc.perl - end - (^\4$) - patterns - - - include - #escaped_char - - - include - #variable - - - - - begin - \bqq\s*([^\(\{\[\<\w\s]) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - \1 - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.quoted.other.qq.perl - patterns - - - include - #escaped_char - - - include - #variable - - - - - begin - \bqx\s*([^'\(\{\[\<\w\s]) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - \1 - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.interpolated.qx.perl - patterns - - - include - #escaped_char - - - include - #variable - - - - - begin - \bqx\s*' - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - ' - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.interpolated.qx.single-quote.perl - patterns - - - include - #escaped_char - - - - - begin - " - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - " - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.quoted.double.perl - patterns - - - include - #escaped_char - - - include - #variable - - - - - begin - (?<!->)\bqw?\s*([^\(\{\[\<\w\s]) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - \1 - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.quoted.other.q.perl - - - begin - ' - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - ' - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.quoted.single.perl - patterns - - - match - \\['\\] - name - constant.character.escape.perl - - - - - begin - ` - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - ` - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.interpolated.perl - patterns - - - include - #escaped_char - - - include - #variable - - - - - begin - (?<!->)\bqq\s*\( - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - \) - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.quoted.other.qq-paren.perl - patterns - - - include - #escaped_char - - - include - #nested_parens_interpolated - - - include - #variable - - - - - begin - \bqq\s*\{ - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - \} - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.quoted.other.qq-brace.perl - patterns - - - include - #escaped_char - - - include - #nested_braces_interpolated - - - include - #variable - - - - - begin - \bqq\s*\[ - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - \] - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.quoted.other.qq-bracket.perl - patterns - - - include - #escaped_char - - - include - #nested_brackets_interpolated - - - include - #variable - - - - - begin - \bqq\s*\< - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - \> - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.quoted.other.qq-ltgt.perl - patterns - - - include - #escaped_char - - - include - #nested_ltgt_interpolated - - - include - #variable - - - - - begin - (?<!->)\bqx\s*\( - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - \) - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.interpolated.qx-paren.perl - patterns - - - include - #escaped_char - - - include - #nested_parens_interpolated - - - include - #variable - - - - - begin - \bqx\s*\{ - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - \} - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.interpolated.qx-brace.perl - patterns - - - include - #escaped_char - - - include - #nested_braces_interpolated - - - include - #variable - - - - - begin - \bqx\s*\[ - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - \] - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.interpolated.qx-bracket.perl - patterns - - - include - #escaped_char - - - include - #nested_brackets_interpolated - - - include - #variable - - - - - begin - \bqx\s*\< - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - \> - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.interpolated.qx-ltgt.perl - patterns - - - include - #escaped_char - - - include - #nested_ltgt_interpolated - - - include - #variable - - - - - begin - (?<!->)\bqw?\s*\( - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - \) - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.quoted.other.q-paren.perl - patterns - - - include - #nested_parens - - - - - begin - \bqw?\s*\{ - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - \} - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.quoted.other.q-brace.perl - patterns - - - include - #nested_braces - - - - - begin - \bqw?\s*\[ - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - \] - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.quoted.other.q-bracket.perl - patterns - - - include - #nested_brackets - - - - - begin - \bqw?\s*\< - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - \> - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.quoted.other.q-ltgt.perl - patterns - - - include - #nested_ltgt - - - - - begin - ^__\w+__ - beginCaptures - - 0 - - name - punctuation.definition.string.begin.perl - - - end - $ - endCaptures - - 0 - - name - punctuation.definition.string.end.perl - - - name - string.unquoted.program-block.perl - - - begin - \b(format)\s+(\w+)\s*= - beginCaptures - - 1 - - name - support.function.perl - - 2 - - name - entity.name.function.format.perl - - - end - ^\.\s*$ - name - meta.format.perl - patterns - - - include - #line_comment - - - include - #variable - - - - - captures - - 1 - - name - support.function.perl - - 2 - - name - entity.name.function.perl - - - match - \b(x)\s*(\d+)\b - - - match - \b(ARGV|DATA|ENV|SIG|STDERR|STDIN|STDOUT|atan2|bind|binmode|bless|caller|chdir|chmod|chomp|chop|chown|chr|chroot|close|closedir|cmp|connect|cos|crypt|dbmclose|dbmopen|defined|delete|dump|each|endgrent|endhostent|endnetent|endprotoent|endpwent|endservent|eof|eq|eval|exec|exists|exp|fcntl|fileno|flock|fork|formline|ge|getc|getgrent|getgrgid|getgrnam|gethostbyaddr|gethostbyname|gethostent|getlogin|getnetbyaddr|getnetbyname|getnetent|getpeername|getpgrp|getppid|getpriority|getprotobyname|getprotobynumber|getprotoent|getpwent|getpwnam|getpwuid|getservbyname|getservbyport|getservent|getsockname|getsockopt|glob|gmtime|grep|gt|hex|import|index|int|ioctl|join|keys|kill|lc|lcfirst|le|length|link|listen|local|localtime|log|lstat|lt|m|map|mkdir|msgctl|msgget|msgrcv|msgsnd|ne|no|oct|open|opendir|ord|pack|pipe|pop|pos|print|printf|push|quotemeta|rand|read|readdir|readlink|recv|ref|rename|reset|reverse|rewinddir|rindex|rmdir|s|scalar|seek|seekdir|semctl|semget|semop|send|setgrent|sethostent|setnetent|setpgrp|setpriority|setprotoent|setpwent|setservent|setsockopt|shift|shmctl|shmget|shmread|shmwrite|shutdown|sin|sleep|socket|socketpair|sort|splice|split|sprintf|sqrt|srand|stat|study|substr|symlink|syscall|sysopen|sysread|system|syswrite|tell|telldir|tie|tied|time|times|tr|truncate|uc|ucfirst|umask|undef|unlink|unpack|unshift|untie|utime|values|vec|waitpid|wantarray|warn|write|y)\b - name - support.function.perl - - - captures - - 1 - - name - punctuation.section.scope.begin.perl - - 2 - - name - punctuation.section.scope.end.perl - - - comment - Match empty brackets for ↩ snippet - match - (\{)(\}) - - - captures - - 1 - - name - punctuation.section.scope.begin.perl - - 2 - - name - punctuation.section.scope.end.perl - - - comment - Match empty parenthesis for ↩ snippet - match - (\()(\)) - - - repository - - escaped_char - - patterns - - - match - \\\d+ - name - constant.character.escape.perl - - - match - \\c[^\s\\] - name - constant.character.escape.perl - - - match - \\g(?:\{(?:\w*|-\d+)\}|\d+) - name - constant.character.escape.perl - - - match - \\k(?:\{\w*\}|<\w*>|'\w*') - name - constant.character.escape.perl - - - match - \\N\{[^\}]*\} - name - constant.character.escape.perl - - - match - \\o\{\d*\} - name - constant.character.escape.perl - - - match - \\(?:p|P)(?:\{\w*\}|P) - name - constant.character.escape.perl - - - match - \\x(?:[0-9a-zA-Z]{2}|\{\w*\})? - name - constant.character.escape.perl - - - match - \\. - name - constant.character.escape.perl - - - - line_comment - - patterns - - - begin - (^[ \t]+)?(?=#) - beginCaptures - - 1 - - name - punctuation.whitespace.comment.leading.perl - - - end - (?!\G) - patterns - - - begin - # - beginCaptures - - 0 - - name - punctuation.definition.comment.perl - - - end - \n - name - comment.line.number-sign.perl - - - - - - nested_braces - - begin - \{ - captures - - 1 - - name - punctuation.section.scope.perl - - - end - \} - patterns - - - include - #escaped_char - - - include - #nested_braces - - - - nested_braces_interpolated - - begin - \{ - captures - - 1 - - name - punctuation.section.scope.perl - - - end - \} - patterns - - - include - #escaped_char - - - include - #variable - - - include - #nested_braces_interpolated - - - - nested_brackets - - begin - \[ - captures - - 1 - - name - punctuation.section.scope.perl - - - end - \] - patterns - - - include - #escaped_char - - - include - #nested_brackets - - - - nested_brackets_interpolated - - begin - \[ - captures - - 1 - - name - punctuation.section.scope.perl - - - end - \] - patterns - - - include - #escaped_char - - - include - #variable - - - include - #nested_brackets_interpolated - - - - nested_ltgt - - begin - < - captures - - 1 - - name - punctuation.section.scope.perl - - - end - > - patterns - - - include - #nested_ltgt - - - - nested_ltgt_interpolated - - begin - < - captures - - 1 - - name - punctuation.section.scope.perl - - - end - > - patterns - - - include - #variable - - - include - #nested_ltgt_interpolated - - - - nested_parens - - begin - \( - captures - - 1 - - name - punctuation.section.scope.perl - - - end - \) - patterns - - - include - #escaped_char - - - include - #nested_parens - - - - nested_parens_interpolated - - begin - \( - captures - - 1 - - name - punctuation.section.scope.perl - - - end - \) - patterns - - - comment - This is to prevent thinks like qr/foo$/ to treat $/ as a variable - match - \$(?=[^\s\w'\{\[\(\<]) - name - keyword.control.anchor.perl - - - include - #escaped_char - - - include - #variable - - - include - #nested_parens_interpolated - - - - variable - - patterns - - - captures - - 1 - - name - punctuation.definition.variable.perl - - - match - (\$)&(?![A-Za-z0-9_]) - name - variable.other.regexp.match.perl - - - captures - - 1 - - name - punctuation.definition.variable.perl - - - match - (\$)`(?![A-Za-z0-9_]) - name - variable.other.regexp.pre-match.perl - - - captures - - 1 - - name - punctuation.definition.variable.perl - - - match - (\$)'(?![A-Za-z0-9_]) - name - variable.other.regexp.post-match.perl - - - captures - - 1 - - name - punctuation.definition.variable.perl - - - match - (\$)\+(?![A-Za-z0-9_]) - name - variable.other.regexp.last-paren-match.perl - - - captures - - 1 - - name - punctuation.definition.variable.perl - - - match - (\$)"(?![A-Za-z0-9_]) - name - variable.other.readwrite.list-separator.perl - - - captures - - 1 - - name - punctuation.definition.variable.perl - - - match - (\$)0(?![A-Za-z0-9_]) - name - variable.other.predefined.program-name.perl - - - captures - - 1 - - name - punctuation.definition.variable.perl - - - match - (\$)[_ab\*\.\/\|,\\;#%=\-~^:?!\$<>\(\)\[\]@](?![A-Za-z0-9_]) - name - variable.other.predefined.perl - - - captures - - 1 - - name - punctuation.definition.variable.perl - - - match - (\$)[0-9]+(?![A-Za-z0-9_]) - name - variable.other.subpattern.perl - - - captures - - 1 - - name - punctuation.definition.variable.perl - - - match - ([\$\@\%](#)?)([a-zA-Zx7f-xff\$]|::)([a-zA-Z0-9_x7f-xff\$]|::)*\b - name - variable.other.readwrite.global.perl - - - captures - - 1 - - name - punctuation.definition.variable.perl - - 2 - - name - punctuation.definition.variable.perl - - - match - (\$\{)(?:[a-zA-Zx7f-xff\$]|::)(?:[a-zA-Z0-9_x7f-xff\$]|::)*(\}) - name - variable.other.readwrite.global.perl - - - captures - - 1 - - name - punctuation.definition.variable.perl - - - match - ([\$\@\%](#)?)[0-9_]\b - name - variable.other.readwrite.global.special.perl - - - - - scopeName - source.perl - uuid - EDBFE125-6B1C-11D9-9189-000D93589AF6 - - \ No newline at end of file diff --git a/extensions/perl/syntaxes/perl.tmLanguage.json b/extensions/perl/syntaxes/perl.tmLanguage.json new file mode 100644 index 00000000000..612c4796cbe --- /dev/null +++ b/extensions/perl/syntaxes/perl.tmLanguage.json @@ -0,0 +1,2546 @@ +{ + "comment": "\n\tTODO:\tInclude RegExp syntax\n", + "fileTypes": [ + "pl", + "pm", + "pod", + "t", + "PL", + "psgi", + "vcl" + ], + "firstLineMatch": "(?x)\n# Hashbang\n^\\#!.*(?:\\s|\\/|(?<=!)\\b)perl(?:$|\\s)\n|\n# Modeline\n(?i:\n # Emacs\n -\\*-(?:(?:(?!mode\\s*:)[^:;]+:[^:;]+;)*\\s*mode\\s*:)?\\s*\n\tperl\n \\s*(?:;[^:;]+:[^:;]+?)*;?\\s*-\\*-\n |\n # Vim\n (?:(?:\\s|^)vi(?:m[<=>]?\\d+|m)?|(?!^)\\sex)(?=:(?=\\s*set?\\s[^\\n:]+:)|:(?!\\s*set?\\s))(?:(?:\\s|\\s*:\\s*)\\w*(?:\\s*=(?:[^\\n\\\\\\s]|\\\\.)*)?)*[\\s:](?:filetype|ft|syntax)\\s*=\n\tperl\n (?=\\s|:|$)\n)", + "keyEquivalent": "^~P", + "name": "Perl", + "patterns": [ + { + "include": "#line_comment" + }, + { + "begin": "^(?==[a-zA-Z]+)", + "end": "^(=cut\\b.*$)", + "endCaptures": { + "1": { + "patterns": [ + { + "include": "#pod" + } + ] + } + }, + "name": "comment.block.documentation.perl", + "patterns": [ + { + "include": "#pod" + } + ] + }, + { + "include": "#variable" + }, + { + "applyEndPatternLast": 1, + "begin": "\\b(?=qr\\s*[^\\s\\w])", + "comment": "string.regexp.compile.perl", + "end": "((([egimosxradlupcn]*)))(?=(\\s+\\S|\\s*[;\\,\\#\\{\\}\\)]|\\s*$))", + "endCaptures": { + "1": { + "name": "string.regexp.compile.perl" + }, + "2": { + "name": "punctuation.definition.string.perl" + }, + "3": { + "name": "keyword.control.regexp-option.perl" + } + }, + "patterns": [ + { + "begin": "(qr)\\s*\\{", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "\\}", + "name": "string.regexp.compile.nested_braces.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_braces_interpolated" + } + ] + }, + { + "begin": "(qr)\\s*\\[", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "\\]", + "name": "string.regexp.compile.nested_brackets.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_brackets_interpolated" + } + ] + }, + { + "begin": "(qr)\\s*<", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": ">", + "name": "string.regexp.compile.nested_ltgt.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_ltgt_interpolated" + } + ] + }, + { + "begin": "(qr)\\s*\\(", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "\\)", + "name": "string.regexp.compile.nested_parens.perl", + "patterns": [ + { + "comment": "This is to prevent thinks like qr/foo$/ to treat $/ as a variable", + "match": "\\$(?=[^\\s\\w\\\\'\\{\\[\\(\\<])" + }, + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_parens_interpolated" + } + ] + }, + { + "begin": "(qr)\\s*'", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "'", + "name": "string.regexp.compile.single-quote.perl", + "patterns": [ + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(qr)\\s*([^\\s\\w'\\{\\[\\(\\<])", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "\\2", + "name": "string.regexp.compile.simple-delimiter.perl", + "patterns": [ + { + "comment": "This is to prevent thinks like qr/foo$/ to treat $/ as a variable", + "match": "\\$(?=[^\\s\\w'\\{\\[\\(\\<])", + "name": "keyword.control.anchor.perl" + }, + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_parens_interpolated" + } + ] + } + ] + }, + { + "applyEndPatternLast": 1, + "begin": "(?", + "name": "string.regexp.find-m.nested_ltgt.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_ltgt_interpolated" + } + ] + }, + { + "begin": "(m)\\s*\\(", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "\\)", + "name": "string.regexp.find-m.nested_parens.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_parens_interpolated" + } + ] + }, + { + "begin": "(m)\\s*'", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "'", + "name": "string.regexp.find-m.single-quote.perl", + "patterns": [ + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(?]|\\s*$))", + "endCaptures": { + "1": { + "name": "string.regexp.replace.perl" + }, + "2": { + "name": "punctuation.definition.string.perl" + }, + "3": { + "name": "keyword.control.regexp-option.perl" + } + }, + "patterns": [ + { + "begin": "(s)\\s*\\{", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "\\}", + "name": "string.regexp.nested_braces.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_braces" + } + ] + }, + { + "begin": "(s)\\s*\\[", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "\\]", + "name": "string.regexp.nested_brackets.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_brackets" + } + ] + }, + { + "begin": "(s)\\s*<", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": ">", + "name": "string.regexp.nested_ltgt.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_ltgt" + } + ] + }, + { + "begin": "(s)\\s*\\(", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "\\)", + "name": "string.regexp.nested_parens.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_parens" + } + ] + }, + { + "begin": "\\{", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + } + }, + "end": "\\}", + "name": "string.regexp.format.nested_braces.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_braces_interpolated" + } + ] + }, + { + "begin": "\\[", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + } + }, + "end": "\\]", + "name": "string.regexp.format.nested_brackets.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_brackets_interpolated" + } + ] + }, + { + "begin": "<", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + } + }, + "end": ">", + "name": "string.regexp.format.nested_ltgt.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_ltgt_interpolated" + } + ] + }, + { + "begin": "\\(", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + } + }, + "end": "\\)", + "name": "string.regexp.format.nested_parens.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_parens_interpolated" + } + ] + }, + { + "begin": "'", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + } + }, + "end": "'", + "name": "string.regexp.format.single_quote.perl", + "patterns": [ + { + "match": "\\\\['\\\\]", + "name": "constant.character.escape.perl" + } + ] + }, + { + "begin": "([^\\s\\w\\[({<;])", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + } + }, + "end": "\\1", + "name": "string.regexp.format.simple_delimiter.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + }, + { + "match": "\\s+" + } + ] + }, + { + "begin": "\\b(?=s([^\\sa-zA-Z0-9\\[({<]).*\\1([egimosxradlupcn]*)([\\}\\)\\;\\,]|\\s+))", + "comment": "string.regexp.replaceXXX", + "end": "((([egimosxradlupcn]*)))(?=([\\}\\)\\;\\,]|\\s+|\\s*$))", + "endCaptures": { + "1": { + "name": "string.regexp.replace.perl" + }, + "2": { + "name": "punctuation.definition.string.perl" + }, + "3": { + "name": "keyword.control.regexp-option.perl" + } + }, + "patterns": [ + { + "begin": "(s\\s*)([^\\sa-zA-Z0-9\\[({<])", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "(?=\\2)", + "name": "string.regexp.replaceXXX.simple_delimiter.perl", + "patterns": [ + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "'", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + } + }, + "end": "'", + "name": "string.regexp.replaceXXX.format.single_quote.perl", + "patterns": [ + { + "match": "\\\\['\\\\]", + "name": "constant.character.escape.perl.perl" + } + ] + }, + { + "begin": "([^\\sa-zA-Z0-9\\[({<])", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + } + }, + "end": "\\1", + "name": "string.regexp.replaceXXX.format.simple_delimiter.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + } + ] + }, + { + "begin": "\\b(?=(?]))", + "comment": "string.regexp.replace.extended", + "end": "((([egimosradlupc]*x[egimosradlupc]*)))\\b", + "endCaptures": { + "1": { + "name": "string.regexp.replace.perl" + }, + "2": { + "name": "punctuation.definition.string.perl" + }, + "3": { + "name": "keyword.control.regexp-option.perl" + } + }, + "patterns": [ + { + "begin": "(s)\\s*(.)", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "(?=\\2)", + "name": "string.regexp.replace.extended.simple_delimiter.perl", + "patterns": [ + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "'", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + } + }, + "end": "'(?=[egimosradlupc]*x[egimosradlupc]*)\\b", + "name": "string.regexp.replace.extended.simple_delimiter.perl", + "patterns": [ + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(.)", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + } + }, + "end": "\\1(?=[egimosradlupc]*x[egimosradlupc]*)\\b", + "name": "string.regexp.replace.extended.simple_delimiter.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + } + ] + }, + { + "begin": "(?<=\\(|\\{|~|&|\\||if|unless|^)\\s*((\\/))", + "beginCaptures": { + "1": { + "name": "string.regexp.find.perl" + }, + "2": { + "name": "punctuation.definition.string.perl" + } + }, + "contentName": "string.regexp.find.perl", + "end": "((\\1([egimosxradlupcn]*)))(?=(\\s+\\S|\\s*[;\\,\\#\\{\\}\\)]|\\s*$))", + "endCaptures": { + "1": { + "name": "string.regexp.find.perl" + }, + "2": { + "name": "punctuation.definition.string.perl" + }, + "3": { + "name": "keyword.control.regexp-option.perl" + } + }, + "patterns": [ + { + "comment": "This is to prevent thinks like /foo$/ to treat $/ as a variable", + "match": "\\$(?=\\/)", + "name": "keyword.control.anchor.perl" + }, + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + }, + { + "captures": { + "1": { + "name": "constant.other.key.perl" + } + }, + "match": "\\b(\\w+)\\s*(?==>)" + }, + { + "match": "(?<={)\\s*\\w+\\s*(?=})", + "name": "constant.other.bareword.perl" + }, + { + "captures": { + "1": { + "name": "keyword.control.perl" + }, + "2": { + "name": "entity.name.type.class.perl" + } + }, + "match": "^\\s*(package)\\s+([^\\s;]+)", + "name": "meta.class.perl" + }, + { + "captures": { + "1": { + "name": "storage.type.sub.perl" + }, + "2": { + "name": "entity.name.function.perl" + }, + "3": { + "name": "storage.type.method.perl" + } + }, + "match": "\\b(sub)(?:\\s+([-a-zA-Z0-9_]+))?\\s*(?:\\([\\$\\@\\*;]*\\))?[^\\w\\{]", + "name": "meta.function.perl" + }, + { + "captures": { + "1": { + "name": "entity.name.function.perl" + }, + "2": { + "name": "punctuation.definition.parameters.perl" + }, + "3": { + "name": "variable.parameter.function.perl" + } + }, + "match": "^\\s*(BEGIN|UNITCHECK|CHECK|INIT|END|DESTROY)\\b", + "name": "meta.function.perl" + }, + { + "begin": "^(?=(\\t| {4}))", + "end": "(?=[^\\t\\s])", + "name": "meta.leading-tabs", + "patterns": [ + { + "captures": { + "1": { + "name": "meta.odd-tab" + }, + "2": { + "name": "meta.even-tab" + } + }, + "match": "(\\t| {4})(\\t| {4})?" + } + ] + }, + { + "captures": { + "1": { + "name": "support.function.perl" + }, + "2": { + "name": "punctuation.definition.string.perl" + }, + "5": { + "name": "punctuation.definition.string.perl" + }, + "8": { + "name": "punctuation.definition.string.perl" + } + }, + "match": "\\b(tr|y)\\s*([^A-Za-z0-9\\s])(.*?)(?)\\b(continue|default|die|do|else|elsif|exit|for|foreach|given|goto|if|last|next|redo|return|select|unless|until|wait|when|while|switch|case|require|use|eval)\\b", + "name": "keyword.control.perl" + }, + { + "match": "\\b(my|our|local)\\b", + "name": "storage.modifier.perl" + }, + { + "match": "(?|=>|->)", + "name": "keyword.operator.comparison.perl" + }, + { + "begin": "(((<<) *\"HTML\"))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.doublequote.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "text.html.embedded.perl", + "end": "(^HTML$)", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "text.html.basic" + } + ] + }, + { + "begin": "(((<<) *\"XML\"))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.doublequote.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "text.xml.embedded.perl", + "end": "(^XML$)", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "text.xml" + } + ] + }, + { + "begin": "(((<<) *\"CSS\"))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.doublequote.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "text.css.embedded.perl", + "end": "(^CSS$)", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "source.css" + } + ] + }, + { + "begin": "(((<<) *\"JAVASCRIPT\"))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.doublequote.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "text.js.embedded.perl", + "end": "(^JAVASCRIPT$)", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "source.js" + } + ] + }, + { + "begin": "(((<<) *\"SQL\"))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.doublequote.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "source.sql.embedded.perl", + "end": "(^SQL$)", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "source.sql" + } + ] + }, + { + "begin": "(((<<) *\"POSTSCRIPT\"))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.doublequote.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "text.postscript.embedded.perl", + "end": "(^POSTSCRIPT$)", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "source.postscript" + } + ] + }, + { + "begin": "(((<<) *\"([^\"]*)\"))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.doublequote.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.doublequote.perl", + "end": "(^\\4$)", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "(((<<) *'HTML'))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.quote.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "text.html.embedded.perl", + "end": "(^HTML$)", + "patterns": [ + { + "include": "text.html.basic" + } + ] + }, + { + "begin": "(((<<) *'XML'))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.quote.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "text.xml.embedded.perl", + "end": "(^XML$)", + "patterns": [ + { + "include": "text.xml" + } + ] + }, + { + "begin": "(((<<) *'CSS'))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.quote.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "text.css.embedded.perl", + "end": "(^CSS$)", + "patterns": [ + { + "include": "source.css" + } + ] + }, + { + "begin": "(((<<) *'JAVASCRIPT'))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.quote.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "text.js.embedded.perl", + "end": "(^JAVASCRIPT$)", + "patterns": [ + { + "include": "source.js" + } + ] + }, + { + "begin": "(((<<) *'SQL'))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.quote.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "source.sql.embedded.perl", + "end": "(^SQL$)", + "patterns": [ + { + "include": "source.sql" + } + ] + }, + { + "begin": "(((<<) *'POSTSCRIPT'))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.quote.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "source.postscript.embedded.perl", + "end": "(^POSTSCRIPT$)", + "patterns": [ + { + "include": "source.postscript" + } + ] + }, + { + "begin": "(((<<) *'([^']*)'))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.quote.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.quote.perl", + "end": "(^\\4$)" + }, + { + "begin": "(((<<) *\\\\((?![=\\d\\$\\( ])[^;,'\"`\\s\\)]*)))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.quote.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.quote.perl", + "end": "(^\\4$)" + }, + { + "begin": "(((<<) *`([^`]*)`))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.backtick.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.backtick.perl", + "end": "(^\\4$)", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "(((<<) *HTML\\b))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "text.html.embedded.perl", + "end": "(^HTML$)", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "text.html.basic" + } + ] + }, + { + "begin": "(((<<) *XML\\b))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "text.xml.embedded.perl", + "end": "(^XML$)", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "text.xml" + } + ] + }, + { + "begin": "(((<<) *JAVASCRIPT\\b))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "source.js.embedded.perl", + "end": "(^JAVASCRIPT$)", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "source.js" + } + ] + }, + { + "begin": "(((<<) *SQL\\b))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "source.sql.embedded.perl", + "end": "(^SQL$)", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "source.sql" + } + ] + }, + { + "begin": "(((<<) *POSTSCRIPT\\b))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "source.postscript.embedded.perl", + "end": "(^POSTSCRIPT$)", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "source.postscript" + } + ] + }, + { + "begin": "(((<<) *((?![=\\d\\$\\( ])[^;,'\"`\\s\\)]*)))(.*)\\n?", + "captures": { + "1": { + "name": "punctuation.definition.string.perl" + }, + "2": { + "name": "string.unquoted.heredoc.perl" + }, + "3": { + "name": "punctuation.definition.heredoc.perl" + }, + "5": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.perl", + "end": "(^\\4$)", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "\\bqq\\s*([^\\(\\{\\[\\<\\w\\s])", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\1", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.other.qq.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "\\bqx\\s*([^'\\(\\{\\[\\<\\w\\s])", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\1", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.interpolated.qx.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "\\bqx\\s*'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.interpolated.qx.single-quote.perl", + "patterns": [ + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.double.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "(?)\\bqw?\\s*([^\\(\\{\\[\\<\\w\\s])", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\1", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.other.q.perl" + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.single.perl", + "patterns": [ + { + "match": "\\\\['\\\\]", + "name": "constant.character.escape.perl" + } + ] + }, + { + "begin": "`", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "`", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.interpolated.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "(?)\\bqq\\s*\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.other.qq-paren.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_parens_interpolated" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "\\bqq\\s*\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.other.qq-brace.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_braces_interpolated" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "\\bqq\\s*\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.other.qq-bracket.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_brackets_interpolated" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "\\bqq\\s*\\<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\>", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.other.qq-ltgt.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_ltgt_interpolated" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "(?)\\bqx\\s*\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.interpolated.qx-paren.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_parens_interpolated" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "\\bqx\\s*\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.interpolated.qx-brace.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_braces_interpolated" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "\\bqx\\s*\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.interpolated.qx-bracket.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_brackets_interpolated" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "\\bqx\\s*\\<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\>", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.interpolated.qx-ltgt.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_ltgt_interpolated" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "(?)\\bqw?\\s*\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.other.q-paren.perl", + "patterns": [ + { + "include": "#nested_parens" + } + ] + }, + { + "begin": "\\bqw?\\s*\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.other.q-brace.perl", + "patterns": [ + { + "include": "#nested_braces" + } + ] + }, + { + "begin": "\\bqw?\\s*\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.other.q-bracket.perl", + "patterns": [ + { + "include": "#nested_brackets" + } + ] + }, + { + "begin": "\\bqw?\\s*\\<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\>", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.other.q-ltgt.perl", + "patterns": [ + { + "include": "#nested_ltgt" + } + ] + }, + { + "begin": "^__\\w+__", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "$", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.unquoted.program-block.perl" + }, + { + "begin": "\\b(format)\\s+(\\w+)\\s*=", + "beginCaptures": { + "1": { + "name": "support.function.perl" + }, + "2": { + "name": "entity.name.function.format.perl" + } + }, + "end": "^\\.\\s*$", + "name": "meta.format.perl", + "patterns": [ + { + "include": "#line_comment" + }, + { + "include": "#variable" + } + ] + }, + { + "captures": { + "1": { + "name": "support.function.perl" + }, + "2": { + "name": "entity.name.function.perl" + } + }, + "match": "\\b(x)\\s*(\\d+)\\b" + }, + { + "match": "\\b(ARGV|DATA|ENV|SIG|STDERR|STDIN|STDOUT|atan2|bind|binmode|bless|caller|chdir|chmod|chomp|chop|chown|chr|chroot|close|closedir|cmp|connect|cos|crypt|dbmclose|dbmopen|defined|delete|dump|each|endgrent|endhostent|endnetent|endprotoent|endpwent|endservent|eof|eq|eval|exec|exists|exp|fcntl|fileno|flock|fork|formline|ge|getc|getgrent|getgrgid|getgrnam|gethostbyaddr|gethostbyname|gethostent|getlogin|getnetbyaddr|getnetbyname|getnetent|getpeername|getpgrp|getppid|getpriority|getprotobyname|getprotobynumber|getprotoent|getpwent|getpwnam|getpwuid|getservbyname|getservbyport|getservent|getsockname|getsockopt|glob|gmtime|grep|gt|hex|import|index|int|ioctl|join|keys|kill|lc|lcfirst|le|length|link|listen|local|localtime|log|lstat|lt|m|map|mkdir|msgctl|msgget|msgrcv|msgsnd|ne|no|oct|open|opendir|ord|pack|pipe|pop|pos|print|printf|push|quotemeta|rand|read|readdir|readlink|recv|ref|rename|reset|reverse|rewinddir|rindex|rmdir|s|say|scalar|seek|seekdir|semctl|semget|semop|send|setgrent|sethostent|setnetent|setpgrp|setpriority|setprotoent|setpwent|setservent|setsockopt|shift|shmctl|shmget|shmread|shmwrite|shutdown|sin|sleep|socket|socketpair|sort|splice|split|sprintf|sqrt|srand|stat|study|substr|symlink|syscall|sysopen|sysread|system|syswrite|tell|telldir|tie|tied|time|times|tr|truncate|uc|ucfirst|umask|undef|unlink|unpack|unshift|untie|utime|values|vec|waitpid|wantarray|warn|write|y)\\b", + "name": "support.function.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.section.scope.begin.perl" + }, + "2": { + "name": "punctuation.section.scope.end.perl" + } + }, + "comment": "Match empty brackets for ↩ snippet", + "match": "(\\{)(\\})" + }, + { + "captures": { + "1": { + "name": "punctuation.section.scope.begin.perl" + }, + "2": { + "name": "punctuation.section.scope.end.perl" + } + }, + "comment": "Match empty parenthesis for ↩ snippet", + "match": "(\\()(\\))" + } + ], + "repository": { + "escaped_char": { + "patterns": [ + { + "match": "\\\\\\d+", + "name": "constant.character.escape.perl" + }, + { + "match": "\\\\c[^\\s\\\\]", + "name": "constant.character.escape.perl" + }, + { + "match": "\\\\g(?:\\{(?:\\w*|-\\d+)\\}|\\d+)", + "name": "constant.character.escape.perl" + }, + { + "match": "\\\\k(?:\\{\\w*\\}|<\\w*>|'\\w*')", + "name": "constant.character.escape.perl" + }, + { + "match": "\\\\N\\{[^\\}]*\\}", + "name": "constant.character.escape.perl" + }, + { + "match": "\\\\o\\{\\d*\\}", + "name": "constant.character.escape.perl" + }, + { + "match": "\\\\(?:p|P)(?:\\{\\w*\\}|P)", + "name": "constant.character.escape.perl" + }, + { + "match": "\\\\x(?:[0-9a-zA-Z]{2}|\\{\\w*\\})?", + "name": "constant.character.escape.perl" + }, + { + "match": "\\\\.", + "name": "constant.character.escape.perl" + } + ] + }, + "line_comment": { + "patterns": [ + { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.perl" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.perl" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.perl" + } + ] + } + ] + }, + "nested_braces": { + "begin": "\\{", + "captures": { + "1": { + "name": "punctuation.section.scope.perl" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_braces" + } + ] + }, + "nested_braces_interpolated": { + "begin": "\\{", + "captures": { + "1": { + "name": "punctuation.section.scope.perl" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_braces_interpolated" + } + ] + }, + "nested_brackets": { + "begin": "\\[", + "captures": { + "1": { + "name": "punctuation.section.scope.perl" + } + }, + "end": "\\]", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_brackets" + } + ] + }, + "nested_brackets_interpolated": { + "begin": "\\[", + "captures": { + "1": { + "name": "punctuation.section.scope.perl" + } + }, + "end": "\\]", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_brackets_interpolated" + } + ] + }, + "nested_ltgt": { + "begin": "<", + "captures": { + "1": { + "name": "punctuation.section.scope.perl" + } + }, + "end": ">", + "patterns": [ + { + "include": "#nested_ltgt" + } + ] + }, + "nested_ltgt_interpolated": { + "begin": "<", + "captures": { + "1": { + "name": "punctuation.section.scope.perl" + } + }, + "end": ">", + "patterns": [ + { + "include": "#variable" + }, + { + "include": "#nested_ltgt_interpolated" + } + ] + }, + "nested_parens": { + "begin": "\\(", + "captures": { + "1": { + "name": "punctuation.section.scope.perl" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_parens" + } + ] + }, + "nested_parens_interpolated": { + "begin": "\\(", + "captures": { + "1": { + "name": "punctuation.section.scope.perl" + } + }, + "end": "\\)", + "patterns": [ + { + "comment": "This is to prevent thinks like qr/foo$/ to treat $/ as a variable", + "match": "\\$(?=[^\\s\\w'\\{\\[\\(\\<])", + "name": "keyword.control.anchor.perl" + }, + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_parens_interpolated" + } + ] + }, + "pod": { + "patterns": [ + { + "match": "^=(pod|back|cut)\\b", + "name": "storage.type.class.pod.perl" + }, + { + "begin": "^(=begin)\\s+(html)\\s*$", + "beginCaptures": { + "1": { + "name": "storage.type.class.pod.perl" + }, + "2": { + "name": "variable.other.pod.perl" + } + }, + "contentName": "text.embedded.html.basic", + "end": "^(=end)\\s+(html)|^(?==cut)", + "endCaptures": { + "1": { + "name": "storage.type.class.pod.perl" + }, + "2": { + "name": "variable.other.pod.perl" + } + }, + "name": "meta.embedded.pod.perl", + "patterns": [ + { + "include": "text.html.basic" + } + ] + }, + { + "captures": { + "1": { + "name": "storage.type.class.pod.perl" + }, + "2": { + "name": "variable.other.pod.perl", + "patterns": [ + { + "include": "#pod-formatting" + } + ] + } + }, + "match": "^(=(?:head[1-4]|item|over|encoding|begin|end|for))\\b\\s*(.*)" + }, + { + "include": "#pod-formatting" + } + ] + }, + "pod-formatting": { + "patterns": [ + { + "captures": { + "1": { + "name": "markup.italic.pod.perl" + }, + "2": { + "name": "markup.italic.pod.perl" + } + }, + "match": "I(?:<([^<>]+)>|<+(\\s+(?:(?|[^>])+\\s+)>+)", + "name": "entity.name.type.instance.pod.perl" + }, + { + "captures": { + "1": { + "name": "markup.bold.pod.perl" + }, + "2": { + "name": "markup.bold.pod.perl" + } + }, + "match": "B(?:<([^<>]+)>|<+(\\s+(?:(?|[^>])+\\s+)>+)", + "name": "entity.name.type.instance.pod.perl" + }, + { + "captures": { + "1": { + "name": "markup.raw.pod.perl" + }, + "2": { + "name": "markup.raw.pod.perl" + } + }, + "match": "C(?:<([^<>]+)>|<+(\\\\s+(?:(?|[^>])+\\\\s+)>+)", + "name": "entity.name.type.instance.pod.perl" + }, + { + "captures": { + "1": { + "name": "markup.underline.link.hyperlink.pod.perl" + } + }, + "match": "L<([^>]+)>", + "name": "entity.name.type.instance.pod.perl" + }, + { + "match": "[EFSXZ]<[^>]*>", + "name": "entity.name.type.instance.pod.perl" + } + ] + }, + "variable": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "(\\$)&(?![A-Za-z0-9_])", + "name": "variable.other.regexp.match.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "(\\$)`(?![A-Za-z0-9_])", + "name": "variable.other.regexp.pre-match.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "(\\$)'(?![A-Za-z0-9_])", + "name": "variable.other.regexp.post-match.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "(\\$)\\+(?![A-Za-z0-9_])", + "name": "variable.other.regexp.last-paren-match.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "(\\$)\"(?![A-Za-z0-9_])", + "name": "variable.other.readwrite.list-separator.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "(\\$)0(?![A-Za-z0-9_])", + "name": "variable.other.predefined.program-name.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "(\\$)[_ab\\*\\.\\/\\|,\\\\;#%=\\-~^:?!\\$<>\\(\\)\\[\\]@](?![A-Za-z0-9_])", + "name": "variable.other.predefined.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "(\\$)[0-9]+(?![A-Za-z0-9_])", + "name": "variable.other.subpattern.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "([\\$\\@\\%](#)?)([a-zA-Zx7f-xff\\$]|::)([a-zA-Z0-9_x7f-xff\\$]|::)*\\b", + "name": "variable.other.readwrite.global.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + }, + "2": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "(\\$\\{)(?:[a-zA-Zx7f-xff\\$]|::)(?:[a-zA-Z0-9_x7f-xff\\$]|::)*(\\})", + "name": "variable.other.readwrite.global.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "([\\$\\@\\%](#)?)[0-9_]\\b", + "name": "variable.other.readwrite.global.special.perl" + } + ] + } + }, + "scopeName": "source.perl", + "uuid": "EDBFE125-6B1C-11D9-9189-000D93589AF6", + "version": "https://github.com/textmate/perl.tmbundle/commit/c0b7a4bd65882380522d82a60b536479a62b07c3" +} \ No newline at end of file diff --git a/extensions/perl/syntaxes/perl6.tmLanguage.json b/extensions/perl/syntaxes/perl6.tmLanguage.json new file mode 100644 index 00000000000..a3024a11ae7 --- /dev/null +++ b/extensions/perl/syntaxes/perl6.tmLanguage.json @@ -0,0 +1,319 @@ +{ + "fileTypes": [ + "p6", + "pl6", + "pm6", + "nqp" + ], + "firstLineMatch": "(?x)\n# Hashbang\n^\\#!.*(?:\\s|\\/|(?<=!)\\b)(?:perl6|nqp)(?:$|\\s)\n|\n# Perl 6 pragma\n\\buse\\s+v6\\b\n|\n# Modeline\n(?i:\n # Emacs\n -\\*-(?:(?:(?!mode\\s*:)[^:;]+:[^:;]+;)*\\s*mode\\s*:)?\\s*\n\tperl6\n \\s*(?:;[^:;]+:[^:;]+?)*;?\\s*-\\*-\n |\n # Vim\n (?:(?:\\s|^)vi(?:m[<=>]?\\d+|m)?|(?!^)\\sex)(?=:(?=\\s*set?\\s[^\\n:]+:)|:(?!\\s*set?\\s))(?:(?:\\s|\\s*:\\s*)\\w*(?:\\s*=(?:[^\\n\\\\\\s]|\\\\.)*)?)*[\\s:](?:filetype|ft|syntax)\\s*=\n\tperl6\n (?=\\s|:|$)\n)", + "keyEquivalent": "^~P", + "name": "Perl 6", + "patterns": [ + { + "begin": "^=begin", + "end": "^=end", + "name": "comment.block.perl" + }, + { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.perl" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.perl" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.perl" + } + ] + }, + { + "captures": { + "1": { + "name": "storage.type.class.perl.6" + }, + "3": { + "name": "entity.name.type.class.perl.6" + } + }, + "match": "(class|enum|grammar|knowhow|module|package|role|slang|subset)(\\s+)(((?:::|')?(?:([a-zA-Z_\\x{C0}-\\x{FF}\\$])([a-zA-Z0-9_\\x{C0}-\\x{FF}\\\\$]|[\\-'][a-zA-Z0-9_\\x{C0}-\\x{FF}\\$])*))+)", + "name": "meta.class.perl.6" + }, + { + "begin": "(?<=\\s)'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.single.perl", + "patterns": [ + { + "match": "\\\\['\\\\]", + "name": "constant.character.escape.perl" + } + ] + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.double.perl", + "patterns": [ + { + "match": "\\\\[abtnfre\"\\\\]", + "name": "constant.character.escape.perl" + } + ] + }, + { + "begin": "q(q|to|heredoc)*\\s*:?(q|to|heredoc)*\\s*/(.+)/", + "end": "\\3", + "name": "string.quoted.single.heredoc.perl" + }, + { + "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*{{", + "end": "}}", + "name": "string.quoted.double.heredoc.brace.perl", + "patterns": [ + { + "include": "#qq_brace_string_content" + } + ] + }, + { + "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*\\(\\(", + "end": "\\)\\)", + "name": "string.quoted.double.heredoc.paren.perl", + "patterns": [ + { + "include": "#qq_paren_string_content" + } + ] + }, + { + "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*\\[\\[", + "end": "\\]\\]", + "name": "string.quoted.double.heredoc.bracket.perl", + "patterns": [ + { + "include": "#qq_bracket_string_content" + } + ] + }, + { + "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*{", + "end": "}", + "name": "string.quoted.single.heredoc.brace.perl", + "patterns": [ + { + "include": "#qq_brace_string_content" + } + ] + }, + { + "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*/", + "end": "/", + "name": "string.quoted.single.heredoc.slash.perl", + "patterns": [ + { + "include": "#qq_slash_string_content" + } + ] + }, + { + "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*\\(", + "end": "\\)", + "name": "string.quoted.single.heredoc.paren.perl", + "patterns": [ + { + "include": "#qq_paren_string_content" + } + ] + }, + { + "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*\\[", + "end": "\\]", + "name": "string.quoted.single.heredoc.bracket.perl", + "patterns": [ + { + "include": "#qq_bracket_string_content" + } + ] + }, + { + "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*'", + "end": "'", + "name": "string.quoted.single.heredoc.single.perl", + "patterns": [ + { + "include": "#qq_single_string_content" + } + ] + }, + { + "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*\"", + "end": "\"", + "name": "string.quoted.single.heredoc.double.perl", + "patterns": [ + { + "include": "#qq_double_string_content" + } + ] + }, + { + "match": "\\b\\$\\w+\\b", + "name": "variable.other.perl" + }, + { + "match": "\\b(macro|sub|submethod|method|multi|proto|only|rule|token|regex|category)\\b", + "name": "storage.type.declare.routine.perl" + }, + { + "match": "\\b(self)\\b", + "name": "variable.language.perl" + }, + { + "match": "\\b(use|require)\\b", + "name": "keyword.other.include.perl" + }, + { + "match": "\\b(if|else|elsif|unless)\\b", + "name": "keyword.control.conditional.perl" + }, + { + "match": "\\b(let|my|our|state|temp|has|constant)\\b", + "name": "storage.type.variable.perl" + }, + { + "match": "\\b(for|loop|repeat|while|until|gather|given)\\b", + "name": "keyword.control.repeat.perl" + }, + { + "match": "\\b(take|do|when|next|last|redo|return|contend|maybe|defer|default|exit|make|continue|break|goto|leave|async|lift)\\b", + "name": "keyword.control.flowcontrol.perl" + }, + { + "match": "\\b(is|as|but|trusts|of|returns|handles|where|augment|supersede)\\b", + "name": "storage.modifier.type.constraints.perl" + }, + { + "match": "\\b(BEGIN|CHECK|INIT|START|FIRST|ENTER|LEAVE|KEEP|UNDO|NEXT|LAST|PRE|POST|END|CATCH|CONTROL|TEMP)\\b", + "name": "meta.function.perl" + }, + { + "match": "\\b(die|fail|try|warn)\\b", + "name": "keyword.control.control-handlers.perl" + }, + { + "match": "\\b(prec|irs|ofs|ors|export|deep|binary|unary|reparsed|rw|parsed|cached|readonly|defequiv|will|ref|copy|inline|tighter|looser|equiv|assoc|required)\\b", + "name": "storage.modifier.perl" + }, + { + "match": "\\b(NaN|Inf)\\b", + "name": "constant.numeric.perl" + }, + { + "match": "\\b(oo|fatal)\\b", + "name": "keyword.other.pragma.perl" + }, + { + "match": "\\b(Object|Any|Junction|Whatever|Capture|MatchSignature|Proxy|Matcher|Package|Module|ClassGrammar|Scalar|Array|Hash|KeyHash|KeySet|KeyBagPair|List|Seq|Range|Set|Bag|Mapping|Void|UndefFailure|Exception|Code|Block|Routine|Sub|MacroMethod|Submethod|Regex|Str|str|Blob|Char|ByteCodepoint|Grapheme|StrPos|StrLen|Version|NumComplex|num|complex|Bit|bit|bool|True|FalseIncreasing|Decreasing|Ordered|Callable|AnyCharPositional|Associative|Ordering|KeyExtractorComparator|OrderingPair|IO|KitchenSink|RoleInt|int|int1|int2|int4|int8|int16|int32|int64Rat|rat|rat1|rat2|rat4|rat8|rat16|rat32|rat64Buf|buf|buf1|buf2|buf4|buf8|buf16|buf32|buf64UInt|uint|uint1|uint2|uint4|uint8|uint16|uint32uint64|Abstraction|utf8|utf16|utf32)\\b", + "name": "support.type.perl6" + }, + { + "match": "\\b(div|xx|x|mod|also|leg|cmp|before|after|eq|ne|le|lt|not|gt|ge|eqv|ff|fff|and|andthen|or|xor|orelse|extra|lcm|gcd)\\b", + "name": "keyword.operator.perl" + }, + { + "match": "(\\$|@|%|&)(\\*|:|!|\\^|~|=|\\?|(<(?=.+>)))?([a-zA-Z_\\x{C0}-\\x{FF}\\$])([a-zA-Z0-9_\\x{C0}-\\x{FF}\\$]|[\\-'][a-zA-Z0-9_\\x{C0}-\\x{FF}\\$])*", + "name": "variable.other.identifier.perl.6" + }, + { + "match": "\\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|p5chop|chomp|p5chomp|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|uniq|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|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|WHERE|HOW|WHICH|VAR|WHO|WHENCE|ACCEPTS|REJECTS|not|true|iterator|by|re|im|invert|flip|gist|flat|tree|is-prime|throws_like|trans)\\b", + "name": "support.function.perl" + } + ], + "repository": { + "qq_brace_string_content": { + "begin": "{", + "end": "}", + "patterns": [ + { + "include": "#qq_brace_string_content" + } + ] + }, + "qq_bracket_string_content": { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#qq_bracket_string_content" + } + ] + }, + "qq_double_string_content": { + "begin": "\"", + "end": "\"", + "patterns": [ + { + "include": "#qq_double_string_content" + } + ] + }, + "qq_paren_string_content": { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#qq_paren_string_content" + } + ] + }, + "qq_single_string_content": { + "begin": "'", + "end": "'", + "patterns": [ + { + "include": "#qq_single_string_content" + } + ] + }, + "qq_slash_string_content": { + "begin": "\\\\/", + "end": "\\\\/", + "patterns": [ + { + "include": "#qq_slash_string_content" + } + ] + } + }, + "scopeName": "source.perl.6", + "uuid": "E685440C-0E20-4424-9693-864D5240A269", + "version": "https://github.com/textmate/perl.tmbundle/commit/d9841a0878239fa43f88c640f8d458590f97e8f5" +} \ No newline at end of file