diff options
author | Doug <pyos100500@gmail.com> | 2012-11-06 23:04:43 +0400 |
---|---|---|
committer | Doug <pyos100500@gmail.com> | 2012-11-06 23:04:43 +0400 |
commit | 81404c17958310b626cfa335a6ba22b261b317f4 (patch) | |
tree | b15bf7681180697d7dbd054ca85e6ed9b3f04778 | |
parent | 08236e153c506b9e5dbeec0e12f7545a3147cd04 (diff) | |
download | pygments-81404c17958310b626cfa335a6ba22b261b317f4.tar.gz |
Remove `unless` keyword from dg lexer.
-rw-r--r-- | pygments/lexers/agile.py | 2 | ||||
-rw-r--r-- | tests/examplefiles/inet_pton6.dg | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pygments/lexers/agile.py b/pygments/lexers/agile.py index 4143bf68..a9a2f46e 100644 --- a/pygments/lexers/agile.py +++ b/pygments/lexers/agile.py @@ -1848,7 +1848,7 @@ class DgLexer(RegexLexer): # Operators (r"`\w+'*`", Operator), # Infix links # Reserved infix links - (r'\b(or|and|if|unless|else|where|is|in)\b', Operator.Word), + (r'\b(or|and|if|else|where|is|in)\b', Operator.Word), (r'[!$%&*+\--/:<-@\\^|~;,]+', Operator), # Identifiers # Python 3 types diff --git a/tests/examplefiles/inet_pton6.dg b/tests/examplefiles/inet_pton6.dg index c56a66a3..4104b3e7 100644 --- a/tests/examplefiles/inet_pton6.dg +++ b/tests/examplefiles/inet_pton6.dg @@ -39,7 +39,7 @@ unhex = q -> q and map p -> (int p 16) (q.split ':') # :return: an integer which, written in binary form, points to the same node. # inet_pton6 = address -> - raise $ ValueError 'not a valid IPv6 address' unless match = addrv6.match address + raise $ ValueError 'not a valid IPv6 address' if not (match = addrv6.match address) start, end, *ipv4 = match.groups! is_ipv4 = not $ None in ipv4 @@ -47,7 +47,7 @@ inet_pton6 = address -> raise $ ValueError 'not a valid IPv6 address' if (end is None and shift) or shift < 0 hexaddr = (base_n 0x10000 (unhex start) << shift) + base_n 0x10000 (unhex $ end or '') - hexaddr unless is_ipv4 else (hexaddr << 32) + base_n 0x100 (map int ipv4) + (hexaddr << 32) + base_n 0x100 (map int ipv4) if is_ipv4 else hexaddr inet6_type = q -> switch |