micro/runtime/syntax/php.micro

67 lines
2.8 KiB
Text
Raw Normal View History

#This file probably needs cleanup!!
syntax "php" "\.php[2345s~]?$"
2016-09-01 19:24:31 +00:00
#Broken! Don't enable!
#color default start="<.+?>" end="<.+?>"
color symbol.operator "<|>"
color error "<[^!].*?>"
color symbol.tag "(?i)<[/]?(a(bbr|cronym|ddress|pplet|rea|rticle|side|udio)?|b(ase(font)?|d(i|o)|ig|lockquote|r)?|ca(nvas|ption)|center|cite|co(de|l|lgroup)|d(ata(list)?|d|el|etails|fn|ialog|ir|l|t)|em(bed)?|fieldset|fig(caption|ure)|font|form|(i)?frame|frameset|h[1-6]|hr|i|img|in(put|s)|kbd|keygen|label|legend|li(nk)?|ma(in|p|rk)|menu(item)?|met(a|er)|nav|no(frames|script)|o(l|pt(group|ion)|utput)|p(aram|icture|re|rogress)?|q|r(p|t|uby)|s(trike)?|samp|se(ction|lect)|small|source|span|strong|su(b|p|mmary)|textarea|time|track|u(l)?|var|video|wbr)( .*|>)*?>"
color symbol.tag.extended "(?i)<[/]?(body|div|html|head(er)?|footer|title|table|t(body|d|h(ead)?|r|foot))( .*|>)*?>"
color preproc "(?i)<[/]?(script|style)( .*|>)*?>"
#Highlighting from html land
color special "&[^;[[:space:]]]*;"
color symbol "[:=]"
color identifier "(alt|bgcolor|height|href|label|longdesc|name|onclick|onfocus|onload|onmouseover|size|span|src|style|target|type|value|width)="
color constant.string ""[^"]*""
color constant.number "(?i)#[0-9A-F]{6,6}"
#Don't want or need tag highlighting outside of a tag! :)
#color default start=">" end="<"
color constant.string.url "(ftp(s)?|http(s)?|git|chrome)://[^ ]+"
color comment "<!--.+?-->"
#Reset highlighting to begin php
color default "<\?(php|=)" end="\?>"
color identifier.class "([a-zA-Z0-9_-]+)\("
2016-09-01 19:24:31 +00:00
color preproc "(require|include|require_once|include_once)"
color type "\b(var|class|extends|function|echo|case|default|exit|switch|extends|as|define|do|declare|in|trait|interface|[E|e]xception|array|int|string|bool|iterable|void)\b"
2016-09-01 19:24:31 +00:00
color identifier.class "[a-zA-Z\\]+::"
2016-09-01 19:24:31 +00:00
color identifier "([A-Z][a-zA-Z0-9_]+)\s"
color identifier "([A-Z0-9_]+)[;|\s|\)|,]"
color type.keyword "(global|public|private|protected|static|const)"
color statement "(implements|abstract|instanceof|if|else(if)?|endif|namespace|use|as|new|throw|catch|try|while|print|(end)?(foreach)?)\b"
color identifier "new\s([a-zA-Z0-9\\]+)"
color special "(break|continue|goto|return)"
2016-09-01 19:24:31 +00:00
color constant.bool "(true|false|null|TRUE|FALSE|NULL)"
2016-09-01 19:24:31 +00:00
color constant "[\s|=|\s|\(|/|+|-|\*|\[]"
color constant.number "[0-9]"
2016-09-01 19:24:31 +00:00
color identifier "(\$this|parent|self|\$this->)"
color symbol.operator "(=>|===|!==|==|!=|&&|\|\||::|=|->|\!)"
2016-09-01 19:24:31 +00:00
color identifier.var "(\$[a-zA-Z0-9\-_]+)"
color symbol.operator "[\(|\)|/|+|\-|\*|\[|.|,|;]"
2016-09-01 19:24:31 +00:00
2016-12-22 23:34:10 +00:00
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
color constant.specialChar "\\[abfnrtv'\"\\]"
2016-09-01 19:24:31 +00:00
color symbol.brackets "(\[|\]|\{|\}|[()])"
2016-12-23 23:25:47 +00:00
color comment "(^|[[:space:]])//.*"
color comment "(^|[[:space:]])#.*"
2016-09-01 19:24:31 +00:00
color comment start="/\*" end="\*/"
color preproc "<\?(php|=)?"
color preproc "\?>"
color preproc "<!DOCTYPE.+?>"