-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
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
Error in double-quoting.js when handling quoted )
and $
characters
#58
Comments
Hey @parro-it, I'm currently working on a fix for this issue and hope to get a PR in today. FYI, I've resolved the "build failures" due to |
As far as the issue goes that causes Changing: to: Resolves the issue |
With the above change in place, and using the following script:
I get the following error:
The issue here exists in tokens.js line 80 in the I added the following dirty patch to see if I can continue debugging the issue:
This isn't ideal - just a way to contiue moving towards the issue. When I re-run the example with this "patch" I get the following error:
I uncommented the
command was being seen as, and I get this:
So for some reason, the command is being truncated where the I'm starting to think all of this happens within the |
Hi there, |
Hey, awesome job on
bash-parser
. I'm finding this extremely useful in my own work.I've run into an issue when parsing
)
and$
characters in quoted strings. Let me give an example to help explain.Consider the following line:
This line is a part of a larger, more complex bash script I'm analyzing. There are actually two (2) issues here.
$
causes an error.)
causes an error.Removing the
$
leads the parser to believe the)
at column 55 is the closing parentheses rather than a string literal.Both issues boil down to line 50 in
double-quoting.js
, wherereducers
is undefined.I understand this is a strange case since the issue here exists in parsing a string pattern. I'm honestly not too sure how to go about addressing this yet. If I come up with anything I'll make sure to comment here. Also, if you have any ideas please share them, I'd be happy to work on a fix as soon as I think of the best way to handle these cases.
The text was updated successfully, but these errors were encountered: