Files
zyedidia.micro/runtime/syntax/php.micro
USAMI Kenta efa24f5a8d Add PHP Keywords
- trait (PHP 5.5)
- iterable (PHP 7.1)
- void (PHP 7.1)

see https://github.com/ejmr/php-mode/pull/317
2016-09-06 18:25:08 +09:00

31 lines
1.1 KiB
Plaintext

syntax "php" "\.php[2345s~]?$"
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|trait|interface|[E|e]xception|array|int|string|bool|iterable|void)[\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 "(#.*|//.*)$"