diff options
author | Georg Brandl <georg@python.org> | 2011-06-19 09:45:13 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2011-06-19 09:45:13 +0200 |
commit | a275a0c40bc4dcd48f52e04e056d03cecb73e973 (patch) | |
tree | 142f5c6af5cb5348bc19010cdef29216bbc748a1 /pygments/lexers/functional.py | |
parent | 8e50a30370b1ad58d8ec308d5ee7d4e7d153bc4a (diff) | |
parent | 0466a590eaf5face40a52d2ea245dc3f061723ef (diff) | |
download | pygments-a275a0c40bc4dcd48f52e04e056d03cecb73e973.tar.gz |
Merge with https://bitbucket.org/dvarrazzo/pygments-postgres
Diffstat (limited to 'pygments/lexers/functional.py')
-rw-r--r-- | pygments/lexers/functional.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pygments/lexers/functional.py b/pygments/lexers/functional.py index e6d16b19..724ee833 100644 --- a/pygments/lexers/functional.py +++ b/pygments/lexers/functional.py @@ -36,7 +36,7 @@ class SchemeLexer(RegexLexer): """ name = 'Scheme' aliases = ['scheme', 'scm'] - filenames = ['*.scm'] + filenames = ['*.scm', '*.ss', '*.rkt'] mimetypes = ['text/x-scheme', 'application/x-scheme'] # list of known keywords and builtins taken form vim 6.4 scheme.vim @@ -406,7 +406,7 @@ class HaskellLexer(RegexLexer): 'funclist': [ (r'\s+', Text), (r'[A-Z][a-zA-Z0-9_]*', Keyword.Type), - (r'[_a-z][\w\']+', Name.Function), + (r'(_[\w\']+|[a-z][\w\']*)', Name.Function), (r'--.*$', Comment.Single), (r'{-', Comment.Multiline, 'comment'), (r',', Punctuation), @@ -570,11 +570,11 @@ class OcamlLexer(RegexLexer): (r"[^\W\d][\w']*", Name), - (r'\d[\d_]*', Number.Integer), + (r'-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)', Number.Float), (r'0[xX][\da-fA-F][\da-fA-F_]*', Number.Hex), (r'0[oO][0-7][0-7_]*', Number.Oct), (r'0[bB][01][01_]*', Number.Binary), - (r'-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)', Number.Float), + (r'\d[\d_]*', Number.Integer), (r"'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))'", String.Char), @@ -656,7 +656,7 @@ class ErlangLexer(RegexLexer): 'universaltime_to_localtime', 'unlink', 'unregister', 'whereis' ] - operators = r'(\+|-|\*|/|<|>|=|==|/=|=:=|=/=|=<|>=|\+\+|--|<-|!)' + operators = r'(\+|-|\*|/|<|>|=|==|/=|=:=|=/=|=<|>=|\+\+|--|<-|!|\?)' word_operators = [ 'and', 'andalso', 'band', 'bnot', 'bor', 'bsl', 'bsr', 'bxor', 'div', 'not', 'or', 'orelse', 'rem', 'xor' |