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

[WIP] Slightly better error messages #150

Merged
merged 2 commits into from
Oct 12, 2016
Merged

[WIP] Slightly better error messages #150

merged 2 commits into from
Oct 12, 2016

Conversation

danez
Copy link
Member

@danez danez commented Sep 29, 2016

Instead of Unexpected token we now print Unexpected token, expected <type.label> in the cases where we have the information. (see test failures for examples)

I did not yet fix the tests, wanted to hear first what you think about that. It is not that big of an improvement but maybe better than what was there before.

@danharper
Copy link
Member

👍 I'd like to see this.

danez and others added 2 commits October 10, 2016 21:23
Instead of "Unexpected token" we now print
"Unexpected token, expected <type.label>"
@codecov-io
Copy link

codecov-io commented Oct 10, 2016

Current coverage is 94.50% (diff: 100%)

Merging #150 into master will increase coverage by 0.03%

@@             master       #150   diff @@
==========================================
  Files            19         19          
  Lines          3132       3132          
  Methods         328        328          
  Messages          0          0          
  Branches        826        826          
==========================================
+ Hits           2959       2960     +1   
  Misses           94         94          
+ Partials         79         78     -1   

Powered by Codecov. Last update 7dd45f7...e2dd128

@hzoo
Copy link
Member

hzoo commented Oct 12, 2016

Got a timeout error and one of the dependencies is failing node 0.12 for some reason but we can still merge

@hzoo hzoo merged commit d4d6d05 into babel:master Oct 12, 2016
@danez danez deleted the errors branch October 12, 2016 14:44
motiz88 added a commit to motiz88/babylon that referenced this pull request Oct 14, 2016
Expanding on babel#150, this allows `unexpected()` to accept the expected token type instead of a message string.
This overload is then used in a couple more places (that independently implement a logic similar to `expect()`'s) to construct an `Unexpected token, expected FOO` message.
hzoo pushed a commit that referenced this pull request Oct 14, 2016
Expanding on #150, this allows `unexpected()` to accept the expected token type instead of a message string.
This overload is then used in a couple more places (that independently implement a logic similar to `expect()`'s) to construct an `Unexpected token, expected FOO` message.
kristofdegrave pushed a commit to kristofdegrave/babylon that referenced this pull request Oct 27, 2016
* Slightly better errors

Instead of "Unexpected token" we now print
"Unexpected token, expected <type.label>"
kristofdegrave pushed a commit to kristofdegrave/babylon that referenced this pull request Oct 27, 2016
Expanding on babel#150, this allows `unexpected()` to accept the expected token type instead of a message string.
This overload is then used in a couple more places (that independently implement a logic similar to `expect()`'s) to construct an `Unexpected token, expected FOO` message.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants