php mode: nicer regexp
This commit is contained in:
parent
b6bd3fb726
commit
a2dc7c8456
1 changed files with 2 additions and 2 deletions
|
|
@ -462,7 +462,7 @@ PhpHighlightRules = function() {
|
||||||
"start" : [
|
"start" : [
|
||||||
{
|
{
|
||||||
token : "support", // php open tag
|
token : "support", // php open tag
|
||||||
regex : "<\\?php|<\\?\\=|<\\?"
|
regex : "<\\?(?:php|\\=)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
token : "support", // php close tag
|
token : "support", // php close tag
|
||||||
|
|
@ -540,7 +540,7 @@ PhpHighlightRules = function() {
|
||||||
else if (value == "debugger")
|
else if (value == "debugger")
|
||||||
return "invalid.deprecated";
|
return "invalid.deprecated";
|
||||||
else
|
else
|
||||||
if(value.match(/^\$[a-zA-Z][a-zA-Z0-9_]*$|^self$|^parent$/))
|
if(value.match(/^(\$[a-zA-Z][a-zA-Z0-9_]*|self|parent)$/))
|
||||||
return "variable";
|
return "variable";
|
||||||
return "identifier";
|
return "identifier";
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue