We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While following seems to parse just fine:
foo && bar
However when I try to parse this:
foobar=$(foo && bar)
I get the following error:
bashlex.errors.ParsingError: unexpected token ')' (position 10)
The same goes for ||.
||
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/___/.local/lib/python3.11/site-packages/bashlex/parser.py", line 610, in parse parts = [p.parse()] ^^^^^^^^^ File "/home/___/.local/lib/python3.11/site-packages/bashlex/parser.py", line 691, in parse tree = theparser.parse(lexer=self.tok, context=self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/___/.local/lib/python3.11/site-packages/bashlex/yacc.py", line 439, in parse p.callable(pslice) File "/home/___/.local/lib/python3.11/site-packages/bashlex/parser.py", line 167, in p_simple_command_element p[0] = [_expandword(parserobj, p.slice[1])] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/___/.local/lib/python3.11/site-packages/bashlex/parser.py", line 145, in _expandword parts, expandedword = subst._expandwordinternal(parser, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/___/.local/lib/python3.11/site-packages/bashlex/subst.py", line 271, in _expandwordinternal node, sindex[0] = _paramexpand(parserobj, string, sindex[0]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/___/.local/lib/python3.11/site-packages/bashlex/subst.py", line 165, in _paramexpand return _extractcommandsubst(parserobj, string, zindex + 1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/___/.local/lib/python3.11/site-packages/bashlex/subst.py", line 55, in _extractcommandsubst node, si = _parsedolparen(parserobj, string, sindex) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/___/.local/lib/python3.11/site-packages/bashlex/subst.py", line 42, in _parsedolparen node, endp = _recursiveparse(parserobj, base, sindex, tokenizerargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/___/.local/lib/python3.11/site-packages/bashlex/subst.py", line 23, in _recursiveparse node = p.parse() ^^^^^^^^^ File "/home/___/.local/lib/python3.11/site-packages/bashlex/parser.py", line 691, in parse tree = theparser.parse(lexer=self.tok, context=self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/___/.local/lib/python3.11/site-packages/bashlex/yacc.py", line 537, in parse tok = self.errorfunc(errtoken) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/___/.local/lib/python3.11/site-packages/bashlex/parser.py", line 548, in p_error raise errors.ParsingError('unexpected token %r' % p.value, bashlex.errors.ParsingError: unexpected token ')' (position 10)
Hope this helps, thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
While following seems to parse just fine:
foo && bar
However when I try to parse this:
foobar=$(foo && bar)
I get the following error:
bashlex.errors.ParsingError: unexpected token ')' (position 10)
The same goes for
||
.Full Traceback
Hope this helps, thanks!
The text was updated successfully, but these errors were encountered: