Permalink
Browse files
Remove the dependency on collections.deque().
This makes the OVM binary smaller. There was no good reason for using
it in the first place!
- Loading branch information...
Showing
with
3 additions
and
8 deletions.
-
+3
−8
osh/cmd_parse.py
|
|
@@ -10,7 +10,6 @@ |
|
|
cmd_parse.py - Parse high level shell commands.
|
|
|
"""
|
|
|
|
|
|
import collections
|
|
|
import sys
|
|
|
|
|
|
from core import braces
|
|
|
@@ -53,7 +52,7 @@ def Reset(self): |
|
|
self.c_kind = Kind.Undefined
|
|
|
self.c_id = Id.Undefined_Tok
|
|
|
|
|
|
self.pending_here_docs = collections.deque()
|
|
|
self.pending_here_docs = []
|
|
|
|
|
|
def Error(self):
|
|
|
return self.error_stack
|
|
|
@@ -75,12 +74,7 @@ def GetCompletionState(self): |
|
|
return self.completion_stack
|
|
|
|
|
|
def _MaybeReadHereDocs(self):
|
|
|
while True:
|
|
|
try:
|
|
|
h = self.pending_here_docs.popleft()
|
|
|
except IndexError:
|
|
|
break
|
|
|
|
|
|
for h in self.pending_here_docs:
|
|
|
lines = []
|
|
|
#log('HERE %r' % h.here_end)
|
|
|
while True:
|
|
|
@@ -133,6 +127,7 @@ def _MaybeReadHereDocs(self): |
|
|
h.body = ast.CompoundWord(parts)
|
|
|
h.was_filled = True
|
|
|
|
|
|
self.pending_here_docs = [] # no .clear() until Python 3.3
|
|
|
#print('')
|
|
|
#print('--> FILLED', here_docs)
|
|
|
#print('')
|
|
|
|
0 comments on commit
189d87b