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