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
fix(parser): correctly parse record and tuple tokens #13418
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/46719/ |
I noted that we don't have token specific fixtures, should we add those? constructor(state: State) {
this.type = state.type;
if (state.value !== undefined) {
this.value = state.value;
}
this.start = state.start;
this.end = state.end;
this.loc = new SourceLocation(state.startLoc, state.endLoc);
} but no tests are throwing, since they are not writing |
Thanks for the quick fix, have you checked |
@fedeci You can add a new |
We need similar fix for |
That token constructor code is super slow :) Why there is a need for a |
packages/babel-parser/test/fixtures/tokens/record-and-tuple/brace-bar/output.json
Outdated
Show resolved
Hide resolved
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 3d15e07:
|
#{
and #[
@JLHwung No plans to fix the performance issues? |
@KFlash I am aware of the performance issue here, but fixing the performance falls out of the scope of this PR and thus should be addressed in another PR. |
#{
and#[
tokens now hold the correct location.|]
and|}
are now finished as tokens and not operators.