summaryrefslogtreecommitdiff
path: root/pygments/lexers/web.py
diff options
context:
space:
mode:
authorblackbird <devnull@localhost>2007-01-20 18:34:13 +0100
committerblackbird <devnull@localhost>2007-01-20 18:34:13 +0100
commited188fd9f6fc0f5adaec44daca32d6bcfff5ce80 (patch)
tree95f7fbbb082844682ecf2e74a4b289760aac6891 /pygments/lexers/web.py
parent48588688b32b374c7edeee945336cc83eaa38a74 (diff)
downloadpygments-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.py3
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|'