2014-02-23 16:07:44 +00:00
## Here is an example for PHP.
2014-05-16 20:21:34 +00:00
2017-05-15 07:52:14 +00:00
syntax "php" "\.ph(p[23457s~]?|tml)$"
2011-02-13 04:23:10 +00:00
magic "PHP script text"
2016-05-25 20:13:50 +00:00
comment "//"
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)?|\?>)"
2017-05-16 09:34:24 +00:00
# Function names.
2008-03-20 04:45:55 +00:00
color white "\<[a-z_]*\("
2017-05-16 09:34:24 +00:00
# Variable names.
color cyan "\$[a-z_]+"
2008-03-20 04:45:55 +00:00
2014-05-16 20:21:34 +00:00
# Types.
2017-05-21 08:11:42 +00:00
color green "\<(array|bool|callable|const|float|global|int|object|string|var)\>"
2008-03-20 04:45:55 +00:00
2017-05-16 09:34:24 +00:00
# Directives and structure.
2017-05-21 08:11:42 +00:00
color brightyellow "\<(abstract|as|class|clone|(end)?declare|extends|function|implements|include(_once)?|inst(ance|ead)of|interface|namespace|new|private|protected|public|require(_once)?|static|trait|use|yield)\>"
2017-05-16 09:34:24 +00:00
color brightyellow "\<(case|catch|default|do|echo|else(if)?|end(for(each)?|if|switch|while)|final(ly)?|for(each)?|if|print|switch|throw|try|while)\>"
# Operators.
color brightyellow "\<(and|or|xor)\>"
2008-03-20 04:45:55 +00:00
2014-05-16 20:21:34 +00:00
# Control flow.
2017-05-15 07:52:14 +00:00
color magenta "\<(break|continue|goto|return)\>"
2008-03-20 04:45:55 +00:00
2014-05-16 20:21:34 +00:00
# Strings.
2017-05-16 09:34:24 +00:00
color brightyellow ""(\.|[^"])*"" "'(\.|[^'])*'"
2008-03-20 04:45:55 +00:00
2014-05-16 20:21:34 +00:00
# Comments.
2017-05-16 09:34:24 +00:00
color brightblue "(^|[[:space:]]+)//.*"
2008-03-20 04:45:55 +00:00
color brightblue start="/\*" end="\*/"
2014-05-16 20:21:34 +00:00
# Trailing whitespace.
2008-03-20 04:45:55 +00:00
color ,green "[[:space:]]+$"