diff options
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' |