mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-28 23:53:19 +03:00
c70e6919c2
The names of the authors were retrieved from: git log -p --follow syntax/<name>.nanorc and from: git log -p --follow --all -- doc/nanorc.sample For some files the original author is unclear, or the file is/was too small to mention an author for.
38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
## Syntax highlighting for PHP.
|
|
|
|
## Original author: Mike Frysinger
|
|
|
|
syntax php "\.(php[23457s~]?|phtml|ctp)$"
|
|
magic "PHP script"
|
|
comment "//"
|
|
|
|
# PHP markings.
|
|
color brightgreen "(<\?(php|=)?|\?>)"
|
|
|
|
# Function names.
|
|
color white "\<[A-Za-z_][A-Za-z_0-9]*\("
|
|
# Variable names.
|
|
color cyan "\$[A-Za-z_][A-Za-z_0-9]*"
|
|
|
|
# Types.
|
|
color green "\<(array|bool|callable|const|float|global|int|object|string|var)\>"
|
|
|
|
# Directives and structure.
|
|
color brightcyan "\<(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)\>"
|
|
color brightcyan "\<(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 brightcyan "\<(and|or|xor)\>"
|
|
|
|
# Control flow.
|
|
color magenta "\<(break|continue|goto|return)\>"
|
|
|
|
# Strings.
|
|
color brightyellow ""([^"\]|\\.)*"|'([^'\]|\\.)*'"
|
|
|
|
# Comments.
|
|
color brightblue "(^|[[:blank:]]+)//.*"
|
|
color brightblue start="/\*" end="\*/"
|
|
|
|
# Trailing whitespace.
|
|
color ,green "[[:space:]]+$"
|