annotate nanorc.d/php.nanorc @ 84:b989099cde9f

Start to update Nano colourisation Defaults are REALLY basic
author IBBoard <dev@ibboard.co.uk>
date Sat, 31 Mar 2018 21:06:21 +0100
parents
children ef08bb127ede
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
84
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 ## PHP Syntax Highlighting
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2 syntax "PHP" "\.php[2345s~]?$"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 color white start="<\?(php|=)?" end="\?>"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4 # Functions
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 color brightblue "([a-zA-Z0-9_-]*)\("
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 # Constructs
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 color brightblue "(class|extends|goto) ([a-zA-Z0-9_]*)"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 color green "[^a-z0-9_-]{1}(var|class|function|echo|case|break|default|exit|switch|if|else|elseif|endif|foreach|endforeach|@|while|public|private|protected|return|true|false|null|TRUE|FALSE|NULL|const|static|extends|as|array|require|include|require_once|include_once|define|do|continue|declare|goto|print|in|namespace|use)[^a-z0-9_-]{1}"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9 color brightblue "[a-zA-Z0-9]+:"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 # Variables
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 color white "\$[a-zA-Z_0-9$]*|[=!<>]"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12 color white "\->[a-zA-Z_0-9$]*|[=!<>]"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 # Special Characters
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14 color yellow "[.,{}();]"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15 color yellow "\["
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16 color yellow "\]"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
17 color yellow "[=][^>]"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
18 # Numbers
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
19 color magenta "[+-]*([0-9]\.)*[0-9]+([eE][+-]?([0-9]\.)*[0-9])*"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
20 color magenta "0x[0-9a-zA-Z]*"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
21 # Special Variables
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
22 color brightblue "(\$this|parent::|self::|\$this->)"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
23 # Bitwise Operations
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
24 color magenta "(\;|\||\^){1}"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
25 # And/Or/SRO/etc
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
26 color green "(\;\;|\|\||::|=>|->)"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
27 # Online Comments
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
28 color brightyellow "(#.*|//.*)$"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
29 # STRINGS!
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
30 color red "('[^']*')|(\"[^\"]*\")"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
31 # Inline Variables
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
32 color white "\{\$[^}]*\}"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
33 # PHP Tags
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
34 color red "(<\?(php)?|\?>)"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
35 # General HTML
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
36 color red start="\?>" end="<\?(php|=)?"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
37 # trailing whitespace
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
38 color ,green "[^[:space:]]{1}[[:space:]]+$"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
39 # multi-line comments
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
40 color brightyellow start="/\*" end="\*/"