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

Expected end of input #4

Open
TitanNano opened this issue Jul 29, 2018 · 4 comments
Open

Expected end of input #4

TitanNano opened this issue Jul 29, 2018 · 4 comments

Comments

@TitanNano
Copy link

What ever I'm trying to parse, I'm getting:

Parse error at line: 1, column: 1
Unexpected `c`
Expected `end of input`

where c is the first character in the content.

I simply copied the example to get started...

@dat2
Copy link
Owner

dat2 commented Jul 30, 2018

Hi! Thanks for using my project! I took a “documentation first” approach and the documentation is slightly ahead of the actual code 😅.

I am working on a PR (see #1) to implement all expressions, and remove the statements so that I can make them in another PR, but I flip flopped a bit on the AST format and unit testing / integration testing and that’s why it’s been open for so long 😞.

Unfortunately due to the huge scope of the ecmascript language it will be a while before the full language is supported! I will merge in this PR with some documentation (in a couple days hopefully) on what language features are currently supported to unblock you though!

@TitanNano
Copy link
Author

@dat2 I understand, in this case I will just wait a little until your project is ready to be tried out.

@dat2
Copy link
Owner

dat2 commented Sep 29, 2018

@TitanNano I just published a new version of the library on crates.io! The parser doesn't cover the entire language yet and probably will still have confusing error messages like these, but you should be able to get quite a few expressions parsed!

@TitanNano
Copy link
Author

yes var declarations work now, I was able to test that. for property access I now get a new error.

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseFloatError { kind: Invalid }', libcore/result.rs:1009:5
var object = { test: 2, value: 'ab' }; object.test;

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

No branches or pull requests

2 participants