Merge pull request #271 from teryanik/master

Improvement highlight php syntax
This commit is contained in:
Zachary Yedidia 2016-09-01 20:23:53 -04:00 committed by GitHub
commit 226cf399ba
2 changed files with 30 additions and 40 deletions

View file

@ -1778,7 +1778,7 @@ func runtimeSyntaxPerl6Micro() (*asset, error) {
return a, nil
}
var _runtimeSyntaxPhpMicro = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x7c\x54\x5d\x73\xda\x38\x14\x7d\xe7\x57\xa8\x82\x99\xd8\x4e\x0d\xd9\xaf\x87\x92\x02\x9b\xcd\xa4\x4d\x67\xb2\x49\x27\xa4\xfb\xb0\x96\xc9\x08\xf9\x82\x35\x2b\x64\xaf\x24\x97\xa4\xb9\xd9\xdf\xbe\x23\xdb\x10\xa0\x1f\x2f\x1e\xeb\xea\xea\x9c\x7b\xae\x74\x4f\xb7\x4b\x3e\x5e\x7e\x24\xd3\x47\xed\xf8\x03\xb9\x94\xcb\x5c\xc9\x65\xee\xa4\x5e\x76\x6c\x13\xa3\x65\x5e\x52\x42\x59\xbf\xcc\xcb\xe4\xe7\x5f\x7e\xfd\xcd\xfe\x97\x4e\x7a\xb4\x23\x0a\x55\x18\xb2\xce\xa5\x03\x62\x1d\x37\x6e\x44\xdf\xb2\x49\x50\xe6\x25\x8e\xc2\x09\x25\xa0\xb3\x11\x65\x93\x31\xed\x74\xc9\xbb\x4a\x0b\x27\x0b\x6d\xdb\x53\x73\xe3\x49\xe6\xaa\x02\x42\x83\x84\xc7\x5f\xce\xe2\xbf\x4f\xe2\x37\xf7\x71\x1a\x85\x2c\xf0\x27\xce\x0b\x6d\x9d\xa9\x84\xfb\xe6\x11\xa1\xb8\xb5\x08\x0f\x0e\x74\x66\x71\x59\xb8\x22\x24\xbb\x38\x69\x14\x6e\x0a\x5c\x1a\x00\x4d\x68\x32\xe3\xf1\x97\x86\xe2\xe9\xa7\xe7\xe0\x33\x37\xd8\x80\x2c\xda\xd2\x10\x44\x5e\xa0\xe0\x16\x70\x6e\x80\xff\x83\x19\x2c\x78\xa5\x1c\xc2\x83\x74\x68\xd7\xd2\x89\x1c\xe5\x02\x41\x59\xa8\x3f\xfe\x5f\x67\x72\x81\x8b\xc2\x00\x17\xb9\x5f\x6d\x7e\x7f\xc7\x75\x2e\x15\x60\x59\xcd\x95\x14\x58\x1a\xf9\x99\x3b\xc0\xd2\x14\x0e\x84\x83\x0c\x0d\xb8\xca\x68\x74\xa6\x02\x5c\x70\x0f\xa9\x2b\xa5\xf0\xee\xf6\xd3\x05\xbe\x3b\xbb\x9a\x5e\xe0\xf5\xa7\xab\x2b\x14\xbe\x0b\x68\x1d\x77\x52\x6c\xe5\x72\x8b\xdc\x18\xfe\x88\x06\xfe\xad\xa4\x01\x94\x5a\xa8\x2a\x83\xcd\xfa\xbe\xd0\x62\x1b\x6c\x16\x19\x2c\xa4\x06\xcc\x0a\x8f\xe8\xa4\xae\x7c\x48\x28\x6e\xa0\x6e\x9e\x2f\x50\x3b\x94\x1a\x35\x5f\x81\x2d\xb9\x00\xac\x2c\x84\xfb\x4d\xa3\xdf\xb8\x89\x97\x9e\xa7\xc7\x43\x7f\x6f\x7f\x71\x23\xf9\x5c\x81\xdd\x7b\x1f\x94\xf5\xda\xcc\xfb\x93\xf8\x4d\x2f\x8d\x30\x19\xbd\x7a\x3b\x4e\xe9\x41\x56\x3c\xfe\x4e\x5a\x97\x4c\x4b\x10\x92\x2b\x72\x9e\x73\xc3\x85\x03\xb3\x61\x78\x04\xa5\x8a\x35\xa1\x49\xff\xf5\xd3\x73\x10\x9e\x6e\x41\x37\x1b\x2c\xf9\x2a\xf2\x55\x4e\x32\x4a\x93\x59\x43\x74\x5d\xad\xe6\x2f\xe8\x2b\xbe\x04\xed\x38\xa1\xc9\x71\x9c\x46\x41\xe2\x95\xb2\x7e\x18\xd5\x3f\xc7\x41\x02\x17\xa9\xdf\x99\x1c\xec\x84\x11\x3d\x04\x38\x79\xf0\x3b\x8d\xbc\x34\xda\x95\x74\xd8\xb3\xbd\xa7\xce\x7a\x2e\x97\x16\x4b\x6e\x40\xbb\xe1\x10\x2d\xa8\xc5\x70\x88\x4d\x38\x1e\x87\x1e\xe8\x0f\xe9\xd6\xd2\x02\xb9\x29\xc1\xf0\xdd\x39\xdb\x92\x07\xec\x14\x19\x22\x9b\x85\xf5\x45\x76\xc9\x99\xce\x06\x37\x66\x30\xbd\xbd\x19\x80\x13\xfb\xb3\x12\xb0\xd3\x3a\x9d\x21\x0e\x87\x38\x1a\x63\x4b\x73\xa3\x95\xd4\x40\xce\x8b\xd5\x0a\xf4\xc1\x60\x6e\x1a\x19\x74\xfb\x11\x0e\x06\xfd\x28\xec\xd5\x12\xef\x6e\x3f\x5c\xbf\x9f\xbe\x6a\x73\x0d\x64\x84\x06\x47\xc9\xec\x28\x8d\x8e\x42\x0c\x18\x4d\x66\x8c\xa6\x11\xa3\x35\xc1\x87\x86\xe0\x7b\x6f\xe8\x89\xf5\x92\xd9\x73\x1a\xb1\x5a\x81\xb7\xad\x3b\xbe\xb4\x7b\xd0\xad\x03\x85\x13\x64\x93\xa6\xe8\xf7\xa0\xc1\x70\x45\x2e\xef\xfe\xbc\xda\x49\x6d\x1d\xcb\xfb\x53\xe3\x54\xbb\xde\xd5\xe9\x12\x67\xb8\x54\x52\x2f\x1b\xf2\x7a\x24\xda\xd3\xaf\xb7\x8e\x92\x0c\xeb\xf8\x30\xf5\xd3\x91\xbc\xac\x8e\x6b\xe9\xab\x4a\x39\x19\xd7\x82\xc4\x0f\x3a\xd6\x16\x32\x60\xd1\xc6\x32\xa3\x01\xed\xfc\x1f\x00\x00\xff\xff\xc7\x51\xb5\xda\x97\x05\x00\x00")
var _runtimeSyntaxPhpMicro = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x74\x93\x4f\x6f\xdb\x38\x10\xc5\xef\xf9\x14\x0a\x37\x48\x24\x3b\xb2\x17\xbb\xed\xa1\x4e\x65\x23\x87\xf4\x14\xf4\xd0\x36\x97\x88\x46\x40\x53\xa3\x88\x28\x4d\xaa\x24\x15\x3b\xc5\x43\x3f\x7b\x41\xf9\x4f\x8c\x42\xbd\xd8\xe4\xe8\x71\xf4\xf4\x7b\x1c\xff\x6a\x82\xd8\x26\xac\x6d\x5a\x96\x30\x3e\x69\x9b\xb6\xfc\xef\xff\x77\xef\xfd\xaf\xe5\xe2\x82\x9d\x49\xab\xad\x4b\x2a\xaa\x45\xa7\x43\xe2\x83\x70\xa1\x60\x1f\xf9\x22\x6d\x9b\x16\x45\xb6\x60\x09\x99\xaa\x60\x7c\x31\x67\x67\x7b\xb1\x6f\x49\x2a\xa1\x13\x96\x96\x22\xff\x79\x9b\x3f\xfe\x9b\x7f\x78\xca\x97\xe3\x8c\xa7\x47\x8d\xaa\xc8\x04\x55\x2b\x72\x09\x4b\x5f\x84\x83\xd4\xc2\x7b\x3c\xdb\x60\x41\xdb\x40\xa6\xf2\xa8\x3b\x23\x83\xb2\x06\x24\x1b\x0b\x29\x3c\x61\xe5\x48\x7c\xc7\xde\x0d\x68\xab\x02\xfc\x46\x05\xd9\xa0\xb6\x8e\x84\x6c\x40\xa6\x3a\x2c\x37\x8d\xd2\x04\x69\x8d\x0f\xf0\x41\x04\x25\x8f\xad\x85\x87\xa3\x1f\x9d\x72\x04\x65\xa4\xee\x2a\x3a\xec\x9f\xac\x91\xc7\xe2\x6e\x53\x51\xad\x0c\xa1\xb2\xb1\x57\x50\xa6\x8b\x25\xa9\x85\xa3\x9d\xdf\xd6\x29\x13\xa0\x0c\x94\x09\xe4\x6a\x21\x09\xe5\x1d\x68\xb9\x95\xd4\xf6\xfe\x85\x73\xe2\x35\x3e\x85\x0f\x4e\x99\x67\xac\xac\xd5\x59\xc9\x3d\x78\xb6\x1c\x44\xb2\x07\xc7\xf9\x72\x3c\x9b\x0d\x2a\x0c\x6d\xb8\x3f\x01\x1c\xa5\x19\x1b\xa2\x5b\xde\xe6\x8f\xcb\x93\x24\x62\x10\xfe\xaf\xca\xbd\xa2\xbc\x41\x6f\x0f\xd7\x6f\x06\x23\x43\x5a\x93\x09\x09\x4b\xd5\xba\xd5\xfd\xda\x43\xac\x7c\x70\x42\x06\x3c\x6b\xbb\x12\x1a\x6d\xb7\xd2\x4a\x42\x19\x1f\x84\x91\x64\xeb\x08\xe8\x45\x04\x42\xeb\x6c\x20\x19\xa8\x3a\xc4\xa1\x6a\x90\xf6\xd4\xff\xc4\xb5\xa9\x54\x0d\x23\xd6\xe4\xdb\x48\xb1\xf3\x14\x93\x32\xb4\x41\x68\x9c\xdd\x40\x8a\x18\x75\x70\xaf\x70\x14\x3a\x67\x7a\x86\x37\x6f\x0e\xfb\xac\x45\x6f\x30\xb8\x8e\x50\x8b\xd8\xdd\x74\x5a\xe3\xdb\x97\x87\x3b\x7c\xba\xbd\xff\x7a\x87\xcf\x0f\xf7\xf7\xd9\xc0\x99\xd8\xac\xc0\xbc\xff\xf0\x14\x53\x8c\x91\x83\x8f\xc0\xcb\x65\xca\xab\x71\x36\x7c\x77\xf9\x45\x68\x94\x47\x2b\x1c\xc5\x7c\x49\xd7\xd8\x95\xf2\x79\x36\x48\xae\x98\xa3\x28\x0a\x9c\x17\x05\xfa\x3f\x5c\x5e\x82\x83\x03\xb3\x19\x0a\xe4\x73\xf0\xf3\xb7\x83\x87\xb9\x8b\xef\x39\xc9\x3a\x7f\x3a\x09\xfb\xa8\x29\x79\x1a\x13\x3b\x31\x8e\xeb\x21\x3a\x93\xdd\x2d\x4c\x58\x7a\x35\x19\x2d\xae\xc0\xd9\x64\xb4\xe0\xec\x14\xc9\xba\x37\xbb\x9f\xf6\x29\x1f\x1d\xa6\x7c\x34\x65\x7f\x68\x58\xfa\xcf\x64\x84\xe9\x74\x32\xca\x2e\xd8\xef\x00\x00\x00\xff\xff\x47\x48\x75\x65\x4c\x04\x00\x00")
func runtimeSyntaxPhpMicroBytes() ([]byte, error) {
return bindataRead(

View file

@ -1,40 +1,30 @@
## PHP Syntax Highlighting
syntax "php" "\.php[2345s~]?$"
color white start="<\?(php|=)?" end="\?>"
# Functions
color brightblue "([a-zA-Z0-9_-]*)\("
# Constructs
color brightblue "(class|extends|goto) ([a-zA-Z0-9_]*)"
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}"
color brightblue "[a-zA-Z0-9]+:"
# Variables
color white "\$[a-zA-Z_0-9$]*|[=!<>]"
color white "\->[a-zA-Z_0-9$]*|[=!<>]"
# Special Characters
color yellow "[.,{}();]"
color yellow "\["
color yellow "\]"
color yellow "[=][^>]"
# Numbers
color magenta "[+-]*([0-9]\.)*[0-9]+([eE][+-]?([0-9]\.)*[0-9])*"
color magenta "0x[0-9a-zA-Z]*"
# Special Variables
color brightblue "(\$this|parent::|self::|\$this->)"
# Bitwise Operations
color magenta "(\;|\||\^){1}"
# And/Or/SRO/etc
color green "(\;\;|\|\||::|=>|->)"
# Online Comments
color brightyellow "(#.*|//.*)$"
# STRINGS!
color red "('[^']*')|(\"[^\"]*\")"
# Inline Variables
color white "\{\$[^}]*\}"
# PHP Tags
color red "(<\?(php)?|\?>)"
# General HTML
color red start="\?>" end="<\?(php|=)?"
# trailing whitespace
color ,green "[^[:space:]]{1}[[:space:]]+$"
# multi-line comments
color brightyellow start="/\*" end="\*/"
color default start="<\?(php|=)?" end="\?>"
color special "([a-zA-Z0-9_-]+)\("
color identifier "(var|class|goto|extends|function|echo|case|break|default|exit|switch|foreach|endforeach|while|const|static|extends|as|require|include|require_once|include_once|define|do|continue|declare|goto|print|in|interface|[E|e]xception|array|int|string|bool)[\s|\)]"
color identifier "[a-zA-Z\\]+::"
color identifier "new\s([a-zA-Z0-9\\]+)"
color identifier "([A-Z][a-zA-Z0-9_]+)\s"
color identifier "([A-Z0-9_]+)[;|\s|\)|,]"
color statement "(implements|abstract|global|public|instanceof|private|protected|static|if|else|elseif|endif|namespace|use|as|new|throw|catch|try|return)[\s|;]"
color constant "(true|false|null|TRUE|FALSE|NULL)"
color constant "[\s|=|>|\s|\(|/|+|-|\*|\[](\d+)"
color identifier "(\$this|parent|self|\$this->)"
color statement "(=>|===|!==|==|!=|&&|\|\||::|=|->|\!)"
color default "(\$[a-zA-Z0-9\-_]+)"
color default "[\(|\)|/|+|-|\*|\[|,|;]"
color constant.string "('.*?'|\".*?\")"
color comment start="/\*" end="\*/"
color comment "(#.*|//.*)$"