diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-04-01 18:01:50 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-04-01 18:01:50 +0100 |
commit | 35e7c08140ad6fbbcf6c77351ce2850217dbbc79 (patch) | |
tree | 7f9e9efa48f9b3b668f709717c6716a7d962c13b /pygments/lexers/postgres.py | |
parent | 0f5c8666171a4ba36f2407494ce349daaaf97864 (diff) | |
download | pygments-35e7c08140ad6fbbcf6c77351ce2850217dbbc79.tar.gz |
Look for datatypes before the keywords
Some datatypes are keywords, some are not. Showing the former as keywords
makes a messy result.
Diffstat (limited to 'pygments/lexers/postgres.py')
-rw-r--r-- | pygments/lexers/postgres.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/lexers/postgres.py b/pygments/lexers/postgres.py index 6f126c4e..696b3baf 100644 --- a/pygments/lexers/postgres.py +++ b/pygments/lexers/postgres.py @@ -39,9 +39,9 @@ class PostgresLexer(RegexLexer): (r'\s+', Text), (r'--.*?\n', Comment.Single), (r'/\*', Comment.Multiline, 'multiline-comments'), - (r'(' + '|'.join(KEYWORDS) + r')\b', Keyword), (r'(' + '|'.join([s.replace(" ", "\s+") for s in DATATYPES]) + r')\b', Name.Builtin), + (r'(' + '|'.join(KEYWORDS) + r')\b', Keyword), (r'[+*/<>=~!@#%^&|`?^-]', Operator), (r'::', Operator), # cast (r'([0-9]*\.[0-9]*|[0-9]+)(e[+-]?[0-9]+)?', Number.Float), |