Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'jsonStrings' parser plugin does not increment line count #8865

Closed
loganfsmyth opened this issue Oct 11, 2018 · 6 comments · Fixed by #8866, JetBrains/ring-ui#482 or JetBrains/ring-ui#483 · May be fixed by sarhan-azizov/Babel#41 or sarhan-azizov/Babel#42
Labels
good first issue help wanted i: bug outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser

Comments

@loganfsmyth
Copy link
Member

Bug Report

I realized that #7985 should also have a ++this.state.curLine; in there along with the ++this.state.pos;, since otherwise the location information isn't quite right.

cc @jridgewell

@byronluk
Copy link
Contributor

Hi @loganfsmyth , is it okay if I work on this?

@loganfsmyth
Copy link
Member Author

Go for it! It should be adding that line and then deleting the tests so they regenerate when you re-run the tests.

@byronluk byronluk mentioned this issue Oct 12, 2018
@byronluk
Copy link
Contributor

@loganfsmyth Thank you for the opportunity to contribute! I regenerated the output.js file in the tests and there were no changes. Not sure if that's the intended behavior.

@loganfsmyth
Copy link
Member Author

Hmm, I'm not sure. I was expecting the test from https://github.com/babel/babel/pull/7985/files#diff-fc5abbbd6419713542e1e54abc6c31aaR55 to at least be on a new line.

@jridgewell
Copy link
Member

😳. Thanks for fixing @byronluk

@byronluk
Copy link
Contributor

byronluk commented Oct 12, 2018

I realized I needed to rebuild to apply my changes. Didn’t realize that it was necessary for updating the tests as well...

Anways, np! @jridgewell looking forward to contributing more in the future!

existentialism pushed a commit that referenced this issue Oct 12, 2018
mAAdhaTTah added a commit to valtech-nyc/babel that referenced this issue Nov 3, 2018
* master: (222 commits)
  Set correct methods name
  Use toPropertyKey in the "decorate" helper
  Allow function types in type params within arrow return types (babel#8954)
  Fix message when plugin of a wrong type is passed (babel#8950)
  rename colliding let bindings with for loop init (babel#8937)
  edge incomplete support for arrow destructuring (babel babel#8349) (babel#8926)
  fix single-arg async arrows when retainLines=true (babel#8868)
  [flow] Explicit inexact objects with `...` (babel#8884)
  Update preset-env data (babel#8898)
  Treat break inside block inside loop (babel#8914)
  fixed "source map" formatting in comment (babel#8878) [skip ci]
  fix typo in contributing guidelines (babel#8901) [skip ci]
  fix: Expression x === 'y' && '' should not evaluate to undefined. (babel#8880)
  fixed an extra word
  Fixes babel#8865 (babel#8866)
  v7.1.4
  v7.1.3
  Bump Babel deps (babel#8770)
  flow-bin@0.82.0 (babel#8832)
  Insertafter jsx fix (babel#8833)
  ...

# Conflicts:
#	packages/babel-parser/src/tokenizer/index.js
#	packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-numeric-literal/options.json
#	packages/babel-parser/test/fixtures/experimental/pipeline-operator/invalid-proposal/options.json
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jan 11, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.