diff options
author | blackbird <devnull@localhost> | 2007-01-20 18:34:13 +0100 |
---|---|---|
committer | blackbird <devnull@localhost> | 2007-01-20 18:34:13 +0100 |
commit | ed188fd9f6fc0f5adaec44daca32d6bcfff5ce80 (patch) | |
tree | 95f7fbbb082844682ecf2e74a4b289760aac6891 /pygments/lexers/web.py | |
parent | 48588688b32b374c7edeee945336cc83eaa38a74 (diff) | |
download | pygments-ed188fd9f6fc0f5adaec44daca32d6bcfff5ce80.tar.gz |
[svn] various changes in pygments (does also affect the docs)
Diffstat (limited to 'pygments/lexers/web.py')
-rw-r--r-- | pygments/lexers/web.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pygments/lexers/web.py b/pygments/lexers/web.py index ef480894..05622805 100644 --- a/pygments/lexers/web.py +++ b/pygments/lexers/web.py @@ -288,6 +288,7 @@ class PhpLexer(RegexLexer): name = 'PHP' aliases = ['php', 'php3', 'php4', 'php5'] filenames = ['*.php', '*.php[345]'] + mimetypes = ['text/x-php'] flags = re.IGNORECASE | re.DOTALL | re.MULTILINE tokens = { @@ -310,6 +311,8 @@ class PhpLexer(RegexLexer): (r'(class)(\s+)', bygroups(Keyword, Text), 'classname'), (r'(function)(\s+)(&?)(\s*)', bygroups(Keyword, Text, Operator, Text), 'functionname'), + (r'(const)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)', + bygroups(Keyword, Text, Name.Constant)), (r'(and|E_PARSE|old_function|E_ERROR|or|as|E_WARNING|parent|' r'eval|PHP_OS|break|exit|case|extends|PHP_VERSION|cfunction|' r'FALSE|print|for|require|continue|foreach|require_once|' |