Anonymous avatar Anonymous committed 4e5b6f0

Perl: Add CHECK and INIT blocks

Only the Perl BEGIN and END blocks were being defined as keywords,
define CHECK and INIT blocks too. An example of a Perl program that
uses all these is:

#!perl
# Count to twelve in Perl
use 5.010;

END { say "Twelve" }
BEGIN { say "One" }
CHECK { say "Six" }
INIT { say "Seven" }
BEGIN { say "Two" }
END { say "Eleven" }
CHECK { say "Five" }
INIT { say "Eight" }
BEGIN { say "Three" }
INIT { say "Nine" }
CHECK { say "Four" }
END { say "Ten" }

Comments (0)

Files changed (1)

pygments/lexers/agile.py

             (r'^=[a-zA-Z0-9]+\s+.*?\n=cut', Comment.Multiline),
             (r'(case|continue|do|else|elsif|for|foreach|if|last|my|'
              r'next|our|redo|reset|then|unless|until|while|use|'
-             r'print|new|BEGIN|END|return)\b', Keyword),
+             r'print|new|BEGIN|CHECK|INIT|END|return)\b', Keyword),
             (r'(format)(\s+)([a-zA-Z0-9_]+)(\s*)(=)(\s*\n)',
              bygroups(Keyword, Text, Name, Text, Punctuation, Text), 'format'),
             (r'(eq|lt|gt|le|ge|ne|not|and|or|cmp)\b', Operator.Word),
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.