diff --git a/autotests/folding/highlight.pl.fold b/autotests/folding/highlight.pl.fold --- a/autotests/folding/highlight.pl.fold +++ b/autotests/folding/highlight.pl.fold @@ -53,3 +53,23 @@ &blah; prg("test"); + +# Bracket closures in RegExp patterns (bug #364866) +qr{ ${var} aa{aa{a}a} aa*b?}; +qr(aa(a(a(a(b|c)a)a)a)aa*b?); +s{aaa {aaa} a \x{A2} *b?}{aa}; +s(aa(a(a(a(b|c)a)a)a)aa)(aa); + +# Strings as scalar references (bug #348765) +$x = \'Reference of a String'; +$y = \"Reference of a String"; + +# Variables that start with underscore (bug #355300) +$_variable +$_ # Reserved var. + +for my $x ($hash->{arr}->@*) { + for my $k (keys $k->%*) { + ... + } +} diff --git a/autotests/html/highlight.pl.html b/autotests/html/highlight.pl.html --- a/autotests/html/highlight.pl.html +++ b/autotests/html/highlight.pl.html @@ -59,4 +59,24 @@ &blah; prg("test"); + +# Bracket closures in RegExp patterns (bug #364866) +qr{ ${var} aa{aa{a}a} aa*b?}; +qr(aa(a(a(a(b|c)a)a)a)aa*b?); +s{aaa {aaa} a \x{A2} *b?}{aa}; +s(aa(a(a(a(b|c)a)a)a)aa)(aa); + +# Strings as scalar references (bug #348765) +$x = \'Reference of a String'; +$y = \"Reference of a String"; + +# Variables that start with underscore (bug #355300) +$_variable +$_ # Reserved var. + +for my $x ($hash->{arr}->@*) { + for my $k (keys $k->%*) { + ... + } +} diff --git a/autotests/input/highlight.pl b/autotests/input/highlight.pl --- a/autotests/input/highlight.pl +++ b/autotests/input/highlight.pl @@ -53,3 +53,23 @@ &blah; prg("test"); + +# Bracket closures in RegExp patterns (bug #364866) +qr{ ${var} aa{aa{a}a} aa*b?}; +qr(aa(a(a(a(b|c)a)a)a)aa*b?); +s{aaa {aaa} a \x{A2} *b?}{aa}; +s(aa(a(a(a(b|c)a)a)a)aa)(aa); + +# Strings as scalar references (bug #348765) +$x = \'Reference of a String'; +$y = \"Reference of a String"; + +# Variables that start with underscore (bug #355300) +$_variable +$_ # Reserved var. + +for my $x ($hash->{arr}->@*) { + for my $k (keys $k->%*) { + ... + } +} diff --git a/autotests/reference/highlight.pl.ref b/autotests/reference/highlight.pl.ref --- a/autotests/reference/highlight.pl.ref +++ b/autotests/reference/highlight.pl.ref @@ -53,3 +53,23 @@
&blah;
prg("test");
+
+# Bracket closures in RegExp patterns (bug #364866)
+qr{ ${var} aa{aa{a}a} aa*b?};
+qr(aa(a(a(a(b|c)a)a)a)aa*b?);
+s{aaa {aaa} a \x{A2} *b?}{aa};
+s(aa(a(a(a(b|c)a)a)a)aa)(aa);
+
+# Strings as scalar references (bug #348765)
+$x = \'Reference of a String';
+$y = \"Reference of a String";
+
+# Variables that start with underscore (bug #355300)
+$_variable
+$_ # Reserved var.
+
+for my $x ($hash->{arr}->@*) {
+ for my $k (keys $k->%*) {
+ ...
+ }
+}
diff --git a/data/syntax/perl.xml b/data/syntax/perl.xml --- a/data/syntax/perl.xml +++ b/data/syntax/perl.xml @@ -39,7 +39,7 @@ Enhance tr/// and y/// support. --> - + if @@ -358,13 +358,14 @@ - + + - + @@ -423,9 +424,17 @@ - + + + + + + + + + - + @@ -517,6 +526,8 @@ + + @@ -532,17 +543,27 @@ + + + + + + + - + + + + @@ -605,25 +626,44 @@ + + + + + + + + + + + + + + + + + + + - + @@ -664,31 +704,36 @@ + + + - - + - + + + + + - - - + +