{ "name": "Perl", "scopeName": "source.perl", "patterns": [ { "include": "#line_comment" }, { "name": "comment.block.documentation.perl", "begin": "^(?==[a-zA-Z]+)", "end": "^(=cut\\b.*$)", "patterns": [ { "include": "#pod" } ], "endCaptures": { "1": { "patterns": [ { "include": "#pod" } ] } } }, { "include": "#variable" }, { "begin": "\\b(?=qr\\s*[^\\s\\w])", "end": "((([egimosxradlupcn]*)))(?=(\\s+\\S|\\s*[;\\,\\#\\{\\}\\)]|\\s*$))", "patterns": [ { "name": "string.regexp.compile.nested_braces.perl", "begin": "(qr)\\s*\\{", "end": "\\}", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_braces_interpolated" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } } }, { "name": "string.regexp.compile.nested_brackets.perl", "begin": "(qr)\\s*\\[", "end": "\\]", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_brackets_interpolated" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } } }, { "name": "string.regexp.compile.nested_ltgt.perl", "begin": "(qr)\\s*\u003c", "end": "\u003e", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_ltgt_interpolated" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } } }, { "name": "string.regexp.compile.nested_parens.perl", "begin": "(qr)\\s*\\(", "end": "\\)", "patterns": [ { "match": "\\$(?=[^\\s\\w\\\\'\\{\\[\\(\\\u003c])" }, { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_parens_interpolated" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } } }, { "name": "string.regexp.compile.single-quote.perl", "begin": "(qr)\\s*'", "end": "'", "patterns": [ { "include": "#escaped_char" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } } }, { "name": "string.regexp.compile.simple-delimiter.perl", "begin": "(qr)\\s*([^\\s\\w'\\{\\[\\(\\\u003c])", "end": "\\2", "patterns": [ { "name": "keyword.control.anchor.perl", "match": "\\$(?=[^\\s\\w'\\{\\[\\(\\\u003c])" }, { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_parens_interpolated" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } } } ], "endCaptures": { "1": { "name": "string.regexp.compile.perl" }, "2": { "name": "punctuation.definition.string.perl" }, "3": { "name": "keyword.control.regexp-option.perl" } }, "applyEndPatternLast": true }, { "begin": "(?\u003c!\\{|\\+|\\-)\\b(?=m\\s*[^\\sa-zA-Z0-9])", "end": "((([egimosxradlupcn]*)))(?=(\\s+\\S|\\s*[;\\,\\#\\{\\}\\)]|\\s*$))", "patterns": [ { "name": "string.regexp.find-m.nested_braces.perl", "begin": "(m)\\s*\\{", "end": "\\}", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_braces_interpolated" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } } }, { "name": "string.regexp.find-m.nested_brackets.perl", "begin": "(m)\\s*\\[", "end": "\\]", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_brackets_interpolated" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } } }, { "name": "string.regexp.find-m.nested_ltgt.perl", "begin": "(m)\\s*\u003c", "end": "\u003e", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_ltgt_interpolated" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } } }, { "name": "string.regexp.find-m.nested_parens.perl", "begin": "(m)\\s*\\(", "end": "\\)", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_parens_interpolated" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } } }, { "name": "string.regexp.find-m.single-quote.perl", "begin": "(m)\\s*'", "end": "'", "patterns": [ { "include": "#escaped_char" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } } }, { "name": "string.regexp.find-m.simple-delimiter.perl", "begin": "(?\u003c!\\{|\\+|\\-)(m)(?!_)\\s*([^\\sa-zA-Z0-9'\\{\\[\\(\\\u003c])", "end": "\\2", "patterns": [ { "name": "keyword.control.anchor.perl", "match": "\\$(?=[^\\sa-zA-Z0-9'\\{\\[\\(\\\u003c])" }, { "include": "#escaped_char" }, { "include": "#variable" }, { "name": "constant.other.character-class.set.perl", "begin": "\\[", "end": "\\]", "patterns": [ { "name": "keyword.control.anchor.perl", "match": "\\$(?=[^\\s\\w'\\{\\[\\(\\\u003c])" }, { "include": "#escaped_char" } ], "beginCaptures": { "1": { "name": "punctuation.definition.character-class.begin.perl" } }, "endCaptures": { "1": { "name": "punctuation.definition.character-class.end.perl" } } }, { "include": "#nested_parens_interpolated" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } } } ], "endCaptures": { "1": { "name": "string.regexp.find-m.perl" }, "2": { "name": "punctuation.definition.string.perl" }, "3": { "name": "keyword.control.regexp-option.perl" } }, "applyEndPatternLast": true }, { "begin": "\\b(?=(?\u003c!\\\u0026)(s)(\\s+\\S|\\s*[;\\,\\{\\}\\(\\)\\[\u003c]|$))", "end": "((([egimosxradlupcn]*)))(?=(\\s+\\S|\\s*[;\\,\\{\\}\\)\\]\u003e]|\\s*$))", "patterns": [ { "name": "string.regexp.nested_braces.perl", "begin": "(s)\\s*\\{", "end": "\\}", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_braces" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } } }, { "name": "string.regexp.nested_brackets.perl", "begin": "(s)\\s*\\[", "end": "\\]", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_brackets" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } } }, { "name": "string.regexp.nested_ltgt.perl", "begin": "(s)\\s*\u003c", "end": "\u003e", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_ltgt" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } } }, { "name": "string.regexp.nested_parens.perl", "begin": "(s)\\s*\\(", "end": "\\)", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_parens" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } } }, { "name": "string.regexp.format.nested_braces.perl", "begin": "\\{", "end": "\\}", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_braces_interpolated" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" } } }, { "name": "string.regexp.format.nested_brackets.perl", "begin": "\\[", "end": "\\]", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_brackets_interpolated" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" } } }, { "name": "string.regexp.format.nested_ltgt.perl", "begin": "\u003c", "end": "\u003e", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_ltgt_interpolated" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" } } }, { "name": "string.regexp.format.nested_parens.perl", "begin": "\\(", "end": "\\)", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_parens_interpolated" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" } } }, { "name": "string.regexp.format.single_quote.perl", "begin": "'", "end": "'", "patterns": [ { "name": "constant.character.escape.perl", "match": "\\\\['\\\\]" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" } } }, { "name": "string.regexp.format.simple_delimiter.perl", "begin": "([^\\s\\w\\[({\u003c;])", "end": "\\1", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" } } }, { "match": "\\s+" } ], "endCaptures": { "1": { "name": "string.regexp.replace.perl" }, "2": { "name": "punctuation.definition.string.perl" }, "3": { "name": "keyword.control.regexp-option.perl" } }, "applyEndPatternLast": true }, { "begin": "\\b(?=s([^\\sa-zA-Z0-9\\[({\u003c]).*\\1([egimosxradlupcn]*)([\\}\\)\\;\\,]|\\s+))", "end": "((([egimosxradlupcn]*)))(?=([\\}\\)\\;\\,]|\\s+|\\s*$))", "patterns": [ { "name": "string.regexp.replaceXXX.simple_delimiter.perl", "begin": "(s\\s*)([^\\sa-zA-Z0-9\\[({\u003c])", "end": "(?=\\2)", "patterns": [ { "include": "#escaped_char" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } } }, { "name": "string.regexp.replaceXXX.format.single_quote.perl", "begin": "'", "end": "'", "patterns": [ { "name": "constant.character.escape.perl.perl", "match": "\\\\['\\\\]" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" } } }, { "name": "string.regexp.replaceXXX.format.simple_delimiter.perl", "begin": "([^\\sa-zA-Z0-9\\[({\u003c])", "end": "\\1", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" } } } ], "endCaptures": { "1": { "name": "string.regexp.replace.perl" }, "2": { "name": "punctuation.definition.string.perl" }, "3": { "name": "keyword.control.regexp-option.perl" } } }, { "begin": "\\b(?=(?\u003c!\\\\)s\\s*([^\\s\\w\\[({\u003c\u003e]))", "end": "((([egimosradlupc]*x[egimosradlupc]*)))\\b", "patterns": [ { "name": "string.regexp.replace.extended.simple_delimiter.perl", "begin": "(s)\\s*(.)", "end": "(?=\\2)", "patterns": [ { "include": "#escaped_char" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } } }, { "name": "string.regexp.replace.extended.simple_delimiter.perl", "begin": "'", "end": "'(?=[egimosradlupc]*x[egimosradlupc]*)\\b", "patterns": [ { "include": "#escaped_char" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" } } }, { "name": "string.regexp.replace.extended.simple_delimiter.perl", "begin": "(.)", "end": "\\1(?=[egimosradlupc]*x[egimosradlupc]*)\\b", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" } ], "captures": { "0": { "name": "punctuation.definition.string.perl" } } } ], "endCaptures": { "1": { "name": "string.regexp.replace.perl" }, "2": { "name": "punctuation.definition.string.perl" }, "3": { "name": "keyword.control.regexp-option.perl" } } }, { "contentName": "string.regexp.find.perl", "begin": "(?\u003c=\\(|\\{|~|\u0026|\\||if|unless|^)\\s*((\\/))", "end": "((\\1([egimosxradlupcn]*)))(?=(\\s+\\S|\\s*[;\\,\\#\\{\\}\\)]|\\s*$))", "patterns": [ { "name": "keyword.control.anchor.perl", "match": "\\$(?=\\/)" }, { "include": "#escaped_char" }, { "include": "#variable" } ], "beginCaptures": { "1": { "name": "string.regexp.find.perl" }, "2": { "name": "punctuation.definition.string.perl" } }, "endCaptures": { "1": { "name": "string.regexp.find.perl" }, "2": { "name": "punctuation.definition.string.perl" }, "3": { "name": "keyword.control.regexp-option.perl" } } }, { "match": "\\b(\\w+)\\s*(?==\u003e)", "captures": { "1": { "name": "constant.other.key.perl" } } }, { "name": "constant.other.bareword.perl", "match": "(?\u003c={)\\s*\\w+\\s*(?=})" }, { "name": "meta.class.perl", "match": "^\\s*(package)\\s+([^\\s;]+)", "captures": { "1": { "name": "keyword.control.perl" }, "2": { "name": "entity.name.type.class.perl" } } }, { "name": "meta.function.perl", "match": "\\b(sub)(?:\\s+([-a-zA-Z0-9_]+))?\\s*(?:\\([\\$\\@\\*;]*\\))?[^\\w\\{]", "captures": { "1": { "name": "storage.type.sub.perl" }, "2": { "name": "entity.name.function.perl" }, "3": { "name": "storage.type.method.perl" } } }, { "name": "meta.function.perl", "match": "^\\s*(BEGIN|UNITCHECK|CHECK|INIT|END|DESTROY)\\b", "captures": { "1": { "name": "entity.name.function.perl" }, "2": { "name": "punctuation.definition.parameters.perl" }, "3": { "name": "variable.parameter.function.perl" } } }, { "name": "meta.leading-tabs", "begin": "^(?=(\\t| {4}))", "end": "(?=[^\\t\\s])", "patterns": [ { "match": "(\\t| {4})(\\t| {4})?", "captures": { "1": { "name": "meta.odd-tab" }, "2": { "name": "meta.even-tab" } } } ] }, { "name": "string.regexp.replace.perl", "match": "\\b(tr|y)\\s*([^A-Za-z0-9\\s])(.*?)(?\u003c!\\\\)(\\\\{2})*(\\2)(.*?)(?\u003c!\\\\)(\\\\{2})*(\\2)", "captures": { "1": { "name": "support.function.perl" }, "2": { "name": "punctuation.definition.string.perl" }, "5": { "name": "punctuation.definition.string.perl" }, "8": { "name": "punctuation.definition.string.perl" } } }, { "name": "constant.language.perl", "match": "\\b(__FILE__|__LINE__|__PACKAGE__|__SUB__)\\b" }, { "contentName": "comment.block.documentation.perl", "begin": "\\b(__DATA__|__END__)\\n?", "end": "\\z", "patterns": [ { "include": "#pod" } ], "beginCaptures": { "1": { "name": "constant.language.perl" } } }, { "name": "keyword.control.perl", "match": "(?\u003c!-\u003e)\\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": "storage.modifier.perl", "match": "\\b(my|our|local)\\b" }, { "name": "keyword.operator.filetest.perl", "match": "(?\u003c!\\w)\\-[rwxoRWXOezsfdlpSbctugkTBMAC]\\b" }, { "name": "keyword.operator.logical.perl", "match": "\\b(and|or|xor|as|not)\\b" }, { "name": "keyword.operator.comparison.perl", "match": "(\u003c=\u003e|=\u003e|-\u003e)" }, { "contentName": "text.html.embedded.perl", "begin": "(((\u003c\u003c) *\"HTML\"))(.*)\\n?", "end": "(^HTML$)", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "text.html.basic" } ], "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", "begin": "(((\u003c\u003c) *\"XML\"))(.*)\\n?", "end": "(^XML$)", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "text.xml" } ], "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", "begin": "(((\u003c\u003c) *\"CSS\"))(.*)\\n?", "end": "(^CSS$)", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "source.css" } ], "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", "begin": "(((\u003c\u003c) *\"JAVASCRIPT\"))(.*)\\n?", "end": "(^JAVASCRIPT$)", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "source.js" } ], "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", "begin": "(((\u003c\u003c) *\"SQL\"))(.*)\\n?", "end": "(^SQL$)", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "source.sql" } ], "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", "begin": "(((\u003c\u003c) *\"POSTSCRIPT\"))(.*)\\n?", "end": "(^POSTSCRIPT$)", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "source.postscript" } ], "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", "begin": "(((\u003c\u003c) *\"([^\"]*)\"))(.*)\\n?", "end": "(^\\4$)", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" } ], "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", "begin": "(((\u003c\u003c) *'HTML'))(.*)\\n?", "end": "(^HTML$)", "patterns": [ { "include": "text.html.basic" } ], "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", "begin": "(((\u003c\u003c) *'XML'))(.*)\\n?", "end": "(^XML$)", "patterns": [ { "include": "text.xml" } ], "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", "begin": "(((\u003c\u003c) *'CSS'))(.*)\\n?", "end": "(^CSS$)", "patterns": [ { "include": "source.css" } ], "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", "begin": "(((\u003c\u003c) *'JAVASCRIPT'))(.*)\\n?", "end": "(^JAVASCRIPT$)", "patterns": [ { "include": "source.js" } ], "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", "begin": "(((\u003c\u003c) *'SQL'))(.*)\\n?", "end": "(^SQL$)", "patterns": [ { "include": "source.sql" } ], "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", "begin": "(((\u003c\u003c) *'POSTSCRIPT'))(.*)\\n?", "end": "(^POSTSCRIPT$)", "patterns": [ { "include": "source.postscript" } ], "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", "begin": "(((\u003c\u003c) *'([^']*)'))(.*)\\n?", "end": "(^\\4$)", "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", "begin": "(((\u003c\u003c) *\\\\((?![=\\d\\$\\( ])[^;,'\"`\\s\\)]*)))(.*)\\n?", "end": "(^\\4$)", "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.backtick.perl", "begin": "(((\u003c\u003c) *`([^`]*)`))(.*)\\n?", "end": "(^\\4$)", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" } ], "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": "text.html.embedded.perl", "begin": "(((\u003c\u003c) *HTML\\b))(.*)\\n?", "end": "(^HTML$)", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "text.html.basic" } ], "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", "begin": "(((\u003c\u003c) *XML\\b))(.*)\\n?", "end": "(^XML$)", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "text.xml" } ], "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", "begin": "(((\u003c\u003c) *JAVASCRIPT\\b))(.*)\\n?", "end": "(^JAVASCRIPT$)", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "source.js" } ], "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", "begin": "(((\u003c\u003c) *SQL\\b))(.*)\\n?", "end": "(^SQL$)", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "source.sql" } ], "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", "begin": "(((\u003c\u003c) *POSTSCRIPT\\b))(.*)\\n?", "end": "(^POSTSCRIPT$)", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "source.postscript" } ], "captures": { "1": { "name": "punctuation.definition.string.perl" }, "2": { "name": "string.unquoted.heredoc.perl" }, "3": { "name": "punctuation.definition.heredoc.perl" }, "4": { "patterns": [ { "include": "$self" } ] } } }, { "contentName": "string.unquoted.heredoc.perl", "begin": "(((\u003c\u003c) *((?![=\\d\\$\\( ])[^;,'\"`\\s\\)]*)))(.*)\\n?", "end": "(^\\4$)", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" } ], "captures": { "1": { "name": "punctuation.definition.string.perl" }, "2": { "name": "string.unquoted.heredoc.perl" }, "3": { "name": "punctuation.definition.heredoc.perl" }, "5": { "patterns": [ { "include": "$self" } ] } } }, { "name": "string.quoted.other.qq.perl", "begin": "\\bqq\\s*([^\\(\\{\\[\\\u003c\\w\\s])", "end": "\\1", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } } }, { "name": "string.interpolated.qx.perl", "begin": "\\bqx\\s*([^'\\(\\{\\[\\\u003c\\w\\s])", "end": "\\1", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } } }, { "name": "string.interpolated.qx.single-quote.perl", "begin": "\\bqx\\s*'", "end": "'", "patterns": [ { "include": "#escaped_char" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } } }, { "name": "string.quoted.double.perl", "begin": "\"", "end": "\"", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } } }, { "name": "string.quoted.other.q.perl", "begin": "(?\u003c!-\u003e)\\bqw?\\s*([^\\(\\{\\[\\\u003c\\w\\s])", "end": "\\1", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } } }, { "name": "string.quoted.single.perl", "begin": "'", "end": "'", "patterns": [ { "name": "constant.character.escape.perl", "match": "\\\\['\\\\]" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } } }, { "name": "string.interpolated.perl", "begin": "`", "end": "`", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } } }, { "name": "string.quoted.other.qq-paren.perl", "begin": "(?\u003c!-\u003e)\\bqq\\s*\\(", "end": "\\)", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_parens_interpolated" }, { "include": "#variable" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } } }, { "name": "string.quoted.other.qq-brace.perl", "begin": "\\bqq\\s*\\{", "end": "\\}", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_braces_interpolated" }, { "include": "#variable" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } } }, { "name": "string.quoted.other.qq-bracket.perl", "begin": "\\bqq\\s*\\[", "end": "\\]", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_brackets_interpolated" }, { "include": "#variable" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } } }, { "name": "string.quoted.other.qq-ltgt.perl", "begin": "\\bqq\\s*\\\u003c", "end": "\\\u003e", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_ltgt_interpolated" }, { "include": "#variable" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } } }, { "name": "string.interpolated.qx-paren.perl", "begin": "(?\u003c!-\u003e)\\bqx\\s*\\(", "end": "\\)", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_parens_interpolated" }, { "include": "#variable" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } } }, { "name": "string.interpolated.qx-brace.perl", "begin": "\\bqx\\s*\\{", "end": "\\}", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_braces_interpolated" }, { "include": "#variable" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } } }, { "name": "string.interpolated.qx-bracket.perl", "begin": "\\bqx\\s*\\[", "end": "\\]", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_brackets_interpolated" }, { "include": "#variable" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } } }, { "name": "string.interpolated.qx-ltgt.perl", "begin": "\\bqx\\s*\\\u003c", "end": "\\\u003e", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_ltgt_interpolated" }, { "include": "#variable" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } } }, { "name": "string.quoted.other.q-paren.perl", "begin": "(?\u003c!-\u003e)\\bqw?\\s*\\(", "end": "\\)", "patterns": [ { "include": "#nested_parens" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } } }, { "name": "string.quoted.other.q-brace.perl", "begin": "\\bqw?\\s*\\{", "end": "\\}", "patterns": [ { "include": "#nested_braces" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } } }, { "name": "string.quoted.other.q-bracket.perl", "begin": "\\bqw?\\s*\\[", "end": "\\]", "patterns": [ { "include": "#nested_brackets" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } } }, { "name": "string.quoted.other.q-ltgt.perl", "begin": "\\bqw?\\s*\\\u003c", "end": "\\\u003e", "patterns": [ { "include": "#nested_ltgt" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } } }, { "name": "string.unquoted.program-block.perl", "begin": "^__\\w+__", "end": "$", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } } }, { "name": "meta.format.perl", "begin": "\\b(format)\\s+(\\w+)\\s*=", "end": "^\\.\\s*$", "patterns": [ { "include": "#line_comment" }, { "include": "#variable" } ], "beginCaptures": { "1": { "name": "support.function.perl" }, "2": { "name": "entity.name.function.format.perl" } } }, { "match": "\\b(x)\\s*(\\d+)\\b", "captures": { "1": { "name": "support.function.perl" }, "2": { "name": "entity.name.function.perl" } } }, { "name": "support.function.perl", "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" }, { "match": "(\\{)(\\})", "captures": { "1": { "name": "punctuation.section.scope.begin.perl" }, "2": { "name": "punctuation.section.scope.end.perl" } } }, { "match": "(\\()(\\))", "captures": { "1": { "name": "punctuation.section.scope.begin.perl" }, "2": { "name": "punctuation.section.scope.end.perl" } } } ], "repository": { "escaped_char": { "patterns": [ { "name": "constant.character.escape.perl", "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*\\}|\u003c\\w*\u003e|'\\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": "\\\\." } ] }, "line_comment": { "patterns": [ { "begin": "(^[ \\t]+)?(?=#)", "end": "(?!\\G)", "patterns": [ { "name": "comment.line.number-sign.perl", "begin": "#", "end": "\\n", "beginCaptures": { "0": { "name": "punctuation.definition.comment.perl" } } } ], "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.perl" } } } ] }, "nested_braces": { "begin": "\\{", "end": "\\}", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_braces" } ], "captures": { "1": { "name": "punctuation.section.scope.perl" } } }, "nested_braces_interpolated": { "begin": "\\{", "end": "\\}", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_braces_interpolated" } ], "captures": { "1": { "name": "punctuation.section.scope.perl" } } }, "nested_brackets": { "begin": "\\[", "end": "\\]", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_brackets" } ], "captures": { "1": { "name": "punctuation.section.scope.perl" } } }, "nested_brackets_interpolated": { "begin": "\\[", "end": "\\]", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_brackets_interpolated" } ], "captures": { "1": { "name": "punctuation.section.scope.perl" } } }, "nested_ltgt": { "begin": "\u003c", "end": "\u003e", "patterns": [ { "include": "#nested_ltgt" } ], "captures": { "1": { "name": "punctuation.section.scope.perl" } } }, "nested_ltgt_interpolated": { "begin": "\u003c", "end": "\u003e", "patterns": [ { "include": "#variable" }, { "include": "#nested_ltgt_interpolated" } ], "captures": { "1": { "name": "punctuation.section.scope.perl" } } }, "nested_parens": { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_parens" } ], "captures": { "1": { "name": "punctuation.section.scope.perl" } } }, "nested_parens_interpolated": { "begin": "\\(", "end": "\\)", "patterns": [ { "name": "keyword.control.anchor.perl", "match": "\\$(?=[^\\s\\w'\\{\\[\\(\\\u003c])" }, { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_parens_interpolated" } ], "captures": { "1": { "name": "punctuation.section.scope.perl" } } }, "pod": { "patterns": [ { "name": "storage.type.class.pod.perl", "match": "^=(pod|back|cut)\\b" }, { "name": "meta.embedded.pod.perl", "contentName": "text.embedded.html.basic", "begin": "^(=begin)\\s+(html)\\s*$", "end": "^(=end)\\s+(html)|^(?==cut)", "patterns": [ { "include": "text.html.basic" } ], "beginCaptures": { "1": { "name": "storage.type.class.pod.perl" }, "2": { "name": "variable.other.pod.perl" } }, "endCaptures": { "1": { "name": "storage.type.class.pod.perl" }, "2": { "name": "variable.other.pod.perl" } } }, { "match": "^(=(?:head[1-4]|item|over|encoding|begin|end|for))\\b\\s*(.*)", "captures": { "1": { "name": "storage.type.class.pod.perl" }, "2": { "name": "variable.other.pod.perl", "patterns": [ { "include": "#pod-formatting" } ] } } }, { "include": "#pod-formatting" } ] }, "pod-formatting": { "patterns": [ { "name": "entity.name.type.instance.pod.perl", "match": "I(?:\u003c([^\u003c\u003e]+)\u003e|\u003c+(\\s+(?:(?\u003c!\\s)\u003e|[^\u003e])+\\s+)\u003e+)", "captures": { "1": { "name": "markup.italic.pod.perl" }, "2": { "name": "markup.italic.pod.perl" } } }, { "name": "entity.name.type.instance.pod.perl", "match": "B(?:\u003c([^\u003c\u003e]+)\u003e|\u003c+(\\s+(?:(?\u003c!\\s)\u003e|[^\u003e])+\\s+)\u003e+)", "captures": { "1": { "name": "markup.bold.pod.perl" }, "2": { "name": "markup.bold.pod.perl" } } }, { "name": "entity.name.type.instance.pod.perl", "match": "C(?:\u003c([^\u003c\u003e]+)\u003e|\u003c+(\\\\s+(?:(?\u003c!\\\\s)\u003e|[^\u003e])+\\\\s+)\u003e+)", "captures": { "1": { "name": "markup.raw.pod.perl" }, "2": { "name": "markup.raw.pod.perl" } } }, { "name": "entity.name.type.instance.pod.perl", "match": "L\u003c([^\u003e]+)\u003e", "captures": { "1": { "name": "markup.underline.link.hyperlink.pod.perl" } } }, { "name": "entity.name.type.instance.pod.perl", "match": "[EFSXZ]\u003c[^\u003e]*\u003e" } ] }, "variable": { "patterns": [ { "name": "variable.other.regexp.match.perl", "match": "(\\$)\u0026(?![A-Za-z0-9_])", "captures": { "1": { "name": "punctuation.definition.variable.perl" } } }, { "name": "variable.other.regexp.pre-match.perl", "match": "(\\$)`(?![A-Za-z0-9_])", "captures": { "1": { "name": "punctuation.definition.variable.perl" } } }, { "name": "variable.other.regexp.post-match.perl", "match": "(\\$)'(?![A-Za-z0-9_])", "captures": { "1": { "name": "punctuation.definition.variable.perl" } } }, { "name": "variable.other.regexp.last-paren-match.perl", "match": "(\\$)\\+(?![A-Za-z0-9_])", "captures": { "1": { "name": "punctuation.definition.variable.perl" } } }, { "name": "variable.other.readwrite.list-separator.perl", "match": "(\\$)\"(?![A-Za-z0-9_])", "captures": { "1": { "name": "punctuation.definition.variable.perl" } } }, { "name": "variable.other.predefined.program-name.perl", "match": "(\\$)0(?![A-Za-z0-9_])", "captures": { "1": { "name": "punctuation.definition.variable.perl" } } }, { "name": "variable.other.predefined.perl", "match": "(\\$)[_ab\\*\\.\\/\\|,\\\\;#%=\\-~^:?!\\$\u003c\u003e\\(\\)\\[\\]@](?![A-Za-z0-9_])", "captures": { "1": { "name": "punctuation.definition.variable.perl" } } }, { "name": "variable.other.subpattern.perl", "match": "(\\$)[0-9]+(?![A-Za-z0-9_])", "captures": { "1": { "name": "punctuation.definition.variable.perl" } } }, { "name": "variable.other.readwrite.global.perl", "match": "([\\$\\@\\%](#)?)([a-zA-Zx7f-xff\\$]|::)([a-zA-Z0-9_x7f-xff\\$]|::)*\\b", "captures": { "1": { "name": "punctuation.definition.variable.perl" } } }, { "name": "variable.other.readwrite.global.perl", "match": "(\\$\\{)(?:[a-zA-Zx7f-xff\\$]|::)(?:[a-zA-Z0-9_x7f-xff\\$]|::)*(\\})", "captures": { "1": { "name": "punctuation.definition.variable.perl" }, "2": { "name": "punctuation.definition.variable.perl" } } }, { "name": "variable.other.readwrite.global.special.perl", "match": "([\\$\\@\\%](#)?)[0-9_]\\b", "captures": { "1": { "name": "punctuation.definition.variable.perl" } } } ] } } }