Benno Schulenberg c830b8f51c syntax: php: recognize also the .phtml and .php7 extensions
(And in the bargain sort or group some of the keywords.)

This addresses https://savannah.gnu.org/patch/?9342.
Suggested-by: M <taur@mail.com>
2017-05-15 10:57:57 +02:00

33 lines
740 B
Plaintext

## Here is an example for PHP.
syntax "php" "\.ph(p[23457s~]?|tml)$"
magic "PHP script text"
comment "//"
# PHP markings.
color brightgreen "(<\?(php)?|\?>)"
# Functions.
color white "\<[a-z_]*\("
# Types.
color green "\<(bool|char|const|double|enum|float|global|int|var)\>"
# Structure.
color brightyellow "\<(class|function|new|private|protected|public|for|foreach|while|do|if|else|elseif|switch|case|default)\>"
# Control flow.
color magenta "\<(break|continue|goto|return)\>"
# Strings.
color brightyellow "<[^= ]*>" ""(\.|[^"])*""
# Comments.
color brightblue "//.*"
color brightblue start="/\*" end="\*/"
##color blue start="<" end=">"
##color red "&[^;[:space:]]*;"
# Trailing whitespace.
color ,green "[[:space:]]+$"