Permalink
Browse files

Fix unhandled exception in interactive loop.

test/osh-usage.sh all-passing caught this.
  • Loading branch information...
Andy Chu
Andy Chu committed Aug 30, 2018
1 parent b7d44e5 commit 356ad17b9ec9c6add74bc035897b8565554165d9
Showing with 4 additions and 4 deletions.
  1. +3 −0 core/lexer.py
  2. +1 −4 osh/cmd_parse.py
View
@@ -147,6 +147,9 @@ def __init__(self, line_lexer, line_reader):
self.line_id = -1 # Invalid one
self.translation_stack = []
def ResetInputObjects(self):
self.line_lexer.Reset('', -1, 0)
def MaybeUnreadOne(self):
return self.line_lexer.MaybeUnreadOne()
View
@@ -153,10 +153,7 @@ def ResetInputObjects(self):
"""
# All the stuff we read from
self.w_parser.Reset()
#self.lexer.Reset()
# TODO: This should be a method on Lexer. But I'm not sure if we want to
# reuse objects at all.
self.lexer.line_lexer.Reset('', -1)
self.lexer.ResetInputObjects()
self.line_reader.Reset()
def Error(self):

0 comments on commit 356ad17

Please sign in to comment.