diff --git a/Perl/Perl.sublime-syntax b/Perl/Perl.sublime-syntax
index 2eb6ab92e9..11ff718666 100644
--- a/Perl/Perl.sublime-syntax
+++ b/Perl/Perl.sublime-syntax
@@ -2,7 +2,6 @@
---
# http://www.sublimetext.com/docs/3/syntax.html
name: Perl
-comment: "TODO: Include RegExp syntax"
file_extensions:
- pl
- pm
@@ -11,1092 +10,1046 @@ file_extensions:
- PL
first_line_match: ^#!.*\bperl\b
scope: source.perl
+
+variables:
+ break: (?!\w| *::)
+ identifier: '\b[_[:alpha:]]\w*{{break}}'
+ module: '\b[_[:upper:]]\w*\b'
+ member: '\b[_[:lower:]]\w*\b'
+ pod: '={{identifier}}'
+ regexp_delim: '[^\w\s\)\]\}\>]'
+ regexp_flags: '[msixpodualngcer]+\b'
+
contexts:
main:
- - include: line_comment
- - match: ^=
- captures:
- 0: punctuation.definition.comment.perl
- push:
- - meta_scope: comment.block.documentation.perl
- - match: ^=cut
- captures:
- 0: punctuation.definition.comment.perl
- pop: true
- - include: variable
- - match: '\b(?=qr\s*[^\s\w])'
- comment: string.regexp.compile.perl
- push:
- - match: '(qr)\s*\{'
- captures:
- 0: punctuation.definition.string.perl
- 1: support.function.perl
- push:
- - meta_scope: string.regexp.compile.nested_braces.perl
- - match: '\}'
- captures:
- 0: punctuation.definition.string.perl
- 1: support.function.perl
- pop: true
- - include: escaped_char
- - include: variable
- - include: nested_braces_interpolated
- - match: '(qr)\s*\['
- captures:
- 0: punctuation.definition.string.perl
- 1: support.function.perl
- push:
- - meta_scope: string.regexp.compile.nested_brackets.perl
- - match: '\]'
- captures:
- 0: punctuation.definition.string.perl
- 1: support.function.perl
- pop: true
- - include: escaped_char
- - include: variable
- - include: nested_brackets_interpolated
- - match: (qr)\s*<
- captures:
- 0: punctuation.definition.string.perl
- 1: support.function.perl
- push:
- - meta_scope: string.regexp.compile.nested_ltgt.perl
- - match: ">"
- captures:
- 0: punctuation.definition.string.perl
- 1: support.function.perl
- pop: true
- - include: escaped_char
- - include: variable
- - include: nested_ltgt_interpolated
- - match: (qr)\s*\(
- captures:
- 0: punctuation.definition.string.perl
- 1: support.function.perl
- push:
- - meta_scope: string.regexp.compile.nested_parens.perl
- - match: \)
- captures:
- 0: punctuation.definition.string.perl
- 1: support.function.perl
- pop: true
- - include: escaped_char
- - include: variable
- - include: nested_parens_interpolated
- - match: (qr)\s*\'
- captures:
- 0: punctuation.definition.string.perl
- 1: support.function.perl
- push:
- - meta_scope: string.regexp.compile.single-quote.perl
- - match: \'
- captures:
- 0: punctuation.definition.string.perl
- 1: support.function.perl
- pop: true
- - include: escaped_char
- - match: '(qr)\s*([^\s\w\''\{\[\(\<])'
- captures:
- 0: punctuation.definition.string.perl
- 1: support.function.perl
- push:
- - meta_scope: string.regexp.compile.simple-delimiter.perl
- - match: \2
- captures:
- 0: punctuation.definition.string.perl
- 1: support.function.perl
- pop: true
- - match: '\$(?=[^\s\w\''\{\[\(\<])'
- comment: This is to prevent thinks like qr/foo$/ to treat $/ as a variable
- scope: keyword.control.anchor.perl
- - include: escaped_char
- - include: variable
- - include: nested_parens_interpolated
- - match: '((([egimosx]*)))(?=(\s+\S|\s*[;\,\#\{\}\)]|$))'
- captures:
- 1: string.regexp.compile.perl
- 2: punctuation.definition.string.perl
- 3: keyword.control.regexp-option.perl
- pop: true
- - match: '\b(?=(?"
- captures:
- 0: punctuation.definition.string.perl
- 1: support.function.perl
- pop: true
- - include: escaped_char
- - include: nested_ltgt
- - match: (s)\s*\(
- captures:
- 0: punctuation.definition.string.perl
- 1: support.function.perl
- push:
- - meta_scope: string.regexp.nested_parens.perl
- - match: \)
- captures:
- 0: punctuation.definition.string.perl
- 1: support.function.perl
- pop: true
- - include: escaped_char
- - include: nested_parens
- - match: '\{'
- captures:
- 0: punctuation.definition.string.perl
- push:
- - meta_scope: string.regexp.format.nested_braces.perl
- - match: '\}'
- captures:
- 0: punctuation.definition.string.perl
- pop: true
- - include: escaped_char
- - include: variable
- - include: nested_braces_interpolated
- - match: '\['
- captures:
- 0: punctuation.definition.string.perl
- push:
- - meta_scope: string.regexp.format.nested_brackets.perl
- - match: '\]'
- captures:
- 0: punctuation.definition.string.perl
- pop: true
- - include: escaped_char
- - include: variable
- - include: nested_brackets_interpolated
- - match: "<"
- captures:
- 0: punctuation.definition.string.perl
- push:
- - meta_scope: string.regexp.format.nested_ltgt.perl
- - match: ">"
- captures:
- 0: punctuation.definition.string.perl
- pop: true
- - include: escaped_char
- - include: variable
- - include: nested_ltgt_interpolated
- - match: \(
- captures:
- 0: punctuation.definition.string.perl
- push:
- - meta_scope: string.regexp.format.nested_parens.perl
- - match: \)
- captures:
- 0: punctuation.definition.string.perl
- pop: true
- - include: escaped_char
- - include: variable
- - include: nested_parens_interpolated
- - match: "'"
- captures:
- 0: punctuation.definition.string.perl
- push:
- - meta_scope: string.regexp.format.single_quote.perl
- - match: "'"
- captures:
- 0: punctuation.definition.string.perl
- pop: true
- - match: '\\[''\\]'
- scope: constant.character.escape.perl
- - match: '([^\s\w\[({<;])'
- captures:
- 0: punctuation.definition.string.perl
- push:
- - meta_scope: string.regexp.format.simple_delimiter.perl
- - match: \1
- captures:
- 0: punctuation.definition.string.perl
- pop: true
- - include: escaped_char
- - include: variable
- - match: \s+
- - match: '((([egimosx]*)))(?=(\s+\S|\s*[;\,\#\{\}\)\]>]|$))'
- captures:
- 1: string.regexp.replace.perl
- 2: punctuation.definition.string.perl
- 3: keyword.control.regexp-option.perl
- pop: true
- - match: '\b(?=s([^\s\w\[({<]).*\1([egimos]*)([\}\)\;\,]|\s+))'
- comment: string.regexp.replaceXXX
- push:
- - match: '((([egimos]*)))(?=([\}\)\;\,]|\s+|$))'
- captures:
- 1: string.regexp.replace.perl
- 2: punctuation.definition.string.perl
- 3: keyword.control.regexp-option.perl
- pop: true
- - match: '(s\s*)([^\s\w\[({<])'
- captures:
- 0: punctuation.definition.string.perl
- 1: support.function.perl
- push:
- - meta_scope: string.regexp.replaceXXX.simple_delimiter.perl
- - match: (?=\2)
- captures:
- 0: punctuation.definition.string.perl
- 1: support.function.perl
- pop: true
- - include: escaped_char
- - match: "'"
- captures:
- 0: punctuation.definition.string.perl
- push:
- - meta_scope: string.regexp.replaceXXX.format.single_quote.perl
- - match: "'"
- captures:
- 0: punctuation.definition.string.perl
- pop: true
- - match: '\\[''\\]'
- scope: constant.character.escape.perl.perl
- - match: '([^\s\w\[({<])'
- captures:
- 0: punctuation.definition.string.perl
- push:
- - meta_scope: string.regexp.replaceXXX.format.simple_delimiter.perl
- - match: \1
- captures:
- 0: punctuation.definition.string.perl
- pop: true
- - include: escaped_char
- - include: variable
- - match: '\b(?=(?)
- scope: constant.other.key.perl
- - match: '(?<={)\s*\w+\s*(?=})'
- scope: constant.other.bareword.perl
- - match: '(?
- captures:
- 0: punctuation.definition.string.end.perl
- pop: true
- - include: escaped_char
- - include: nested_ltgt_interpolated
- - include: variable
- - match: '\b(s|tr|y)\s*([^A-Za-z0-9\s])(.*?)(?)\b(continue|die|do|else|elsif|exit|for|foreach|goto|if|last|next|redo|return|select|unless|until|wait|while|switch|case|package|require|use|eval)\b
- scope: keyword.control.perl
- - match: \b(my|our|local)\b
- scope: storage.modifier.perl
- - match: '(?| =>|->)
- scope: keyword.operator.comparison.perl
- - match: ((<<) *"HTML").*\n?
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.doublequote.perl
- 2: punctuation.definition.heredoc.perl
- push:
- - meta_content_scope: text.html.embedded.perl
- - match: (^HTML$)
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.doublequote.perl
- 2: punctuation.definition.heredoc.perl
- pop: true
- - include: escaped_char
- - include: variable
- - include: scope:text.html.basic
- - match: ((<<) *"XML").*\n?
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.doublequote.perl
- 2: punctuation.definition.heredoc.perl
- push:
- - meta_content_scope: text.xml.embedded.perl
- - match: (^XML$)
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.doublequote.perl
- 2: punctuation.definition.heredoc.perl
- pop: true
- - include: escaped_char
- - include: variable
- - include: scope:text.xml
- - match: ((<<) *"CSS").*\n?
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.doublequote.perl
- 2: punctuation.definition.heredoc.perl
- push:
- - meta_content_scope: text.css.embedded.perl
- - match: (^CSS$)
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.doublequote.perl
- 2: punctuation.definition.heredoc.perl
- pop: true
- - include: escaped_char
- - include: variable
- - include: scope:source.css
- - match: ((<<) *"JAVASCRIPT").*\n?
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.doublequote.perl
- 2: punctuation.definition.heredoc.perl
- push:
- - meta_content_scope: text.js.embedded.perl
- - match: (^JAVASCRIPT$)
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.doublequote.perl
- 2: punctuation.definition.heredoc.perl
- pop: true
- - include: escaped_char
- - include: variable
- - include: scope:source.js
- - match: ((<<) *"SQL").*\n?
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.doublequote.perl
- 2: punctuation.definition.heredoc.perl
- push:
- - meta_content_scope: source.sql.embedded.perl
- - match: (^SQL$)
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.doublequote.perl
- 2: punctuation.definition.heredoc.perl
- pop: true
- - include: escaped_char
- - include: variable
- - include: scope:source.sql
- - match: '((<<) *"([^"]*)").*\n?'
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.doublequote.perl
- 2: punctuation.definition.heredoc.perl
- push:
- - meta_content_scope: string.unquoted.heredoc.doublequote.perl
- - match: (^\3$)
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.doublequote.perl
- 2: punctuation.definition.heredoc.perl
+ - meta_scope: comment.line.number-sign.perl
+ - match: $
pop: true
- - include: escaped_char
- - include: variable
- - match: ((<<) *'HTML').*\n?
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.quote.perl
- 2: punctuation.definition.heredoc.perl
+
+ comment-pod:
+ # SEE: http://perldoc.perl.org/perlpod.html
+ - match: ^{{pod}}
+ scope: entity.name.tag.pod.perl
push:
- - meta_content_scope: text.html.embedded.perl
- - match: (^HTML$)
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.quote.perl
- 2: punctuation.definition.heredoc.perl
- pop: true
- - include: scope:text.html.basic
- - match: ((<<) *'XML').*\n?
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.quote.perl
- 2: punctuation.definition.heredoc.perl
+ - meta_scope: comment.block.documentation.perl
+ - meta_content_scope: string.unquoted.perl
+ - match: $\n?
+ set: comment-pod-body
+ - include: comment-pod-formatting
+
+ comment-pod-body:
+ - meta_content_scope: comment.block.documentation.perl
+ - match: ^=cut\b
+ scope: comment.block.documentation.perl entity.name.tag.pod.perl
+ pop: true
+ - include: comment-pod-embedded
+ - include: comment-pod-keyword
+ - include: comment-pod-formatting
+ - match: \t+
+ scope: invalid.deprecated.perl
+
+ comment-pod-embedded:
+ - match: ^=begin\s+
+ scope: entity.name.tag.pod.perl
push:
- - meta_content_scope: text.xml.embedded.perl
- - match: (^XML$)
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.quote.perl
- 2: punctuation.definition.heredoc.perl
+ # end embedded section
+ - match: ^=end\b
+ scope: entity.name.tag.pod.perl
pop: true
- - include: scope:text.xml
- - match: ((<<) *'CSS').*\n?
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.quote.perl
- 2: punctuation.definition.heredoc.perl
- push:
- - meta_content_scope: text.css.embedded.perl
- - match: (^CSS$)
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.quote.perl
- 2: punctuation.definition.heredoc.perl
+ # embedded css
+ - match: \bcss\b
+ scope: string.unquoted.perl
+ embed: scope:source.css
+ embed_scope: source.css.embedded.perl
+ escape: (?=^{{pod}})
+ # embedded html
+ - match: \bhtml\b
+ scope: string.unquoted.perl
+ embed: scope:text.html.basic
+ embed_scope: text.html.embedded.perl
+ escape: (?=^{{pod}})
+ # embedded javascript
+ - match: \b(?:js|javascript)\b
+ scope: string.unquoted.perl
+ embed: scope:source.js
+ embed_scope: source.js.embedded.perl
+ escape: (?=^{{pod}})
+ # embedded json
+ - match: \bjson\b
+ scope: string.unquoted.perl
+ embed: scope:source.json
+ embed_scope: source.json.embedded.perl
+ escape: (?=^{{pod}})
+ # embedded sql
+ - match: \bsql\b
+ scope: string.unquoted.perl
+ embed: scope:source.sql
+ embed_scope: source.sql.embedded.perl
+ escape: (?=^{{pod}})
+ # embedded xml
+ - match: \bxml\b
+ scope: string.unquoted.perl
+ embed: scope:text.xml
+ embed_scope: text.xml.embedded.perl
+ escape: (?=^{{pod}})
+ # unexpected pod command
+ - match: ^{{pod}}
+ scope: invalid.illegal.end-expected.perl
pop: true
- - include: scope:source.css
- - match: ((<<) *'JAVASCRIPT').*\n?
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.quote.perl
- 2: punctuation.definition.heredoc.perl
+ - include: else-pop
+
+ comment-pod-keyword:
+ - match: ^{{pod}}
+ scope: entity.name.tag.pod.perl
push:
- - meta_content_scope: text.js.embedded.perl
- - match: (^JAVASCRIPT$)
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.quote.perl
- 2: punctuation.definition.heredoc.perl
- pop: true
- - include: scope:source.js
- - match: ((<<) *'SQL').*\n?
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.quote.perl
- 2: punctuation.definition.heredoc.perl
+ - meta_content_scope: markup.heading.perl
+ - include: eol-pop
+ - include: comment-pod-formatting
+
+ comment-pod-formatting:
+ # non-breaking spaces : S
+ - match: (B)(<)
+ captures:
+ 1: entity.name.tag.bold.perl
+ 2: punctuation.definition.tag.begin.perl
push:
- - meta_content_scope: source.sql.embedded.perl
- - match: (^SQL$)
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.quote.perl
- 2: punctuation.definition.heredoc.perl
- pop: true
- - include: scope:source.sql
- - match: '((<<) *''([^'']*)'').*\n?'
+ - meta_content_scope: markup.bold.perl
+ - include: comment-pod-format-body
+ # inline code : C
+ - match: (C)(<)
captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.quote.perl
- 2: punctuation.definition.heredoc.perl
+ 1: entity.name.tag.code.perl
+ 2: punctuation.definition.tag.begin.perl
push:
- - meta_content_scope: string.unquoted.heredoc.quote.perl
- - match: (^\3$)
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.quote.perl
- 2: punctuation.definition.heredoc.perl
- pop: true
- - match: '((<<) *`([^`]*)`).*\n?'
+ - meta_content_scope: markup.quote.perl
+ - include: comment-pod-format-body
+ # escaped character : E
+ - match: (E)(<)
captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.backtick.perl
- 2: punctuation.definition.heredoc.perl
+ 1: entity.name.tag.escaped.perl
+ 2: punctuation.definition.tag.begin.perl
push:
- - meta_content_scope: string.unquoted.heredoc.backtick.perl
- - match: (^\3$)
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.backtick.perl
- 2: punctuation.definition.heredoc.perl
- pop: true
- - include: escaped_char
- - include: variable
- - match: ((<<) *HTML\b).*\n?
+ - meta_content_scope: constant.character.escape.perl
+ - include: comment-pod-format-body
+ # italic text : I
+ - match: (I)(<)
captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.perl
- 2: punctuation.definition.heredoc.perl
+ 1: entity.name.tag.italic.perl
+ 2: punctuation.definition.tag.begin.perl
push:
- - meta_content_scope: text.html.embedded.perl
- - match: (^HTML$)
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.perl
- 2: punctuation.definition.heredoc.perl
- pop: true
- - include: escaped_char
- - include: variable
- - include: scope:text.html.basic
- - match: ((<<) *XML\b).*\n?
+ - meta_content_scope: markup.italic.perl
+ - include: comment-pod-format-body
+ # filename : F
+ - match: (F)(<)
captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.perl
- 2: punctuation.definition.heredoc.perl
+ 1: entity.name.tag.filename.perl
+ 2: punctuation.definition.tag.begin.perl
push:
- - meta_content_scope: text.xml.embedded.perl
- - match: (^XML$)
- captures:
- 0: punctuation.definition.string.perl
- 1: string.unquoted.heredoc.perl
- 2: punctuation.definition.heredoc.perl
- pop: true
- - include: escaped_char
- - include: variable
- - include: scope:text.xml
- - match: ((<<) *SQL\b).*\n?
+ - meta_content_scope: string.unquoted.perl
+ - include: comment-pod-format-body
+ # hyperlink : L
ife
source.perl
- Conditional if..else
+ if..else.. Conditional
diff --git a/Perl/Snippets/Conditional-if..elsif..else-(ifee).sublime-snippet b/Perl/Snippets/Conditional-if..elsif..else-(ifee).sublime-snippet
index fea51337e1..4f3da11c72 100644
--- a/Perl/Snippets/Conditional-if..elsif..else-(ifee).sublime-snippet
+++ b/Perl/Snippets/Conditional-if..elsif..else-(ifee).sublime-snippet
@@ -9,5 +9,5 @@
]]>
ifee
source.perl
- Conditional if..elsif..else
+ if..elsif..else.. Conditional
diff --git a/Perl/Snippets/Conditional-one-line-(xif).sublime-snippet b/Perl/Snippets/Conditional-one-line-(xif).sublime-snippet
index 901b1a13bc..f699ffa583 100644
--- a/Perl/Snippets/Conditional-one-line-(xif).sublime-snippet
+++ b/Perl/Snippets/Conditional-one-line-(xif).sublime-snippet
@@ -3,5 +3,5 @@
]]>
xif
source.perl
- Conditional One-line
+ if.. Conditional One-line
diff --git a/Perl/Snippets/Conditional-one-line-(unless).sublime-snippet b/Perl/Snippets/Conditional-one-line-(xunless).sublime-snippet
similarity index 73%
rename from Perl/Snippets/Conditional-one-line-(unless).sublime-snippet
rename to Perl/Snippets/Conditional-one-line-(xunless).sublime-snippet
index b64a74586a..ab0e8c5e8b 100644
--- a/Perl/Snippets/Conditional-one-line-(unless).sublime-snippet
+++ b/Perl/Snippets/Conditional-one-line-(xunless).sublime-snippet
@@ -3,5 +3,5 @@
]]>
xunless
source.perl
- Conditional One-line
+ unless. Conditional One-line
diff --git a/Perl/Snippets/Conditional-one-line-(xwhen).sublime-snippet b/Perl/Snippets/Conditional-one-line-(xwhen).sublime-snippet
new file mode 100644
index 0000000000..4c0fc5b59e
--- /dev/null
+++ b/Perl/Snippets/Conditional-one-line-(xwhen).sublime-snippet
@@ -0,0 +1,7 @@
+
+
+ xwhen
+ source.perl
+ when.. Conditional One-line
+
diff --git a/Perl/Snippets/unless.sublime-snippet b/Perl/Snippets/Conditional-unless-(unless).sublime-snippet
similarity index 75%
rename from Perl/Snippets/unless.sublime-snippet
rename to Perl/Snippets/Conditional-unless-(unless).sublime-snippet
index 95f170e203..d3581de51e 100644
--- a/Perl/Snippets/unless.sublime-snippet
+++ b/Perl/Snippets/Conditional-unless-(unless).sublime-snippet
@@ -5,5 +5,5 @@
]]>
unless
source.perl
- Conditional
+ unless.. Conditional
diff --git a/Perl/Snippets/Conditional-unless..else-(unlesse).sublime-snippet b/Perl/Snippets/Conditional-unless..else-(unlesse).sublime-snippet
new file mode 100644
index 0000000000..8e3788c9b3
--- /dev/null
+++ b/Perl/Snippets/Conditional-unless..else-(unlesse).sublime-snippet
@@ -0,0 +1,11 @@
+
+
+ unlesse
+ source.perl
+ unless..else.. Conditional
+
diff --git a/Perl/Snippets/Conditional-unless..elsif..else-(unlessee).sublime-snippet b/Perl/Snippets/Conditional-unless..elsif..else-(unlessee).sublime-snippet
new file mode 100644
index 0000000000..0099a6bf7d
--- /dev/null
+++ b/Perl/Snippets/Conditional-unless..elsif..else-(unlessee).sublime-snippet
@@ -0,0 +1,13 @@
+
+
+ unlessee
+ source.perl
+ unless..elsif..else.. Conditional
+
diff --git a/Perl/Snippets/Conditional-when-(when).sublime-snippet b/Perl/Snippets/Conditional-when-(when).sublime-snippet
new file mode 100644
index 0000000000..cc1cce2648
--- /dev/null
+++ b/Perl/Snippets/Conditional-when-(when).sublime-snippet
@@ -0,0 +1,9 @@
+
+
+ when
+ source.perl
+ when.. Conditional
+
diff --git a/Perl/Snippets/for.sublime-snippet b/Perl/Snippets/Loop-for-(for).sublime-snippet
similarity index 82%
rename from Perl/Snippets/for.sublime-snippet
rename to Perl/Snippets/Loop-for-(for).sublime-snippet
index 292c484c1a..be880eba64 100644
--- a/Perl/Snippets/for.sublime-snippet
+++ b/Perl/Snippets/Loop-for-(for).sublime-snippet
@@ -5,5 +5,5 @@
]]>
for
source.perl
- Loop
+ for.. Loop
diff --git a/Perl/Snippets/foreach.sublime-snippet b/Perl/Snippets/Loop-foreach-(fore).sublime-snippet
similarity index 80%
rename from Perl/Snippets/foreach.sublime-snippet
rename to Perl/Snippets/Loop-foreach-(fore).sublime-snippet
index 57a001bee0..73912757b3 100644
--- a/Perl/Snippets/foreach.sublime-snippet
+++ b/Perl/Snippets/Loop-foreach-(fore).sublime-snippet
@@ -5,5 +5,5 @@
]]>
fore
source.perl
- Loop
+ foreach.. Loop
diff --git a/Perl/Snippets/Loop-one-line-(xfor).sublime-snippet b/Perl/Snippets/Loop-one-line-(xfor).sublime-snippet
new file mode 100644
index 0000000000..60ff5ea29f
--- /dev/null
+++ b/Perl/Snippets/Loop-one-line-(xfor).sublime-snippet
@@ -0,0 +1,7 @@
+
+
+ xfor
+ source.perl
+ for.. Loop One-line
+
diff --git a/Perl/Snippets/Loop-one-line-(xforeach).sublime-snippet b/Perl/Snippets/Loop-one-line-(xfore).sublime-snippet
similarity index 74%
rename from Perl/Snippets/Loop-one-line-(xforeach).sublime-snippet
rename to Perl/Snippets/Loop-one-line-(xfore).sublime-snippet
index 691a608db9..010a48a057 100644
--- a/Perl/Snippets/Loop-one-line-(xforeach).sublime-snippet
+++ b/Perl/Snippets/Loop-one-line-(xfore).sublime-snippet
@@ -3,5 +3,5 @@
]]>
xfore
source.perl
- Loop One-line
+ foreach.. Loop One-line
diff --git a/Perl/Snippets/Loop-one-line-(xuntil).sublime-snippet b/Perl/Snippets/Loop-one-line-(xuntil).sublime-snippet
new file mode 100644
index 0000000000..52f5e04a56
--- /dev/null
+++ b/Perl/Snippets/Loop-one-line-(xuntil).sublime-snippet
@@ -0,0 +1,7 @@
+
+
+ xuntil
+ source.perl
+ until.. Loop One-line
+
diff --git a/Perl/Snippets/Loop-one-line-(xwhile).sublime-snippet b/Perl/Snippets/Loop-one-line-(xwhile).sublime-snippet
index 860ed4a859..d54c44a721 100644
--- a/Perl/Snippets/Loop-one-line-(xwhile).sublime-snippet
+++ b/Perl/Snippets/Loop-one-line-(xwhile).sublime-snippet
@@ -3,5 +3,5 @@
]]>
xwhile
source.perl
- Loop One-line
+ while.. Loop One-line
diff --git a/Perl/Snippets/while.sublime-snippet b/Perl/Snippets/Loop-while-(while).sublime-snippet
similarity index 77%
rename from Perl/Snippets/while.sublime-snippet
rename to Perl/Snippets/Loop-while-(while).sublime-snippet
index 4853a3d4aa..853a97d533 100644
--- a/Perl/Snippets/while.sublime-snippet
+++ b/Perl/Snippets/Loop-while-(while).sublime-snippet
@@ -5,5 +5,5 @@
]]>
while
source.perl
- Loop
+ while.. Loop
diff --git a/Perl/syntax_test_perl.pl b/Perl/syntax_test_perl.pl
new file mode 100644
index 0000000000..2782fb0f7e
--- /dev/null
+++ b/Perl/syntax_test_perl.pl
@@ -0,0 +1,1289 @@
+# SYNTAX TEST "Perl.sublime-syntax"
+
+# comment ; still in here
+# ^^^^^^^^^^^^^^^^^^^^^^^ comment.line.number-sign.perl
+# ^ - punctuation
+
+### [ POD TESTS ] ############################################################
+
+=pod
+# <- comment.block.documentation.perl entity.name.tag.pod.perl
+#^^^ comment.block.documentation.perl entity.name.tag.pod.perl
+=encoding utf8
+# <- comment.block.documentation.perl entity.name.tag.pod.perl
+#^^^^^^^^^^^^^ comment.block.documentation.perl
+#^^^^^^^^ entity.name.tag.pod.perl
+# ^^^^ markup.heading.perl
+=head1 B<--param>
+# <- comment.block.documentation.perl entity.name.tag.pod.perl
+#^^^^^^^^^^^^^^^^ comment.block.documentation.perl
+#^^^^^ entity.name.tag.pod.perl
+# ^^^^^^^^^^ markup.heading.perl
+# ^ entity.name.tag.bold.perl
+# ^ punctuation.definition.tag.begin.perl
+# ^^^^^^^ markup.bold.perl
+# ^ punctuation.definition.tag.end.perl
+ B
+# ^^^^^^^ comment.block.documentation.perl
+# ^ entity.name.tag.bold.perl
+# ^ punctuation.definition.tag.begin.perl
+# ^^^^ markup.bold.perl
+# ^ punctuation.definition.tag.end.perl
+ C
+# ^^^^^^^ comment.block.documentation.perl
+# ^ entity.name.tag.code.perl
+# ^ punctuation.definition.tag.begin.perl
+# ^^^^ markup.quote.perl
+# ^ punctuation.definition.tag.end.perl
+ E
+# ^^^^^ comment.block.documentation.perl
+# ^ entity.name.tag.escaped.perl
+# ^ punctuation.definition.tag.begin.perl
+# ^^ constant.character.escape.perl
+# ^ punctuation.definition.tag.end.perl
+ F
+# ^^^^^^^^^^^ comment.block.documentation.perl
+# ^ entity.name.tag.filename.perl
+# ^ punctuation.definition.tag.begin.perl
+# ^^^^^^^^ string.unquoted.perl
+# ^ punctuation.definition.tag.end.perl
+ I
+# ^^^^^^^^^ comment.block.documentation.perl
+# ^ entity.name.tag.italic.perl
+# ^ punctuation.definition.tag.begin.perl
+# ^^^^^^ markup.italic.perl
+# ^ punctuation.definition.tag.end.perl
+
+ L
+# ^^^^^^^^^^^^^^^^^^^^^^^^ comment.block.documentation.perl
+# ^ entity.name.tag.link.perl
+# ^ punctuation.definition.tag.begin.perl
+# ^^^^^^^^^^^^^^^^^^^^ markup.underline.link.perl
+# ^ punctuation.definition.tag.end.perl
+ L
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.block.documentation.perl
+# ^ entity.name.tag.link.perl
+# ^ punctuation.definition.tag.begin.perl
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ markup.underline.link.perl
+# ^ punctuation.definition.tag.end.perl
+ S<[ B<-A> ]>
+# ^ entity.name.tag.none-braeking.perl
+# ^ punctuation.definition.tag.begin.perl
+# ^ entity.name.tag.bold.perl
+# ^ punctuation.definition.tag.begin.perl
+# ^^ markup.bold.perl
+# ^ punctuation.definition.tag.end.perl
+# ^ punctuation.definition.tag.end.perl
+ X
+# ^^^^^^^^^^^^^^ comment.block.documentation.perl
+# ^ entity.name.tag.index.perl
+# ^ punctuation.definition.tag.begin.perl
+# ^^^^^^^^^^^ entity.name.label.perl
+# ^ punctuation.definition.tag.end.perl
+ Copyright 2018 Eemail@provider.comE
+# ^ entity.name.tag.escaped.perl
+# ^ entity.name.tag.escaped.perl
+
+=begin css
+# <- entity.name.tag.pod.perl
+#^^^^^^ entity.name.tag.pod.perl
+# ^^^ string.unquoted.perl
+ a { };
+# ^^^^^^^ comment.block.documentation.perl source.css.embedded.perl source.css
+=end
+# <- comment.block.documentation.perl entity.name.tag.pod.perl
+#^^^ comment.block.documentation.perl entity.name.tag.pod.perl
+
+=begin html
+# <- comment.block.documentation.perl entity.name.tag.pod.perl
+#^^^^^^^^^^ comment.block.documentation.perl
+# ^^^^ string.unquoted.perl
+
+# <- comment.block.documentation.perl text.html.embedded.perl
+#^^^^^^^^^ comment.block.documentation.perl text.html.embedded.perl
+
+# <- comment.block.documentation.perl text.html.embedded.perl
+#^^^^^^^^^ comment.block.documentation.perl text.html.embedded.perl
+=end
+# <- comment.block.documentation.perl entity.name.tag.pod.perl
+#^^^ comment.block.documentation.perl entity.name.tag.pod.perl
+
+=begin json
+# <- entity.name.tag.pod.perl
+#^^^^^^ entity.name.tag.pod.perl
+# ^^^ string.unquoted.perl
+ {
+# ^ comment.block.documentation.perl source.json.embedded.perl source.json
+ "key": "value",
+# ^^^^^^^^^^^^^^^ comment.block.documentation.perl source.json.embedded.perl source.json
+ }
+# ^ comment.block.documentation.perl source.json.embedded.perl source.json
+=end
+# <- comment.block.documentation.perl entity.name.tag.pod.perl
+#^^^ comment.block.documentation.perl entity.name.tag.pod.perl
+
+=begin sql
+# <- entity.name.tag.pod.perl
+#^^^^^^ entity.name.tag.pod.perl
+# ^^^ string.unquoted.perl
+ SELECT * FROM `table`
+# ^^^^^^^^^^^^^^^^^^^^^ comment.block.documentation.perl source.sql.embedded.perl source.sql
+=end
+# <- comment.block.documentation.perl entity.name.tag.pod.perl
+#^^^ comment.block.documentation.perl entity.name.tag.pod.perl
+
+=cut
+# <- comment.block.documentation.perl entity.name.tag.pod.perl
+#^^^ comment.block.documentation.perl entity.name.tag.pod.perl
+
+### [ FORMAT ] ###############################################################
+
+format name =
+# <- meta.block.format.perl storage.type.format.perl
+#^^^^^^^^^^^^^ meta.block.format.perl
+#^^^^^ storage.type.format.perl
+# ^^^^ variable.other.perl
+# ^ keyword.operator.assignment.perl
+ ^#.###
+# ^ punctuation.definition.placeholder.begin.perl
+# ^^^^^^ variable.parameter.special-field.perl
+ @#.###
+# ^ punctuation.definition.placeholder.begin.perl
+# ^^^^^^ variable.parameter.regular-field.perl
+ ^*
+# ^^ variable.parameter.multiline-width.perl
+ @*
+# ^^ variable.parameter.multiline-width.perl
+ @variable
+# ^^^^^^^^^ variable.other.readwrite.global.perl
+# ^ punctuation.definition.variable.perl
+ ...
+# ^^^ constant.character.escape.perl
+ ~
+# ^ constant.character.escape.perl
+ ~~
+# ^^ constant.character.escape.perl
+.
+# <- punctuation.terminator.format.perl
+
+### [ HEREDOC ] ##############################################################
+
+$var = << CSS;
+# ^^^^^^^ meta.heredoc.perl
+# ^^ keyword.operator.heredoc.perl
+# ^^^ string.other.heredoc.perl constant.language.heredoc.css.perl
+# ^ punctuation.terminator.statement.perl
+ a { };
+# ^^^^^^^ meta.heredoc.perl source.css.embedded.perl source.css
+CSS
+# <- meta.heredoc.perl constant.language.heredoc.css.perl
+#^^ meta.heredoc.perl constant.language.heredoc.css.perl
+
+$var = <
+# <- meta.heredoc.perl text.html.embedded.perl
+#^^^^^^^^^ meta.heredoc.perl text.html.embedded.perl
+HTML
+# <- meta.heredoc.perl constant.language.heredoc.html.perl
+#^^^ meta.heredoc.perl constant.language.heredoc.html.perl
+
+$var = <<'HTML';
+# <- variable.other.readwrite.global.perl
+#^^^ variable.other.readwrite.global.perl
+# ^ keyword.operator.assignment.perl
+# ^^^^^^^^^^ meta.heredoc.perl
+# ^^ keyword.operator.heredoc.perl
+# ^^^^^^ string.other.heredoc.perl
+# ^ punctuation.definition.string.begin.perl
+# ^^^^ constant.language.heredoc.html.perl
+# ^ punctuation.definition.string.end.perl
+# ^ punctuation.terminator.statement.perl
+
+# <- meta.heredoc.perl text.html.embedded.perl
+#^^^^^^^^^ meta.heredoc.perl text.html.embedded.perl
+HTML
+# <- meta.heredoc.perl constant.language.heredoc.html.perl
+#^^^ meta.heredoc.perl constant.language.heredoc.html.perl
+
+$var = <<"HTML";
+# <- variable.other.readwrite.global.perl
+#^^^ variable.other.readwrite.global.perl
+# ^ keyword.operator.assignment.perl
+# ^^^^^^^^^^ meta.heredoc.perl
+# ^^ keyword.operator.heredoc.perl
+# ^^^^^^ string.other.heredoc.perl
+# ^ punctuation.definition.string.begin.perl
+# ^^^^ constant.language.heredoc.html.perl
+# ^ punctuation.definition.string.end.perl
+# ^ punctuation.terminator.statement.perl
+
+# <- meta.heredoc.perl text.html.embedded.perl
+#^^^^^^^^^ meta.heredoc.perl text.html.embedded.perl
+HTML
+# <- meta.heredoc.perl constant.language.heredoc.html.perl
+#^^^ meta.heredoc.perl constant.language.heredoc.html.perl
+
+$var ? <
+# <- meta.heredoc.perl text.html.embedded.perl
+#^^^^^^^^^ meta.heredoc.perl text.html.embedded.perl
+HTML
+# <- meta.heredoc.perl constant.language.heredoc.html.perl
+#^^^ meta.heredoc.perl constant.language.heredoc.html.perl
+
+# <- meta.heredoc.perl text.html.embedded.perl
+#^^^^^^^^^ meta.heredoc.perl text.html.embedded.perl
+ HTML
+# ^^^^ meta.heredoc.perl text.html.embedded.perl - constant.language.heredoc.html.perl
+HTML
+# <- meta.heredoc.perl constant.language.heredoc.html.perl
+#^^^ meta.heredoc.perl constant.language.heredoc.html.perl
+HTML
+# <- constant.other.perl
+#^^^ constant.other.perl
+
+$var = <
+# ^^^^^^^^^^^^^^^ meta.heredoc.perl text.xml.embedded.perl
+XML
+# <- meta.heredoc.perl constant.language.heredoc.xml.perl
+#^^ meta.heredoc.perl constant.language.heredoc.xml.perl
+
+$var = <<_EOD_;
+# ^^^^^^^^^ meta.heredoc.perl
+# ^^ keyword.operator.heredoc.perl
+# ^^^^^ constant.language.heredoc.plain.perl
+# ^ punctuation.terminator.statement.perl
+ foo bar baz
+# <- meta.heredoc.perl string.quoted.other.perl
+#^^^^^^^^^^^^^ meta.heredoc.perl string.quoted.other.perl
+_EOD_
+# <- meta.heredoc.perl constant.language.heredoc.plain.perl
+#^^^^ meta.heredoc.perl constant.language.heredoc.plain.perl
+
+$var = << " _EOD_";
+# ^^^^^^^^^^^^^^^ meta.heredoc.perl
+# ^^ keyword.operator.heredoc.perl
+# ^ punctuation.definition.string.begin.perl
+# ^^^^^^^^^^^ string.other.heredoc.perl
+# ^^^^^^^^^ constant.language.heredoc.plain.perl
+# ^ punctuation.definition.string.end.perl
+# ^ punctuation.terminator.statement.perl
+ foo bar baz
+# <- meta.heredoc.perl string.quoted.other.perl
+#^^^^^^^^^^^^^ meta.heredoc.perl string.quoted.other.perl
+ _EOD_
+# ^^^^^^ meta.heredoc.perl string.quoted.other.perl
+ _EOD_
+# <- meta.heredoc.perl constant.language.heredoc.plain.perl
+#^^^^^^^^ meta.heredoc.perl constant.language.heredoc.plain.perl
+
+chomp (my $common_end = <<"EOF") =~ s/(.*)/$1/g if $opt_o;
+# <- support.function.perl
+#^^^^ support.function.perl
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.heredoc.perl
+# ^^ keyword.operator.heredoc.perl
+# ^^ keyword.operator.binary.perl
+ foo bar baz
+# <- meta.heredoc.perl string.quoted.other.perl
+# ^^^^^^^^^^^^ meta.heredoc.perl string.quoted.other.perl
+EOF
+# <- meta.heredoc.perl constant.language.heredoc.plain.perl
+#^^ meta.heredoc.perl constant.language.heredoc.plain.perl
+
+$var ? <<'EOT' : <<'EOT';
+ foo bar baz
+# <- meta.heredoc.perl string.quoted.other.perl
+# ^^^^^^^^^^^^ meta.heredoc.perl string.quoted.other.perl
+EOT
+# <- meta.heredoc.perl constant.language.heredoc.plain.perl
+#^^ meta.heredoc.perl constant.language.heredoc.plain.perl
+ foo bar baz
+# <- meta.heredoc.perl string.quoted.other.perl
+# ^^^^^^^^^^^^ meta.heredoc.perl string.quoted.other.perl
+EOT
+# <- meta.heredoc.perl constant.language.heredoc.plain.perl
+#^^ meta.heredoc.perl constant.language.heredoc.plain.perl
+
+# MUST NOT BE HEREDOC
+ (1 << 0) ;
+# ^^^^^^^ - meta.heredoc.perl
+# ^^ - keyword.operator.heredoc.perl
+ (1 << $var) ;
+# ^^^^^^^^^^ - meta.heredoc.perl
+# ^^ - keyword.operator.heredoc.perl
+
+### [ OPERATORS ]#############################################################
+ ,
+# ^ punctuation.separator.sequence.perl
+ ;
+# ^ punctuation.terminator.statement.perl
+ ::
+# ^^ - punctuation.accessor.double-colon.perl
+ ->
+# ^^ keyword.operator.arrow.perl
+ **=
+# ^^^ keyword.operator.assignment.perl
+ -=
+# ^^ keyword.operator.assignment.perl
+ +=
+# ^^ keyword.operator.assignment.perl
+ *=
+# ^^ keyword.operator.assignment.perl
+ /=
+# ^^ keyword.operator.assignment.perl
+ %=
+# ^^ keyword.operator.assignment.perl
+ --
+# ^^ keyword.operator.arithmetic.perl
+ ++
+# ^^ keyword.operator.arithmetic.perl
+ **
+# ^^ keyword.operator.arithmetic.perl
+ /
+# ^ keyword.operator.arithmetic.perl
+ !~
+# ^^ keyword.operator.binary.perl
+ =~
+# ^^ keyword.operator.binary.perl
+ ~~
+# ^^ keyword.operator.binary.perl
+ <=>
+# ^^^ keyword.operator.logical.perl
+ //
+# ^^ keyword.operator.logical.perl
+ &&
+# ^^ keyword.operator.logical.perl
+ ||
+# ^^ keyword.operator.logical.perl
+ ==
+# ^^ keyword.operator.logical.perl
+ !=
+# ^^ keyword.operator.logical.perl
+ >=
+# ^^ keyword.operator.logical.perl
+ <=
+# ^^ keyword.operator.logical.perl
+ >
+# ^ keyword.operator.logical.perl
+ <
+# ^ keyword.operator.logical.perl
+ !
+# ^ keyword.operator.logical.perl
+ ?
+# ^ keyword.operator.logical.perl
+ :
+# ^ keyword.operator.logical.perl
+ &
+# ^ keyword.operator.bitwise.perl
+ |
+# ^ keyword.operator.bitwise.perl
+ ^
+# ^ keyword.operator.bitwise.perl
+ ~
+# ^ keyword.operator.bitwise.perl
+ .
+# ^ keyword.operator.concat.perl
+ .=
+# ^^ keyword.operator.concat.perl
+ ..
+# ^^ keyword.operator.range.perl
+
+### [ VARIABLES ]#############################################################
+
+ $&
+# ^^ variable.other.regexp.match.perl
+# ^ punctuation.definition.variable.perl
+ $`
+# ^^ variable.other.regexp.pre-match.perl
+# ^ punctuation.definition.variable.perl
+ $'
+# ^^ variable.other.regexp.post-match.perl
+# ^ punctuation.definition.variable.perl
+ $+
+# ^^ variable.other.regexp.last-paren-match.perl
+# ^ punctuation.definition.variable.perl
+ $"
+# ^^ variable.other.readwrite.list-separator.perl
+# ^ punctuation.definition.variable.perl
+ $0
+# ^^ variable.other.predefined.program-name.perl
+# ^ punctuation.definition.variable.perl
+ @0
+# ^^ variable.other.readwrite.global.perl
+# ^ punctuation.definition.variable.perl
+ %0
+# ^^ variable.other.readwrite.global.perl
+# ^ punctuation.definition.variable.perl
+ $1
+# ^^ variable.other.subpattern.perl
+# ^ punctuation.definition.variable.perl
+ @1
+# ^^ variable.other.readwrite.global.perl
+# ^ punctuation.definition.variable.perl
+ %1
+# ^^ variable.other.readwrite.global.perl
+# ^ punctuation.definition.variable.perl
+ $_
+# ^^ variable.other.predefined.perl
+# ^ punctuation.definition.variable.perl
+ @_
+# ^^ variable.other.readwrite.global.perl
+# ^ punctuation.definition.variable.perl
+ %_
+# ^^ variable.other.readwrite.global.perl
+# ^ punctuation.definition.variable.perl
+ $#0
+# ^^^ variable.other.readwrite.global.perl
+# ^^ punctuation.definition.variable.perl
+ @#0
+# ^^^ variable.other.readwrite.global.perl
+# ^^ punctuation.definition.variable.perl
+ %#0
+# ^^^ variable.other.readwrite.global.perl
+# ^^ punctuation.definition.variable.perl
+ $#_
+# ^^^ variable.other.readwrite.global.perl
+# ^^ punctuation.definition.variable.perl
+ @#_
+# ^^^ variable.other.readwrite.global.perl
+# ^^ punctuation.definition.variable.perl
+ %#_
+# ^^^ variable.other.readwrite.global.perl
+# ^^ punctuation.definition.variable.perl
+ $Foo::Bar::baz
+# ^^^^^^^^^^^^^^ variable.other.readwrite.global.perl
+# ^ punctuation.definition.variable.perl
+# ^^^ support.class.perl
+# ^^ punctuation.accessor.double-colon.perl
+# ^^^ support.class.perl
+# ^^ punctuation.accessor.double-colon.perl
+# ^^^ variable.other.member.perl
+ $Foo :: Bar :: baz
+# ^^^^^^^^^^^^^^ variable.other.readwrite.global.perl
+# ^ punctuation.definition.variable.perl
+# ^^^ support.class.perl
+# ^^ punctuation.accessor.double-colon.perl
+# ^^^ support.class.perl
+# ^^ punctuation.accessor.double-colon.perl
+# ^^^ variable.other.member.perl
+ $Foo::Bar->$baz
+# ^^^^^^^^^ variable.other.readwrite.global.perl
+# ^ punctuation.definition.variable.perl
+# ^^^ support.class.perl
+# ^^ punctuation.accessor.double-colon.perl
+# ^^^ support.class.perl
+# ^^ keyword.operator.arrow.perl - variable
+# ^^^^ variable.other.readwrite.global.perl
+# ^ punctuation.definition.variable.perl
+ $Foo :: Bar -> $baz
+# ^^^^^^^^^ variable.other.readwrite.global.perl
+# ^ punctuation.definition.variable.perl
+# ^^^ support.class.perl
+# ^^ punctuation.accessor.double-colon.perl
+# ^^^ support.class.perl
+# ^^ keyword.operator.arrow.perl - variable
+# ^^^^ variable.other.readwrite.global.perl
+# ^ punctuation.definition.variable.perl
+ $c = C::Scan->new(KEY => 'value')
+# ^^ variable.other.readwrite.global.perl
+# ^ keyword.operator.assignment.perl
+# ^ support.class.perl
+# ^^ punctuation.accessor.double-colon.perl
+# ^^^^ support.class.perl
+# ^^ keyword.operator.arrow.perl
+# ^^^ variable.function.perl
+# ^ punctuation.section.group.begin.perl
+# ^^^ constant.other.perl
+# ^^ keyword.operator.assignment.perl
+# ^^^^^^^ string.quoted.single.perl
+# ^ punctuation.section.group.end.perl
+ ${Foo::Bar::baz}
+# ^^^^^^^^^^^^^^^^ variable.other.readwrite.global.perl
+# ^^ punctuation.definition.variable.begin.perl
+# ^^^ support.class.perl
+# ^^ punctuation.accessor.double-colon.perl
+# ^^^ support.class.perl
+# ^^ punctuation.accessor.double-colon.perl
+# ^^^ variable.other.member.perl
+# ^ punctuation.definition.variable.end.perl
+ ${
+#^ - variable
+# ^^ punctuation.definition.variable.begin.perl
+# ^^^ variable.other.readwrite.global.perl
+ Foo::bar->baz()
+# <- variable.other.readwrite.global.perl
+#^^^^^^^^^^^^^^^^^^^ meta.braces.perl variable.other.readwrite.global.perl
+# ^^^ support.class.perl
+# ^^ punctuation.accessor.double-colon.perl
+# ^^^ variable.other.member.perl
+# ^^ keyword.operator.arrow.perl
+# ^^^ variable.function.perl
+ }
+# <- variable.other.readwrite.global.perl
+#^^ variable.other.readwrite.global.perl
+# ^ punctuation.definition.variable.end.perl
+# ^ - variable
+ $::Config{'cf_email'}
+# ^^^^^^^^^ variable.other.readwrite.global.perl
+# ^ punctuation.definition.variable.perl
+# ^^ punctuation.accessor.double-colon.perl
+# ^^^^^^ support.class.perl
+ -f
+# ^^ keyword.operator.filetest.perl
+ -foo
+# ^^ - keyword.operator.filetest.perl
+ $_foo = "bar";
+# ^ punctuation.definition.variable.perl
+# ^^^^^ variable.other.readwrite.global.perl
+# ^ keyword.operator.assignment.perl
+# ^ punctuation.definition.string.begin.perl
+# ^^^^^ string.quoted.double.perl
+# ^ punctuation.definition.string.end.perl
+# ^ punctuation.terminator.statement.perl
+ %_foo = "bar";
+# ^ punctuation.definition.variable.perl
+# ^^^^^ variable.other.readwrite.global.perl
+# ^ keyword.operator.assignment.perl
+# ^ punctuation.definition.string.begin.perl
+# ^^^^^ string.quoted.double.perl
+# ^ punctuation.definition.string.end.perl
+# ^ punctuation.terminator.statement.perl
+ %{$foo{'bar'}{'bar'}} = 'excl';
+# ^^^^^^^^^^^^^^^^^^^^^ meta.braces.perl variable.other.readwrite.global.perl
+# ^^ punctuation.definition.variable.begin.perl
+# ^ punctuation.definition.variable.perl
+# ^^^^ variable.other.readwrite.global.perl variable.other.readwrite.global.perl
+# ^ punctuation.definition.variable.end.perl
+# ^ keyword.operator.assignment.perl
+# ^^^^^^ string.quoted.single.perl
+# ^ punctuation.terminator.statement.perl
+### [ CONSTANTS ] ############################################################
+
+ 1234 # decimal integer
+# ^^^^ constant.numeric.integer.perl
+ -1234 # decimal integer
+# ^^^^^ constant.numeric.integer.perl
+ - 1234 # decimal integer
+# ^ keyword.operator.arithmetic.perl
+# ^^^^ constant.numeric.integer.perl
+ 0b0 # binary integer
+# ^^^ constant.numeric.binary.perl
+ 0b1110011 # binary integer
+# ^^^^^^^^^ constant.numeric.binary.perl
+ 01234 # octal integer
+# ^^^^^ constant.numeric.integer.perl
+ 0x1234 # hexadecimal integer
+# ^^^^^^ constant.numeric.hex.perl
+ 0x9 # hexadecimal integer
+# ^^^ constant.numeric.hex.perl
+ 12.34e56 # exponential notation
+# ^^^^^^^^ constant.numeric.float.perl
+ -12.34e-56 # exponential notation
+# ^^^^^^^^^^ constant.numeric.float.perl
+ - 12.34e-56 # exponential notation
+# ^ keyword.operator.arithmetic.perl
+# ^^^^^^^^^ constant.numeric.float.perl
+ 12.34e+56 # exponential notation
+# ^^^^^^^^^ constant.numeric.float.perl
+ "-12.34e56" # number specified as a string
+# ^^^^^^^^^^^ string.quoted.double.perl
+# ^^^^^^^^^ constant.numeric.float.perl
+ "1234" # number specified as a string
+# ^^^^^^ string.quoted.double.perl
+# ^^^^ constant.numeric.integer.perl
+ '0.00_01'
+# ^^^^^^^ - constant.numeric
+ '01bau'
+# ^^^^^ - constant.numeric
+ __PACKAGE__
+# ^^^^^^^^^^^ constant.language.perl
+ __FILE__
+# ^^^^^^^^ constant.language.perl
+ __LINE__
+# ^^^^^^^^ constant.language.perl
+ __END__
+# ^^^^^^^ constant.language.perl
+ ARGV
+# ^^^^ constant.language.filehandle.perl
+
+### [ STRINGS ] ##############################################################
+
+ "quoted \"interpolated\" foo 'bar' baz"
+# ^ punctuation.definition.string.begin.perl
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.quoted.double.perl
+# ^^ constant.character.escape.perl
+# ^^ constant.character.escape.perl
+# ^ punctuation.definition.string.end.perl
+ 'quoted "interpolated" foo \'bar\' baz'
+# ^ punctuation.definition.string.begin.perl
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.quoted.single.perl
+# ^^ constant.character.escape.perl
+# ^^ constant.character.escape.perl
+# ^ punctuation.definition.string.end.perl
+ `quoted "interpolated" foo \`bar\` baz`
+# ^ punctuation.definition.string.begin.perl
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.quoted.backtick.perl
+# ^^ constant.character.escape.perl
+# ^^ constant.character.escape.perl
+# ^ punctuation.definition.string.end.perl
+ q/quoted "interpolated" foo 'bar' \/ baz/
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function-call.perl
+# ^ support.function.perl
+# ^ punctuation.section.generic.begin.perl - string
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.unquoted.perl
+# ^^ constant.character.escape.perl
+# ^ punctuation.section.generic.end.perl - string
+ q{quoted "interpolated" {foo} 'bar' \/ baz}
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function-call.perl
+# ^ support.function.perl
+# ^ punctuation.section.braces.begin.perl - string
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.braces.perl
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.unquoted.perl
+# ^^ constant.character.escape.perl
+# ^ punctuation.section.braces.end.perl - string
+ q[quoted "interpolated" [foo] 'bar' \] baz]
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function-call.perl
+# ^ support.function.perl
+# ^ punctuation.section.brackets.begin.perl - string
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.brackets.perl
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.unquoted.perl
+# ^^ constant.character.escape.perl
+# ^ punctuation.section.brackets.end.perl - string
+ q 'bar' \> baz>
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function-call.perl
+# ^ support.function.perl
+# ^ punctuation.section.generic.begin.perl - string
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.generic.perl
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.unquoted.perl
+# ^^ constant.character.escape.perl
+# ^ punctuation.section.generic.end.perl - string
+ q(quoted "interpolated" [foo] 'bar' \] baz)
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function-call.perl
+# ^ support.function.perl
+# ^ punctuation.section.parens.begin.perl - string
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.parens.perl
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.unquoted.perl
+# ^^ constant.character.escape.perl
+# ^ punctuation.section.parens.end.perl - string
+ q['
+# ^ support.function.perl
+# ^ punctuation.section.brackets.begin.perl - string
+# ^^ string
+ string
+# ^^^^^^^ string
+ ']
+# ^ string
+# ^ punctuation.section.brackets.end.perl - string
+ q<'
+# ^ support.function.perl
+# ^ punctuation.section.generic.begin.perl - string
+# ^^ string
+ string
+# ^^^^^^^ string
+ '>
+# ^ string
+# ^ punctuation.section.generic.end.perl - string
+
+### [ REGEX ] ################################################################
+
+ /[a-z]test\d{3}/g;
+# ^ punctuation.section.generic.begin.perl - string.regexp - source.regexp
+# ^^^^^^^^^^^^^^ string.regexp.perl source.regexp
+# ^ punctuation.section.generic.end.perl - string.regexp - source.regexp
+# ^ constant.language.flags.regexp.perl
+ ( /[a-z]test\d{3}/g );
+# ^ punctuation.section.generic.begin.perl - string.regexp - source.regexp
+# ^^^^^^^^^^^^^^ string.regexp.perl source.regexp
+# ^ punctuation.section.generic.end.perl - string.regexp - source.regexp
+# ^ constant.language.flags.regexp.perl
+ $@ = /[a-z]test\d{3}/g;
+# ^ punctuation.section.generic.begin.perl - string.regexp - source.regexp
+# ^^^^^^^^^^^^^^ string.regexp.perl source.regexp
+# ^ punctuation.section.generic.end.perl - string.regexp - source.regexp
+# ^ constant.language.flags.regexp.perl
+ m{^\s*(?:(-?\s*)(\d+(?:\.\d+){0,3})/(\d+))}; # comment
+# ^ support.function.perl - meta.braces
+# ^ punctuation.section.braces.begin.perl - string
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.braces.perl
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.regexp.perl
+# ^ punctuation.section.braces.end.perl - string
+# ^ punctuation.terminator.statement.perl
+# ^ comment.line.number-sign.perl punctuation.definition.comment.begin.perl
+ m(^\s*(?:(-?\s*)(\d+(?:\.\d+){0,3})/(\d+))); # comment
+# ^ support.function.perl - meta.parens
+# ^ punctuation.section.parens.begin.perl - string
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.parens.perl
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.regexp.perl
+# ^ punctuation.section.parens.end.perl - string
+# ^ punctuation.terminator.statement.perl
+# ^ comment.line.number-sign.perl punctuation.definition.comment.begin.perl
+ m[^\s*(?:(-?\s*)(\d+(?:\.\d+){0,3})/(\d+))]; # comment
+# ^ support.function.perl - meta.brackets
+# ^ punctuation.section.brackets.begin.perl - string
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.brackets.perl
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.regexp.perl
+# ^ punctuation.section.brackets.end.perl - string
+# ^ punctuation.terminator.statement.perl
+# ^ comment.line.number-sign.perl punctuation.definition.comment.begin.perl
+ m<^\s*(?:(-?\s*)(\d+(?:\.\d+){0,3})/(\d+))>; # comment
+# ^ support.function.perl - meta.generic
+# ^ punctuation.section.generic.begin.perl - string
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.generic.perl
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.regexp.perl
+# ^ punctuation.section.generic.end.perl - string
+# ^ punctuation.terminator.statement.perl
+# ^ comment.line.number-sign.perl punctuation.definition.comment.begin.perl
+ m/^\s*(?:(-?\s*)(\d+(?:\.\d+){0,3})\/(\d+))/g; # comment
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function-call.perl
+# ^ support.function.perl
+# ^ punctuation.section.generic.begin.perl
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.regexp.perl
+# ^ punctuation.section.generic.end.perl
+# ^ constant.language.flags.regexp.perl
+# ^ punctuation.terminator.statement.perl
+# ^ comment.line.number-sign.perl punctuation.definition.comment.begin.perl
+ s {
+# ^^^^ meta.function-call.perl
+# ^^ meta.braces.perl
+# ^ support.function.perl
+# ^ punctuation.section.braces.begin.perl
+ bar[a-z]{1,3} \/ .+
+# <- meta.function-call.perl meta.braces.perl string.regexp.perl
+ } [repl] gx; # comment
+# <- meta.function-call.perl meta.braces.perl string.regexp.perl
+#^^^^^^^^ meta.function-call.perl
+# ^ meta.braces.perl punctuation.section.braces.end.perl
+# ^^^^^^ meta.brackets.perl
+# ^ punctuation.section.brackets.begin.perl
+# ^^^^ string.unquoted.perl
+# ^ punctuation.section.brackets.end.perl
+# ^^ constant.language.flags.regexp.perl
+# ^ punctuation.terminator.statement.perl
+# ^^^^^^^^^ comment.line.number-sign.perl
+# ^ punctuation.definition.comment.begin.perl
+ s/foo[a-z]{1,3} \/ .+/ bar $1 \/ /g; # comment
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function-call.perl
+# ^ support.function.perl
+# ^ punctuation.section.generic.begin.perl
+# ^^^^^^^^^^^^^^^^^^^ string.regexp.perl source.regexp
+# ^ punctuation.separator.sequence.perl
+# ^^^^^^^^^^^ string.unquoted.perl
+# ^ punctuation.section.generic.end.perl
+# ^ constant.language.flags.regexp.perl
+# ^ punctuation.terminator.statement.perl
+# ^^^^^^^^^ comment.line.number-sign.perl
+# ^ punctuation.definition.comment.begin.perl
+ s#foo[a-z]{1,3} \# .+# bar $1 \# #g; # comment
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function-call.perl
+# ^ support.function.perl
+# ^ punctuation.section.generic.begin.perl
+# ^^^^^^^^^^^^^^^^^^^ string.regexp.perl source.regexp
+# ^ punctuation.separator.sequence.perl
+# ^^^^^^^^^^^ string.unquoted.perl
+# ^ punctuation.section.generic.end.perl
+# ^ constant.language.flags.regexp.perl
+# ^ punctuation.terminator.statement.perl
+# ^^^^^^^^^ comment.line.number-sign.perl
+# ^ punctuation.definition.comment.begin.perl
+ s;foo[a-z]{1,3} \; .+; bar $1 \; ;g; # comment
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function-call.perl
+# ^ support.function.perl
+# ^ punctuation.section.generic.begin.perl
+# ^^^^^^^^^^^^^^^^^^^ string.regexp.perl source.regexp
+# ^ punctuation.separator.sequence.perl
+# ^^^^^^^^^^^ string.unquoted.perl
+# ^ punctuation.section.generic.end.perl
+# ^ constant.language.flags.regexp.perl
+# ^ punctuation.terminator.statement.perl
+# ^^^^^^^^^ comment.line.number-sign.perl
+# ^ punctuation.definition.comment.begin.perl
+ s!foo[a-z]{1,3} \! .+! bar $1 \! !g; # comment
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function-call.perl
+# ^ support.function.perl
+# ^ punctuation.section.generic.begin.perl
+# ^^^^^^^^^^^^^^^^^^^ string.regexp.perl source.regexp
+# ^ punctuation.separator.sequence.perl
+# ^^^^^^^^^^^ string.unquoted.perl
+# ^ punctuation.section.generic.end.perl
+# ^ constant.language.flags.regexp.perl
+# ^ punctuation.terminator.statement.perl
+# ^^^^^^^^^ comment.line.number-sign.perl
+# ^ punctuation.definition.comment.begin.perl
+ s:\\:/:;
+# ^^^^^^^ meta.function-call.perl
+# ^ support.function.perl
+# ^ punctuation.section.generic.begin.perl
+# ^^ string.regexp.perl source.regexp constant.character.escape.regexp
+# ^ punctuation.separator.sequence.perl
+# ^ string.unquoted.perl
+# ^ punctuation.section.generic.end.perl
+# ^ punctuation.terminator.statement.perl
+ s:\\\\:/\\\\:;
+# ^^^^^^^^^^^^^ meta.function-call.perl
+# ^ support.function.perl
+# ^ punctuation.section.generic.begin.perl
+# ^^^^ string.regexp.perl source.regexp constant.character.escape.regexp
+# ^ punctuation.separator.sequence.perl
+# ^^^^^ string.unquoted.perl
+# ^ punctuation.section.generic.end.perl
+# ^ punctuation.terminator.statement.perl
+ s/^\s+//;
+# ^^^^^^^^ meta.function-call.perl
+# ^ support.function.perl
+# ^ punctuation.section.generic.begin.perl
+# ^^^^ string.regexp.perl source.regexp
+# ^ punctuation.separator.sequence.perl
+# ^ punctuation.section.generic.end.perl
+# ^ punctuation.terminator.statement.perl
+ $opt{s}
+# ^ - support.function.perl
+ s///msixpodualngcer;
+# ^^^^^^^^^^^^^^^^^^^ meta.function-call.perl
+# ^ support.function.perl
+# ^ punctuation.section.generic.begin.perl
+# ^ punctuation.separator.sequence.perl
+# ^ punctuation.section.generic.end.perl
+# ^^^^^^^^^^^^^^^ constant.language.flags.regexp.perl
+# ^ punctuation.terminator.statement.perl
+ qr:\\:;
+# ^^^^^^ meta.function-call.perl
+# ^^ support.function.perl
+# ^ punctuation.section.generic.begin.perl
+# ^^ string.regexp.perl source.regexp constant.character.escape.regexp
+# ^ punctuation.section.generic.end.perl
+# ^ punctuation.terminator.statement.perl
+ qr:\\\\:/;
+# ^^^^^^^^ meta.function-call.perl
+# ^ support.function.perl
+# ^ punctuation.section.generic.begin.perl
+# ^^^^ string.regexp.perl source.regexp constant.character.escape.regexp
+# ^ punctuation.section.generic.end.perl
+# ^ keyword.operator.arithmetic.perl
+# ^ punctuation.terminator.statement.perl
+ qr/^\s+/;
+# ^^^^^^^^ meta.function-call.perl
+# ^^ support.function.perl
+# ^ punctuation.section.generic.begin.perl
+# ^^^^ string.regexp.perl source.regexp
+# ^ punctuation.section.generic.end.perl
+# ^ punctuation.terminator.statement.perl
+
+### [ DECLARATIONS ]##########################################################
+
+my
+# <- keyword.declaration.variable
+#^ keyword.declaration.variable
+ my $foo
+#^ - storage
+# ^^ keyword.declaration.variable
+# ^ - keyword.declaration.variable - variable.other.readwrite
+# ^ punctuation.definition.variable.perl
+# ^^^^ variable.other.readwrite
+# ^ - variable.other.readwrite
+my $foo;
+# <- keyword.declaration.variable.perl
+#^ keyword.declaration.variable.perl
+# ^ punctuation.definition.variable.perl
+# ^^^^ variable.other.readwrite.global.perl
+# ^ punctuation.terminator.statement.perl
+my $foo = "bar";
+# <- keyword.declaration.variable.perl
+#^ keyword.declaration.variable.perl
+# ^ punctuation.definition.variable.perl
+# ^^^^ variable.other.readwrite.global.perl
+# ^ keyword.operator.assignment.perl
+# ^ punctuation.definition.string.begin.perl
+# ^^^^^ string.quoted.double.perl
+# ^ punctuation.definition.string.end.perl
+# ^ punctuation.terminator.statement.perl
+my (
+# <- keyword.declaration.variable.perl
+#^ keyword.declaration.variable.perl
+ $foo, $bar,
+# ^ punctuation.definition.variable.perl
+# ^^^^ variable.other.readwrite.global.perl
+# ^ punctuation.separator.sequence.perl
+# ^ punctuation.definition.variable.perl
+# ^^^^ variable.other.readwrite.global.perl
+ $baz
+# ^ punctuation.definition.variable.perl
+# ^^^^ variable.other.readwrite.global.perl
+ );
+# ^ punctuation.section.group.end.perl
+# ^ punctuation.terminator.statement.perl
+ eval { my $foo = /pattern/; }
+# ^^^^ support.function.perl
+# ^ punctuation.section.block.begin.perl
+# ^^ keyword.declaration.variable.perl
+# ^^^^ variable.other.readwrite.global.perl
+# ^ keyword.operator.assignment.perl
+# ^ punctuation.section.generic.begin.perl
+# ^^^^^^^ string.regexp.perl source.regexp meta.literal.regexp
+# ^ punctuation.section.generic.end.perl
+# ^ punctuation.terminator.statement.perl
+# ^ punctuation.section.block.end.perl
+ my::foo::bar
+# ^^ - keyword.declaration.variable.perl
+our
+# <- keyword.declaration.variable
+#^^ keyword.declaration.variable
+ our $foo
+# <-
+#^ - storage
+# ^^^ keyword.declaration.variable
+# ^ - keyword.declaration.variable - variable.other.readwrite
+# ^ punctuation.definition.variable.perl
+# ^^^^ variable.other.readwrite
+# ^ - variable.other.readwrite
+our $foo;
+# <- keyword.declaration.variable.perl
+#^^ keyword.declaration.variable.perl
+# ^ punctuation.definition.variable.perl
+# ^^^^ variable.other.readwrite.global.perl
+# ^ punctuation.terminator.statement.perl
+our $foo = "bar";
+# <- keyword.declaration.variable.perl
+#^^ keyword.declaration.variable.perl
+# ^ punctuation.definition.variable.perl
+# ^^^^ variable.other.readwrite.global.perl
+# ^ keyword.operator.assignment.perl
+# ^ punctuation.definition.string.begin.perl
+# ^^^^^ string.quoted.double.perl
+# ^ punctuation.definition.string.end.perl
+# ^ punctuation.terminator.statement.perl
+our (
+# <- keyword.declaration.variable.perl
+#^^ keyword.declaration.variable.perl
+ $foo, $bar,
+# ^ punctuation.definition.variable.perl
+# ^^^^ variable.other.readwrite.global.perl
+# ^ punctuation.separator.sequence.perl
+# ^ punctuation.definition.variable.perl
+# ^^^^ variable.other.readwrite.global.perl
+ $baz
+# ^ punctuation.definition.variable.perl
+# ^^^^ variable.other.readwrite.global.perl
+ );
+# ^ punctuation.section.group.end.perl
+# ^ punctuation.terminator.statement.perl
+our $VERSION = do {
+# <- keyword.declaration.variable.perl
+#^^ keyword.declaration.variable.perl
+# ^^^^^^^^ variable.other.readwrite.global.perl
+# ^ keyword.operator.assignment.perl
+# ^^ keyword.control.flow.perl
+# ^ punctuation.section.block.begin.perl
+ my @r = (q$Revision: 2.20 $ =~ /\d+/g);
+# ^^ keyword.declaration.variable.perl
+# ^^ variable.other.readwrite.global.perl
+# ^ keyword.operator.assignment.perl
+# ^ punctuation.section.group.begin.perl
+# ^ meta.function-call.perl support.function.perl
+# ^^^^^^^^^^^^^^^^^ meta.function-call.perl meta.generic.perl
+# ^ punctuation.section.generic.begin.perl
+# ^^^^^^^^^^^^^^^ string.unquoted.perl
+# ^^^^ - constant.numeric
+# ^ punctuation.section.generic.end.perl
+# ^^ keyword.operator.binary.perl
+# ^ punctuation.section.generic.begin.perl
+# ^^^ string.regexp.perl source.regexp
+# ^ punctuation.section.generic.end.perl
+# ^ constant.language.flags.regexp.perl
+ sprintf "%d."."%02d" x $#r, @r
+# ^^^^^^^ support.function.perl
+};
+# <- punctuation.section.block.end.perl
+state
+# <- keyword.declaration.variable
+#^^^^ keyword.declaration.variable
+ state $foo
+# <-
+#^ - storage
+# ^^^^^ keyword.declaration.variable
+# ^ - keyword.declaration.variable - variable.other.readwrite
+# ^ punctuation.definition.variable.perl
+# ^^^^ variable.other.readwrite
+# ^ - variable.other.readwrite
+require
+# <- meta.import.require.perl keyword.control.import.require.perl
+#^^^^^^ meta.import.require.perl keyword.control.import.require.perl
+require "v5.1.0";
+# <- meta.import.require.perl keyword.control.import.require.perl
+#^^^^^^^^^^^^^^^ meta.import.require.perl
+#^^^^^^ keyword.control.import.require.perl
+# ^^^^^^^^ string.quoted.double.perl - constant.numeric
+# ^ punctuation.terminator.statement.perl
+eval { require Mail::Send; };
+#<- support.function.perl
+#^^^ support.function.perl
+# ^ punctuation.section.block.begin.perl
+# ^^^^^^^^^^^^^^^^^^ meta.import.require.perl
+# ^^^^ - meta.import.require.perl
+# ^^^^^^^ keyword.control.import.require.perl
+use strict;
+# <- meta.use.perl keyword.control.import.use.perl
+#^^^^^^^^^ meta.use.perl
+#^^ keyword.control.import.use.perl
+# ^^^^^^ storage.modifier.perl
+# ^ punctuation.terminator.statement.perl
+use strict "vars";
+# <- meta.use.perl keyword.control.import.use.perl
+#^^^^^^^^^^^^^^^^ meta.use.perl
+#^^ keyword.control.import.use.perl
+# ^^^^^^ storage.modifier.perl
+# ^ punctuation.definition.string.begin.perl
+# ^^^^^^ string.quoted.double.perl
+# ^ punctuation.definition.string.end.perl
+# ^ punctuation.terminator.statement.perl
+ use attributes __PACKAGE__, \&foo, 'method';
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.use.perl
+# ^^^ keyword.control.import.use.perl
+# ^^^^^^^^^^ storage.modifier.perl
+# ^^^^^^^^^^^ constant.language.perl
+# ^ punctuation.separator.sequence.perl
+use File;
+# <- meta.use.perl keyword.control.import.use.perl
+#^^^^^^^ meta.use.perl
+#^^ keyword.control.import.use.perl
+# ^^^^ support.class.perl
+# ^ punctuation.terminator.statement.perl
+
+use File::data;
+# <- meta.use.perl keyword.control.import.use.perl
+#^^^^^^^^^^^^^ meta.use.perl
+#^^ keyword.control.import.use.perl
+# ^^^^ support.class.perl
+# ^^ punctuation.accessor.double-colon.perl
+# ^^^^ variable.other.member.perl
+# ^ punctuation.terminator.statement.perl
+no strict;
+# <- meta.no.perl keyword.declaration.no.perl
+#^^^^^^^^ meta.no.perl
+#^ keyword.declaration.no.perl
+# ^^^^^^ storage.modifier.perl
+# ^ punctuation.terminator.statement.perl
+
+### [ SUB ]###################################################################
+
+sub
+# <- meta.function.perl keyword.control.sub.perl
+#^^ meta.function.perl keyword.control.sub.perl
+# ^ - invalid
+sub name
+# <- meta.function.perl keyword.control.sub.perl
+#^^^^^^^ meta.function.perl
+#^^ keyword.control.sub.perl
+# ^^^^ entity.name.function.perl
+# ^ - invalid
+sub name invalid
+# <- meta.function.perl keyword.control.sub.perl
+#^^^^^^^^^^^^^^^ meta.function.perl
+#^^ keyword.control.sub.perl
+# ^^^^ entity.name.function.perl
+# ^^^^^^^ invalid.illegal.function-name.perl
+sub name;
+# <- meta.function.perl keyword.control.sub.perl
+#^^^^^^^ meta.function.perl
+#^^ keyword.control.sub.perl
+# ^^^^ entity.name.function.perl
+# ^ punctuation.terminator.statement.perl
+sub name invalid;
+# <- meta.function.perl keyword.control.sub.perl
+#^^^^^^^^^^^^^^^ meta.function.perl
+#^^ keyword.control.sub.perl
+# ^^^^ entity.name.function.perl
+# ^^^^^^^ invalid.illegal.function-name.perl
+# ^ punctuation.terminator.statement.perl
+sub {
+# <- meta.function.perl keyword.control.sub.perl
+#^^^^^^^^^^ meta.function.perl
+#^^ keyword.control.sub.perl
+# ^ punctuation.section.block.begin.perl
+ say "Hello";
+# <- meta.function.perl
+#^^^^^^^^^^^^^^ meta.function.perl
+# ^^^ support.function.perl
+}
+# <- meta.function.perl punctuation.section.block.end.perl
+sub
+{
+# <- meta.function.perl punctuation.section.block.begin.perl
+}
+# <- meta.function.perl punctuation.section.block.end.perl
+sub name {
+# <- meta.function.perl keyword.control.sub.perl
+#^^^^^^^^^^ meta.function.perl
+#^^ keyword.control.sub.perl
+# ^^^^ entity.name.function.perl
+# ^ punctuation.section.block.begin.perl
+ say "Hello";
+# <- meta.function.perl
+#^^^^^^^^^^^^^^ meta.function.perl
+# ^^^ support.function.perl
+}
+# <- meta.function.perl punctuation.section.block.end.perl
+
+sub name
+{
+# <- meta.function.perl punctuation.section.block.begin.perl
+}
+# <- meta.function.perl punctuation.section.block.end.perl
+sub name invalid {
+# <- meta.function.perl keyword.control.sub.perl
+#^^^^^^^^^^^^^^^^^ meta.function.perl
+#^^ keyword.control.sub.perl
+# ^^^^ entity.name.function.perl
+# ^^^^^^^ invalid.illegal.function-name.perl
+# ^ punctuation.section.block.begin.perl
+}
+# <- meta.function.perl punctuation.section.block.end.perl
+sub name invalid
+{
+# <- meta.function.perl punctuation.section.block.begin.perl
+}
+# <- meta.function.perl punctuation.section.block.end.perl
+
+sub name ($arg, $arg) {
+# <- meta.function.perl keyword.control.sub.perl
+#^^^^^^^^ meta.function.perl - meta.function.parameters.perl
+# ^^^^^^^^^^^^ meta.function.parameters.perl - meta.function.perl
+# ^^ meta.function.perl - meta.function.parameters.perl
+#^^ keyword.control.sub.perl
+# ^^^^ entity.name.function.perl
+# ^ punctuation.section.group.begin.perl
+# ^^^^ variable.parameter.perl
+# ^ punctuation.separator.sequence.perl
+# ^^^^ variable.parameter.perl
+# ^ punctuation.section.group.end.perl
+# ^ punctuation.section.block.begin.perl
+}
+# <- meta.function.perl punctuation.section.block.end.perl
+sub name ($arg, $arg)
+{
+# <- meta.function.perl punctuation.section.block.begin.perl
+}
+# <- meta.function.perl punctuation.section.block.end.perl
+
+sub name invalid ($arg, $arg) {
+# <- meta.function.perl keyword.control.sub.perl
+#^^^^^^^^^^^^^^^^ meta.function.perl - meta.function.parameters.perl
+# ^^^^^^^^^^^^ meta.function.parameters.perl - meta.function.perl
+# ^^ meta.function.perl - meta.function.parameters.perl
+#^^ keyword.control.sub.perl
+# ^^^^ entity.name.function.perl
+# ^^^^^^^ invalid.illegal.function-name.perl
+# ^ punctuation.section.group.begin.perl
+# ^^^^ variable.parameter.perl
+# ^ punctuation.separator.sequence.perl
+# ^^^^ variable.parameter.perl
+# ^ punctuation.section.group.end.perl
+# ^ punctuation.section.block.begin.perl
+}
+# <- meta.function.perl punctuation.section.block.end.perl
+sub name invalid ($arg, $arg)
+{
+# <- meta.function.perl punctuation.section.block.begin.perl
+}
+# <- meta.function.perl punctuation.section.block.end.perl
+$var = sub {
+# <- variable.other.readwrite.global.perl punctuation.definition.variable.perl
+#^^^ variable.other.readwrite.global.perl
+# ^ keyword.operator.assignment.perl
+# ^^^^^^^ meta.function.perl
+# ^^^ keyword.control.sub.perl
+ say "hello";
+# <- meta.function.perl
+# ^^^ meta.function.perl support.function.perl
+}
+# <- meta.function.perl punctuation.section.block.end.perl
+sub name ($) {}
+# ^ punctuation.section.group.begin.perl - variable.parameter.perl
+# ^^^ meta.function.parameters.perl
+# ^ variable.parameter.perl
+# ^ punctuation.section.group.end.perl - variable.parameter.perl
+
+### [ EXPRESSIONS ]###########################################################
+
+ retry:
+# ^^^^^ entity.name.label.perl
+# ^ punctuation.separator.perl
+ retry:die "bye!";
+# ^^^^^ entity.name.label.perl
+# ^ punctuation.separator.perl
+# ^^^ keyword.other.flow.perl
+# ^^^^^^ string.quoted.double.perl
+# ^ punctuation.terminator.statement.perl
+ retry::
+# ^^^^^^^ - entity.name.label.perl
+ if(exists($curargs{$index}))
+# ^^ keyword.control.conditional.perl
+# ^ punctuation.section.group.begin.perl
+# ^ punctuation.section.group.begin.perl
+# ^ punctuation.section.group.end.perl
+ function_call /pattern/g;
+# ^^^^^^^^^^^^^ variable.function.perl
+# ^ punctuation.section.generic.begin.perl
+# ^^^^^^^ string.regexp.perl source.regexp
+# ^ punctuation.section.generic.end.perl
+# ^ constant.language.flags.regexp.perl
+# ^ punctuation.terminator.statement.perl
+ _function_call $var;
+# ^^^^^^^^^^^^^^ variable.function.perl
+# ^^^^ variable.other.readwrite.global.perl
+# ^ punctuation.terminator.statement.perl