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

Parsing multiple sexprs? #2

Closed
atg opened this issue Oct 23, 2015 · 2 comments
Closed

Parsing multiple sexprs? #2

atg opened this issue Oct 23, 2015 · 2 comments

Comments

@atg
Copy link

atg commented Oct 23, 2015

I may just be an idiot, but how does one parse multiple sexprs in the same input?

parse("(foo) (bar)")

throws a parse exception SyntaxError: Expected comment, end of input or whitespace but "(" found.

...OK so I looked up how eslisp solves this and it does

"(" + input + "\n)"

which is cute, but now all the offsets are off by one!

@anko
Copy link
Owner

anko commented Oct 25, 2015

This is a historical artefact from fwg/s-expression#5 being rejected.
(s-expr-plus is a fork of fwg/s-expression.)

I agree with you. S-expressions are usually used for code, where it's implicit that multiple of them might be present, so returning an array would make sense.

@anko
Copy link
Owner

anko commented Nov 23, 2015

In v7.0.0.

I'll update eslisp to use it soon, to fix the offset thing hackiness you point out.

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

No branches or pull requests

2 participants