Commits

Tim Hatch  committed 6083eb7

Remove inline-if syntax from robot lexer, restoring Python 2.4 compatibility.
Fixes #830

  • Participants
  • Parent commits 019c68d

Comments (0)

Files changed (1)

File pygments/lexers/_robotframeworklexer.py

     _pipe_splitter = re.compile('((?:^| +)\|(?: +|$))')
 
     def split(self, row):
-        splitter = self._split_from_spaces \
-                if not row.startswith('| ') else self._split_from_pipes
+        splitter = (row.startswith('| ') and self._split_from_pipes
+                    or self._split_from_spaces)
         for value in splitter(row.rstrip()):
             yield value
         yield '\n'
         self._in_arguments = False
 
     def _tokenize(self, value, index):
-        token = ARGUMENT if self._in_arguments else SYNTAX
+        token = self._in_arguments and ARGUMENT or SYNTAX
         if value.upper() in ('IN', 'IN RANGE'):
             self._in_arguments = True
         return token