Skip to content

Commit

Permalink
lit/ShUtil.py: Deprecate '!' in shell expression. It is not sh-compat…
Browse files Browse the repository at this point in the history
…ible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173421 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
chapuni committed Jan 25, 2013
1 parent bfb8223 commit 52d4de9
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions utils/lit/lit/ShUtil.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def lex_one_token(self):
lex_one_token - Lex a single 'sh' token. """

c = self.eat()
if c in ';!':
if c == ';':
return (c,)
if c == '|':
if self.maybe_eat('|'):
Expand Down Expand Up @@ -219,9 +219,6 @@ def parse_command(self):

def parse_pipeline(self):
negate = False
if self.look() == ('!',):
self.lex()
negate = True

commands = [self.parse_command()]
while self.look() == ('|',):
Expand Down Expand Up @@ -317,10 +314,6 @@ def test_pipeline(self):
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),
Expand Down

0 comments on commit 52d4de9

Please sign in to comment.