Skip to content
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

Implemented parser.rs (Semi-fixes #161) #217

Closed
wants to merge 2 commits into from
Closed

Implemented parser.rs (Semi-fixes #161) #217

wants to merge 2 commits into from

Conversation

jD91mZM2
Copy link

@jD91mZM2 jD91mZM2 commented Aug 18, 2017

This parser isn't yet hooked up to anything.
It also isn't fully compatible with bash.

It is - however - pretty damn similar.
All the tests are confirmed working, A.K.A.

echo "\"HELLO\", WORLD"lol $TEST. ${LOL!}lol
cat < in > out
echo '<'

All of these work as you'd expect them to.

note: The first one says ${LOL!}lol, which converts to Token::Env("LOL!"), Token::Text("lol").
This isn't actually how bash would do it probably, since that doesn't actually allow non-[a-zA-Z0-9] characters even if you specify them inside { and }. This one does.

note 2: This does not throw any errors (yet). Unquoted strings aren't handled. That could easily be done though, if you let me know how you want to handle them.

@jD91mZM2
Copy link
Author

jD91mZM2 commented Aug 18, 2017

Because GitHub didn't recognize #161 in the title, I'm just going to mention it here so that issue gets a "mentioned in #217" automatic message.

EDIT: There we go
image

@casey
Copy link
Owner

casey commented Aug 18, 2017

Thanks for this! But closing, since the sh dependency will need to be replaced by something with the same features.

@casey casey closed this Aug 18, 2017
@jD91mZM2
Copy link
Author

I thought the pull request could be expanded over-time... Whatever

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants