diff --git a/extensions/perl/syntaxes/Perl 6.tmLanguage b/extensions/perl/syntaxes/Perl 6.tmLanguage
index 68f9e59b6d1b8..a70f908c2bc34 100644
--- a/extensions/perl/syntaxes/Perl 6.tmLanguage
+++ b/extensions/perl/syntaxes/Perl 6.tmLanguage
@@ -10,7 +10,7 @@
nqp
firstLineMatch
- (^#!.*\bperl6\b)|use\s+v6
+ (^#!.*\b(perl6|nqp)\b)|use\s+v6
keyEquivalent
^~P
name
@@ -58,9 +58,28 @@
+
+ captures
+
+ 1
+
+ name
+ storage.type.class.perl.6
+
+ 3
+
+ name
+ entity.name.type.class.perl.6
+
+
+ match
+ (class|enum|grammar|knowhow|module|package|role|slang|subset)(\s+)(((?:::|')?(?:([a-zA-Z_\x{C0}-\x{FF}\$])([a-zA-Z0-9_\x{C0}-\x{FF}\\$]|[\-'][a-zA-Z0-9_\x{C0}-\x{FF}\$])*))+)
+ name
+ meta.class.perl.6
+
begin
- '
+ (?<=\s)'
beginCaptures
0
@@ -279,12 +298,6 @@
name
storage.type.declare.routine.perl
-
- match
- \b(module|class|role|package|enum|grammar|slang|subset)\b
- name
- keyword.other.module.perl
-
match
\b(self)\b
@@ -361,19 +374,19 @@
match
\b(Object|Any|Junction|Whatever|Capture|MatchSignature|Proxy|Matcher|Package|Module|ClassGrammar|Scalar|Array|Hash|KeyHash|KeySet|KeyBagPair|List|Seq|Range|Set|Bag|Mapping|Void|UndefFailure|Exception|Code|Block|Routine|Sub|MacroMethod|Submethod|Regex|Str|str|Blob|Char|ByteCodepoint|Grapheme|StrPos|StrLen|Version|NumComplex|num|complex|Bit|bit|bool|True|FalseIncreasing|Decreasing|Ordered|Callable|AnyCharPositional|Associative|Ordering|KeyExtractorComparator|OrderingPair|IO|KitchenSink|RoleInt|int|int1|int2|int4|int8|int16|int32|int64Rat|rat|rat1|rat2|rat4|rat8|rat16|rat32|rat64Buf|buf|buf1|buf2|buf4|buf8|buf16|buf32|buf64UInt|uint|uint1|uint2|uint4|uint8|uint16|uint32uint64|Abstraction|utf8|utf16|utf32)\b
name
- support.type.perl
+ support.type.perl6
match
- \b(div|x|xx|mod|also|leg|cmp|before|after|eq|ne|le|lt|gt|ge|eqv|ff|fff|and|andthen|Z|X|or|xor|orelse|extra|m|mm|rx|s|tr)\b
+ \b(div|xx|x|mod|also|leg|cmp|before|after|eq|ne|le|lt|not|gt|ge|eqv|ff|fff|and|andthen|or|xor|orelse|extra|lcm|gcd)\b
name
keyword.operator.perl
match
- (\$|@|%|&)(\*|:|!|\^|~|=|\?|(<(?=.+>)))?([A-Za-z_])([A-Za-z0-9_]|[\-'][A-Za-z0-9_])*
+ (\$|@|%|&)(\*|:|!|\^|~|=|\?|(<(?=.+>)))?([a-zA-Z_\x{C0}-\x{FF}\$])([a-zA-Z0-9_\x{C0}-\x{FF}\$]|[\-'][a-zA-Z0-9_\x{C0}-\x{FF}\$])*
name
- variable.other.basic.perl
+ variable.other.identifier.perl.6
match
diff --git a/extensions/perl/syntaxes/Perl.plist b/extensions/perl/syntaxes/Perl.plist
index beab27aada271..7b6ee3888ddfe 100644
--- a/extensions/perl/syntaxes/Perl.plist
+++ b/extensions/perl/syntaxes/Perl.plist
@@ -14,6 +14,7 @@
t
PL
psgi
+ vcl
firstLineMatch
^#!.*\bperl\b
@@ -304,7 +305,7 @@
applyEndPatternLast
1
begin
- \b(?=m\s*[^\sa-zA-Z0-9])
+ (?<!\{|\+|\-)\b(?=m\s*[^\sa-zA-Z0-9])
comment
string.regexp.find-m.perl
end
@@ -503,7 +504,7 @@
begin
- (m)\s*([^\sa-zA-Z0-9'\{\[\(\<])
+ (?<!\{|\+|\-)(m)\s*([^\sa-zA-Z0-9'\{\[\(\<])
captures
0
@@ -1040,7 +1041,7 @@
comment
string.regexp.replace.extended
end
- \2((([egimosradlupc]*x[egimosradlupc]*)))\b
+ ((([egimosradlupc]*x[egimosradlupc]*)))\b
endCaptures
1
@@ -1343,10 +1344,26 @@
match
- \b(__FILE__|__LINE__|__PACKAGE__|__SUB__|__DATA__|__END__)\b
+ \b(__FILE__|__LINE__|__PACKAGE__|__SUB__)\b
name
constant.language.perl
+
+ begin
+ \b(__DATA__|__END__)\n?
+ beginCaptures
+
+ 1
+
+ name
+ constant.language.perl
+
+
+ contentName
+ text.plain
+ end
+ \z
+
match
(?<!->)\b(continue|die|do|else|elsif|exit|for|foreach|goto|if|last|next|redo|return|select|unless|until|wait|while|switch|case|require|use|eval)\b