Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Improve parsing error message (T6710) #119

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

Improve parsing error message (T6710) #119

hzoo opened this issue Sep 10, 2016 · 4 comments

Comments

@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
Copy link
Member Author

hzoo commented Sep 10, 2016

Moving to #119

@hzoo hzoo closed this as completed Sep 10, 2016
@markelog
Copy link

Moved where?

@hzoo
Copy link
Member Author

hzoo commented Sep 10, 2016

.. sigh closed this one!

Fixed with #123

@hzoo hzoo reopened this Sep 10, 2016
hzoo pushed a commit that referenced this issue Sep 22, 2016
… (#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 as completed Sep 22, 2016
@markelog
Copy link

Yey!

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

No branches or pull requests

3 participants