Skip to content

Commit

Permalink
[Perl] Fix upper-case labels (sublimehq#1874)
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe authored and wbond committed Feb 19, 2019
1 parent c637e9c commit 3ca04a0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Perl/Perl.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,11 @@ contexts:
expressions:
- include: blocks
- include: groups
- include: quoted-like
- include: label
- include: constants
- include: class
- include: operators
- include: quoted-like
- include: control
- include: sub
- include: variables
Expand Down Expand Up @@ -616,7 +617,6 @@ contexts:
- match: \b(?:do|for|foreach|until|while){{break}}
scope: keyword.control.flow.perl
push: regexp-pop
- include: label

label:
- match: ({{identifier}})(:)(?!:)
Expand Down
11 changes: 11 additions & 0 deletions Perl/syntax_test_perl.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1290,6 +1290,17 @@ ($arg, $arg)
# ^ punctuation.terminator.statement.perl
retry::
# ^^^^^^^ - entity.name.label.perl
LINE:
# ^^^^ entity.name.label.perl
# ^ punctuation.separator.perl
LINE:exit -1
# ^^^^ entity.name.label.perl
# ^ punctuation.separator.perl
# ^^^^ keyword.other.flow.perl
# ^^ constant.numeric.integer.perl
if(exists($curargs{$index}))
# ^^ keyword.control.conditional.perl
# ^ punctuation.section.group.begin.perl
Expand Down

0 comments on commit 3ca04a0

Please sign in to comment.