Permalink
Browse files

Handle parsing failure in _ReadVarOpArg (#100) (#101)

  • Loading branch information...
Yorwba authored and andychu committed May 5, 2018
1 parent d9bebcd commit 2ec7302e001263412e355be968d0acf18ac70872
Showing with 3 additions and 0 deletions.
  1. +3 −0 osh/word_parse.py
View
@@ -145,6 +145,9 @@ def _ReadVarOpArg(self, arg_lex_mode, eof_type=Id.Undefined_Tok,
w = self._ReadCompoundWord(
lex_mode=arg_lex_mode, eof_type=eof_type, empty_ok=empty_ok)
if not w:
return None
# This is for "${s:-}", ${s/a//}, etc. It is analogous to
# LooksLikeAssignment where we turn x= into x=''. It has the same
# potential problem of not having spids.

0 comments on commit 2ec7302

Please sign in to comment.