diff options
-rw-r--r-- | AUTHORS | 2 | ||||
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | pygments/lexers/compiled.py | 16 |
3 files changed, 12 insertions, 7 deletions
@@ -87,6 +87,7 @@ Other contributors, listed alphabetically, are: * Mark Lee -- Vala lexer * Ben Mabey -- Gherkin lexer * Angus MacArthur -- QML lexer +* Louis Marchand -- Eiffel lexer * Simone Margaritelli -- Hybris lexer * Kirk McDonald -- D lexer * Gordon McGregor -- SystemVerilog lexer @@ -155,6 +156,5 @@ Other contributors, listed alphabetically, are: * Enrique Zamudio -- Ceylon lexer * Alex Zimin -- Nemerle lexer * Rob Zimmerman -- Kal lexer -* Louis Marchand -- Eiffel lexer Many thanks for all contributions! @@ -29,6 +29,7 @@ Version 1.7 * Hy (PR#238) * Chapel (PR#256) * Kal (PR#233) + * Eiffel (PR#273) - Lexer aliases passed to ``get_lexer_by_name()`` are now case-insensitive. diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py index a4b88d3c..9103d07c 100644 --- a/pygments/lexers/compiled.py +++ b/pygments/lexers/compiled.py @@ -3856,20 +3856,24 @@ class ChapelLexer(RegexLexer): ], } + class EiffelLexer(RegexLexer): """ For `Eiffel <http://www.eiffel.com>`_ source code. + + *New in Pygments 1.7.* """ name = 'Eiffel' aliases = ['eiffel'] filenames = ['*.e'] mimetypes = ['text/x-eiffel'] + tokens = { 'root': [ (r'[^\S\n]+', Text), (r'--.*?\n', Comment.Single), (r'[^\S\n]+', Text), - # Please note thant keyword and operator are case insensitive. + # Please note that keyword and operator are case insensitive. (r'(?i)(true|false|void|current|result|precursor)\b', Keyword.Constant), (r'(?i)(and(\s+then)?|not|xor|implies|or(\s+else)?)\b', Operator.Word), (r'(?i)\b(across|agent|alias|all|as|assign|attached|attribute|check|' @@ -3879,7 +3883,7 @@ class EiffelLexer(RegexLexer): r'old|once|only|redefine|rename|require|rescue|retry|select|' r'separate|then|undefine|until|variant|when)\b',Keyword.Reserved), (r'"\[(([^\]%]|\n)|%(.|\n)|\][^"])*?\]"', String), - (r'"([^"%\n]|%.)*?"', String), + (r'"([^"%\n]|%.)*?"', String), include('numbers'), (r"'([^'%]|%'|%%)'", String.Char), (r"(//|\\\\|>=|<=|:=|/=|~|/~|[\\\?!#%&@|+/\-=\>\*$<|^\[\]])", Operator), @@ -3887,12 +3891,12 @@ class EiffelLexer(RegexLexer): (r'([a-z][a-zA-Z0-9_]*)|([A-Z][A-Z0-9_]*[a-z][a-zA-Z0-9_]*)', Name), (r'([A-Z][A-Z0-9_]*)', Name.Class), (r'\n+', Text), - ], - 'numbers' : [ + ], + 'numbers': [ (r'0[xX][a-fA-F0-9]+', Number.Hex), (r'0[bB][0-1]+', Number.Bin), (r'0[cC][0-7]+', Number.Oct), (r'([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)', Number.Float), (r'[0-9]+', Number.Integer), - ], - } + ], + } |