summaryrefslogtreecommitdiff
path: root/pygments/lexers/php.py
diff options
context:
space:
mode:
authorMiikka Salminen <miikka.salminen@gmail.com>2016-02-03 22:12:59 +0200
committerMiikka Salminen <miikka.salminen@gmail.com>2016-02-03 22:12:59 +0200
commit3660f9bb446d53c55416c87b157a694763276f93 (patch)
tree17a3f112a8d19b7ce99da8523bac41c43af92670 /pygments/lexers/php.py
parent256b411f2db3723a7071cfd3c4a8a1360b929615 (diff)
downloadpygments-3660f9bb446d53c55416c87b157a694763276f93.tar.gz
Changed the lexing of PHP magic variables to constants.
Diffstat (limited to 'pygments/lexers/php.py')
-rw-r--r--pygments/lexers/php.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pygments/lexers/php.py b/pygments/lexers/php.py
index abcccffa..257dd94f 100644
--- a/pygments/lexers/php.py
+++ b/pygments/lexers/php.py
@@ -170,7 +170,7 @@ class PhpLexer(RegexLexer):
r'catch|throw|this|use|namespace|trait|yield|'
r'finally)\b', Keyword),
(r'(true|false|null)\b', Keyword.Constant),
- include('magicvars'),
+ include('magicconstants'),
(r'\$\{\$+' + _ident_inner + '\}', Name.Variable),
(r'\$+' + _ident_inner, Name.Variable),
(_ident_inner, Name.Other),
@@ -192,13 +192,13 @@ class PhpLexer(RegexLexer):
'__set_state', '__clone', '__debugInfo',), suffix=r'\b'),
Name.Function.Magic),
],
- 'magicvars': [
+ 'magicconstants': [
# source: http://php.net/manual/en/language.constants.predefined.php
(words((
'__LINE__', '__FILE__', '__DIR__', '__FUNCTION__', '__CLASS__',
'__TRAIT__', '__METHOD__', '__NAMESPACE__',),
suffix=r'\b'),
- Name.Variable.Magic),
+ Name.Constant),
],
'classname': [
(_ident_inner, Name.Class, '#pop')