Commits

pyos committed 82304fd

Remove `unless` keyword from dg lexer.

  • Participants
  • Parent commits 296bcef

Comments (0)

Files changed (2)

pygments/lexers/agile.py

             #  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

tests/examplefiles/inet_pton6.dg

 # :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
 
   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