1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

lit/ShUtil.py: Deprecate '!' in shell expression. It is not sh-compatible.

llvm-svn: 173421
This commit is contained in:
NAKAMURA Takumi 2013-01-25 06:30:36 +00:00
parent 5050a667f4
commit c305122653

View File

@ -129,7 +129,7 @@ class ShLexer:
lex_one_token - Lex a single 'sh' token. """
c = self.eat()
if c in ';!':
if c == ';':
return (c,)
if c == '|':
if self.maybe_eat('|'):
@ -219,9 +219,6 @@ class ShParser:
def parse_pipeline(self):
negate = False
if self.look() == ('!',):
self.lex()
negate = True
commands = [self.parse_command()]
while self.look() == ('|',):
@ -317,10 +314,6 @@ class TestShParse(unittest.TestCase):
Command(['c'], [])],
False))
self.assertEqual(self.parse('! a'),
Pipeline([Command(['a'], [])],
True))
def test_list(self):
self.assertEqual(self.parse('a ; b'),
Seq(Pipeline([Command(['a'], [])], False),