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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: #{ token in Record don't have correct location info & value #13417

Closed
1 task
fisker opened this issue Jun 3, 2021 · 2 comments 路 Fixed by #13418
Closed
1 task

[Bug]: #{ token in Record don't have correct location info & value #13417

fisker opened this issue Jun 3, 2021 · 2 comments 路 Fixed by #13418
Labels
i: bug outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser Spec: Record Tuple

Comments

@fisker
Copy link
Contributor

fisker commented Jun 3, 2021

馃捇

  • Would you like to work on a fix?

How are you using Babel?

Programmatic API (babel.transform, babel.parse)

Input code

require('@babel/parser').parse('#{}', {plugins:[['recordAndTuple',{syntaxType: 'hash'}]], tokens: true}).tokens[0]
Token {
  type: TokenType {
    label: '#{',
    keyword: undefined,
    beforeExpr: true,
    startsExpr: true,
    isLoop: false,
    isAssign: false,
    prefix: false,
    postfix: false,
    binop: null,
    updateContext: [Function]
  },
  value: undefined,  // <- 
  start: 0,  // <- 
  end: 0,  // <- 
  loc: SourceLocation {
    start: Position { line: 1, column: 0 },  // <- 
    end: Position { line: 1, column: 0 },  // <- 
    filename: undefined,
    identifierName: undefined
  }
}

Configuration file name

No response

Configuration

N/A

Current and expected behavior

Should has correct location info.

Environment

I don't think it's needed.

Possible solution

No response

Additional context

No response

@babel-bot
Copy link
Collaborator

Hey @fisker! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."

@fisker
Copy link
Contributor Author

fisker commented Jun 3, 2021

value is missing too.

@fisker fisker changed the title [Bug]: #{ token in Record don't have correct location info [Bug]: #{ token in Record don't have correct location info & value Jun 3, 2021
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Sep 8, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: bug outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser Spec: Record Tuple
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants