diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-04-12 10:27:04 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-04-12 10:27:04 +0100 |
commit | 11e7b64a90c769d9d6939b505afab780a2cef5c4 (patch) | |
tree | 88e6daef88304fa493f50496a58975b42e967ccd /pygments/lexers/postgres.py | |
parent | 65f922591a2c55d7955bcd3fb607fd529b391d5e (diff) | |
download | pygments-11e7b64a90c769d9d6939b505afab780a2cef5c4.tar.gz |
Added list of pseudo-datatypes to PostgreSQL lexer
Diffstat (limited to 'pygments/lexers/postgres.py')
-rw-r--r-- | pygments/lexers/postgres.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pygments/lexers/postgres.py b/pygments/lexers/postgres.py index 583e118d..b4dc9df0 100644 --- a/pygments/lexers/postgres.py +++ b/pygments/lexers/postgres.py @@ -18,7 +18,8 @@ from pygments.token import Error, Punctuation, Literal, Token, \ Text, Comment, Operator, Keyword, Name, String, Number, Generic from pygments.lexers import get_lexer_by_name, ClassNotFound -from pygments.lexers._postgres_builtins import KEYWORDS, DATATYPES +from pygments.lexers._postgres_builtins import ( + KEYWORDS, DATATYPES, PSEUDO_TYPES) __all__ = [ 'PostgresLexer', 'PostgresConsoleLexer' ] @@ -86,7 +87,8 @@ class PostgresLexer(RegexLexer): (r'\s+', Text), (r'--.*?\n', Comment.Single), (r'/\*', Comment.Multiline, 'multiline-comments'), - (r'(' + '|'.join([s.replace(" ", "\s+") for s in DATATYPES]) + (r'(' + '|'.join([s.replace(" ", "\s+") + for s in DATATYPES + PSEUDO_TYPES]) + r')\b', Name.Builtin), (r'(' + '|'.join(KEYWORDS) + r')\b', Keyword), (r'[+*/<>=~!@#%^&|`?^-]+', Operator), |