summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-01-10 10:27:56 +0100
committerGeorg Brandl <georg@python.org>2014-01-10 10:27:56 +0100
commit78a68fd6a9610a91ea21ededef1eaac3499edbb1 (patch)
tree54de9b8b9ab858682314b4437218367f0be8e45b
parentf60dfb674795e7ae28172862d3be80a74415d525 (diff)
downloadpygments-78a68fd6a9610a91ea21ededef1eaac3499edbb1.tar.gz
eiffel: add to changelog, minor cleanup
-rw-r--r--AUTHORS2
-rw-r--r--CHANGES1
-rw-r--r--pygments/lexers/compiled.py16
3 files changed, 12 insertions, 7 deletions
diff --git a/AUTHORS b/AUTHORS
index 8bd0c3b2..ffae0944 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -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!
diff --git a/CHANGES b/CHANGES
index be8ec587..da842773 100644
--- a/CHANGES
+++ b/CHANGES
@@ -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),
- ],
- }
+ ],
+ }