Skip to content

Expected end of input #4

Open
Open
@TitanNano

Description

@TitanNano

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...

Activity

dat2

dat2 commented on Jul 30, 2018

@dat2
Owner

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

TitanNano commented on Jul 30, 2018

@TitanNano
Author

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

dat2

dat2 commented on Sep 29, 2018

@dat2
Owner

@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

TitanNano commented on Nov 11, 2018

@TitanNano
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @dat2@TitanNano

        Issue actions

          Expected end of input · Issue #4 · dat2/ecmascript