This repository has been archived by the owner. It is now read-only.

Improve parsing error message (T6710) #119

Closed
hzoo opened this Issue Sep 10, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@hzoo
Copy link
Member

hzoo commented Sep 10, 2016

Issue originally made by @markelog

Ref babel/babel#3774

Input code

require("babylon").parse("2++");

Description

Will throw a error -

"SyntaxError: Assigning to rvalue (1:0)"

Which is pretty cryptic, parsers like esprima, or any other JS engine will show more meaningful message - "Invalid left-hand side expression in postfix operation"

@hzoo

This comment has been minimized.

Copy link
Member Author

hzoo commented Sep 10, 2016

Moving to #119

@hzoo hzoo closed this Sep 10, 2016

@markelog

This comment has been minimized.

Copy link

markelog commented Sep 10, 2016

Moved where?

@hzoo

This comment has been minimized.

Copy link
Member Author

hzoo commented Sep 10, 2016

.. sigh closed this one!

Fixed with #123

@hzoo hzoo reopened this Sep 10, 2016

@hzoo hzoo added the help wanted label Sep 12, 2016

hzoo added a commit that referenced this issue Sep 22, 2016

Rephrase "assigning/binding to rvalue" errors to include context (#119)…
… (#123)

* Rephrase "assigning/binding to rvalue" error messages with context (#119)

* Fix code style in parser/lval.js

* istanbul ignore some unused branches in parser/lval.js

* Fix code style again in parser/lval.js

@hzoo hzoo closed this Sep 22, 2016

@markelog

This comment has been minimized.

Copy link

markelog commented Sep 23, 2016

Yey!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.