ThirdParty/Pygments/pygments/lexers/haskell.py

changeset 6651
e8f3b5568b21
parent 5713
6762afd9f963
equal deleted inserted replaced
6650:1dd52aa8897c 6651:e8f3b5568b21
70 (r'\\(?![:!#$%&*+.\\/<=>?@^|~-]+)', Name.Function), # lambda operator 70 (r'\\(?![:!#$%&*+.\\/<=>?@^|~-]+)', Name.Function), # lambda operator
71 (r'(<-|::|->|=>|=)(?![:!#$%&*+.\\/<=>?@^|~-]+)', Operator.Word), # specials 71 (r'(<-|::|->|=>|=)(?![:!#$%&*+.\\/<=>?@^|~-]+)', Operator.Word), # specials
72 (r':[:!#$%&*+.\\/<=>?@^|~-]*', Keyword.Type), # Constructor operators 72 (r':[:!#$%&*+.\\/<=>?@^|~-]*', Keyword.Type), # Constructor operators
73 (r'[:!#$%&*+.\\/<=>?@^|~-]+', Operator), # Other operators 73 (r'[:!#$%&*+.\\/<=>?@^|~-]+', Operator), # Other operators
74 # Numbers 74 # Numbers
75 (r'\d+[eE][+-]?\d+', Number.Float), 75 (r'0[xX]_*[\da-fA-F](_*[\da-fA-F])*_*[pP][+-]?\d(_*\d)*', Number.Float),
76 (r'\d+\.\d+([eE][+-]?\d+)?', Number.Float), 76 (r'0[xX]_*[\da-fA-F](_*[\da-fA-F])*\.[\da-fA-F](_*[\da-fA-F])*(_*[pP][+-]?\d(_*\d)*)?', Number.Float),
77 (r'0[oO][0-7]+', Number.Oct), 77 (r'\d(_*\d)*_*[eE][+-]?\d(_*\d)*', Number.Float),
78 (r'0[xX][\da-fA-F]+', Number.Hex), 78 (r'\d(_*\d)*\.\d(_*\d)*(_*[eE][+-]?\d(_*\d)*)?', Number.Float),
79 (r'\d+', Number.Integer), 79 (r'0[bB]_*[01](_*[01])*', Number.Bin),
80 (r'0[oO]_*[0-7](_*[0-7])*', Number.Oct),
81 (r'0[xX]_*[\da-fA-F](_*[\da-fA-F])*', Number.Hex),
82 (r'\d(_*\d)*', Number.Integer),
80 # Character/String Literals 83 # Character/String Literals
81 (r"'", String.Char, 'character'), 84 (r"'", String.Char, 'character'),
82 (r'"', String, 'string'), 85 (r'"', String, 'string'),
83 # Special 86 # Special
84 (r'\[\]', Keyword.Type), 87 (r'\[\]', Keyword.Type),
675 678
676 # symbols that can be in an operator 679 # symbols that can be in an operator
677 symbols = r'[$%&*+@!/\\^~=.:\-?|<>]+' 680 symbols = r'[$%&*+@!/\\^~=.:\-?|<>]+'
678 681
679 # symbol boundary: an operator keyword should not be followed by any of these 682 # symbol boundary: an operator keyword should not be followed by any of these
680 sboundary = '(?!'+symbols+')' 683 sboundary = '(?!' + symbols + ')'
681 684
682 # name boundary: a keyword should not be followed by any of these 685 # name boundary: a keyword should not be followed by any of these
683 boundary = '(?![\w/])' 686 boundary = r'(?![\w/])'
684 687
685 # koka token abstractions 688 # koka token abstractions
686 tokenType = Name.Attribute 689 tokenType = Name.Attribute
687 tokenTypeDef = Name.Class 690 tokenTypeDef = Name.Class
688 tokenConstructor = Generic.Emph 691 tokenConstructor = Generic.Emph

eric ide

mercurial