2014-02-23 20:07:44 +04:00
|
|
|
## Here is an example for PHP.
|
2014-05-17 00:21:34 +04:00
|
|
|
|
2017-05-15 10:52:14 +03:00
|
|
|
syntax "php" "\.ph(p[23457s~]?|tml)$"
|
2011-02-13 07:23:10 +03:00
|
|
|
magic "PHP script text"
|
2016-05-25 23:13:50 +03:00
|
|
|
comment "//"
|
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.
|
2017-05-15 10:52:14 +03:00
|
|
|
color green "\<(bool|char|const|double|enum|float|global|int|var)\>"
|
2008-03-20 07:45:55 +03:00
|
|
|
|
2014-05-17 00:21:34 +04:00
|
|
|
# Structure.
|
2017-05-15 10:52:14 +03:00
|
|
|
color brightyellow "\<(class|function|new|private|protected|public|for|foreach|while|do|if|else|elseif|switch|case|default)\>"
|
2008-03-20 07:45:55 +03:00
|
|
|
|
2014-05-17 00:21:34 +04:00
|
|
|
# Control flow.
|
2017-05-15 10:52:14 +03:00
|
|
|
color magenta "\<(break|continue|goto|return)\>"
|
2008-03-20 07:45:55 +03:00
|
|
|
|
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:]]+$"
|