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

[WIP] Slightly better error messages #150

Merged
merged 2 commits into from Oct 12, 2016

Conversation

Projects
None yet
4 participants
@danez
Copy link
Member

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

This comment has been minimized.

Copy link
Member

danharper commented Oct 10, 2016

👍 I'd like to see this.

Daniel Tschinder and others added some commits Sep 29, 2016

Slightly better errors
Instead of "Unexpected token" we now print
"Unexpected token, expected <type.label>"

@danez danez force-pushed the danez:errors branch from 1e4afa4 to e2dd128 Oct 10, 2016

@codecov-io

This comment has been minimized.

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

This comment has been minimized.

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

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
codecov/patch 100% of diff hit (target 94.47%)
Details
codecov/project 94.50% (+0.03%) compared to 7dd45f7
Details

@danez danez deleted the danez:errors branch Oct 12, 2016

motiz88 added a commit to motiz88/babylon that referenced this pull request Oct 14, 2016

Annotate more errors with expected token
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 added a commit that referenced this pull request Oct 14, 2016

Annotate more errors with expected token (#172)
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 error messages (babel#150)
* 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

Annotate more errors with expected token (babel#172)
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.