2014-02-23 16:07:44 +00:00
|
|
|
## Here is an example for PHP.
|
2014-05-16 20:21:34 +00:00
|
|
|
|
2008-03-20 04:45:55 +00:00
|
|
|
syntax "php" "\.php[2345s~]?$"
|
2011-02-13 04:23:10 +00:00
|
|
|
magic "PHP script text"
|
2008-03-20 04:45:55 +00:00
|
|
|
|
2014-05-16 20:21:34 +00:00
|
|
|
# PHP markings.
|
2008-03-20 04:45:55 +00:00
|
|
|
color brightgreen "(<\?(php)?|\?>)"
|
|
|
|
|
2014-05-16 20:21:34 +00:00
|
|
|
# Functions.
|
2008-03-20 04:45:55 +00:00
|
|
|
color white "\<[a-z_]*\("
|
|
|
|
|
2014-05-16 20:21:34 +00:00
|
|
|
# Types.
|
2008-03-20 04:45:55 +00:00
|
|
|
color green "\<(var|float|global|double|bool|char|int|enum|const)\>"
|
|
|
|
|
2014-05-16 20:21:34 +00:00
|
|
|
# Structure.
|
2008-03-20 04:45:55 +00:00
|
|
|
color brightyellow "\<(class|new|private|public|function|for|foreach|if|while|do|else|elseif|case|default|switch)\>"
|
|
|
|
|
2014-05-16 20:21:34 +00:00
|
|
|
# Control flow.
|
2008-03-20 04:45:55 +00:00
|
|
|
color magenta "\<(goto|continue|break|return)\>"
|
|
|
|
|
2014-05-16 20:21:34 +00:00
|
|
|
# Strings.
|
2008-03-20 04:45:55 +00:00
|
|
|
color brightyellow "<[^= ]*>" ""(\.|[^"])*""
|
|
|
|
|
2014-05-16 20:21:34 +00:00
|
|
|
# Comments.
|
2008-03-20 04:45:55 +00:00
|
|
|
color brightblue "//.*"
|
|
|
|
color brightblue start="/\*" end="\*/"
|
2014-05-16 20:21:34 +00:00
|
|
|
##color blue start="<" end=">"
|
2015-05-03 15:47:05 +00:00
|
|
|
##color red "&[^;[:space:]]*;"
|
2008-03-20 04:45:55 +00:00
|
|
|
|
2014-05-16 20:21:34 +00:00
|
|
|
# Trailing whitespace.
|
2008-03-20 04:45:55 +00:00
|
|
|
color ,green "[[:space:]]+$"
|