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)?|\?>)"
2017-05-16 12:34:24 +03:00
# Function names.
2008-03-20 07:45:55 +03:00
color white "\<[a-z_]*\("
2017-05-16 12:34:24 +03:00
# Variable names.
color cyan "\$[a-z_]+"
2008-03-20 07:45:55 +03:00
2014-05-17 00:21:34 +04:00
# Types.
2017-05-16 12:34:24 +03:00
color green "\<(array|bool|callable|const|float|global|int|object|static|string|var)\>"
2008-03-20 07:45:55 +03:00
2017-05-16 12:34:24 +03:00
# Directives and structure.
color brightyellow "\<(abstract|as|class|clone|declare|enddeclare|extends|function|implements|include(_once)?|inst(ance|ead)of|interface|namespace|new|private|protected|public|require(_once)?|trait|use|yield)\>"
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 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.
2017-05-16 12:34:24 +03:00
color brightyellow ""(\.|[^"])*"" "'(\.|[^'])*'"
2008-03-20 07:45:55 +03:00
2014-05-17 00:21:34 +04:00
# Comments.
2017-05-16 12:34:24 +03:00
color brightblue "(^|[[:space:]]+)//.*"
2008-03-20 07:45:55 +03:00
color brightblue start="/\*" end="\*/"
2014-05-17 00:21:34 +04:00
# Trailing whitespace.
2008-03-20 07:45:55 +03:00
color ,green "[[:space:]]+$"