diff --git a/syntax_files/php.yaml b/syntax_files/php.yaml index 0d239d2..a5ab9ea 100644 --- a/syntax_files/php.yaml +++ b/syntax_files/php.yaml @@ -19,16 +19,16 @@ rules: - comment: "" - default: "<\\?(php|=)\" end=\"\\?>" - identifier.class: "([a-zA-Z0-9_-]+)\\(" - - preproc: "(require|include|require_once|include_once)" - - type: "\\b(var|class|extends|function|function_exists|phpinfo|echo|case|default|exit|switch|extends|as|define|do|declare|in|trait|interface|[E|e]xception|array|int|string|bool|iterable|void)\\b" + - preproc: "^\\s*(require|include|require_once|include_once)" - identifier.class: "[a-zA-Z\\\\]+::" - identifier: "([A-Z][a-zA-Z0-9_]+)\\s" - identifier: "([A-Z0-9_]+)[;|\\s|\\)|,]" - type.keyword: "(global|public|private|protected|static|const)" - - statement: "(implements|abstract|instanceof|if|else(if)?|endif|namespace|use|as|new|throw|catch|try|while|print|for|(end)?(foreach)?)\\b" + - type: "\\b(var|class|extends|function|function_exists|__construct|phpinfo|echo|case|default|exit|switch|extends|as|define|do|declare|in|trait|interface|[E|e]xception|array|int|string|bool|iterable|void)\\b" + - statement: "(^|[[:space:]])(implements|abstract|instanceof|if|else(if)?|endif|namespace|use|as|new|throw|catch|try|while|print|for|(end)?(foreach)?)\\b" - identifier: "new\\s([a-zA-Z0-9\\\\]+)" - special: "(break|continue|goto|return)" - - constant.bool: "(true|false|null|TRUE|FALSE|NULL)" + - constant.bool: "(=|[[:space:]])(true|false|null|TRUE|FALSE|NULL)" - constant: "[\\s|=|\\s|\\(|/|+|-|\\*|\\[]" - constant.number: "[0-9]" - identifier: "(\\$this|parent|self|\\$this->)"