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

Correctly disambiguate / after async fuctions #10475

Merged
merged 3 commits into from Dec 2, 2019

Conversation

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Sep 21, 2019

Q                       A
Fixed Issues? Fixes #10410
Patch: Bug Fix? Yes
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT
@nicolo-ribaudo nicolo-ribaudo force-pushed the nicolo-ribaudo:issue-10410 branch from 24c2c48 to 99523fa Sep 21, 2019
@babel-bot

This comment has been minimized.

Copy link
Collaborator

babel-bot commented Sep 21, 2019

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/11705/

// It's easier and more efficient to adjust the context here.
throw new Error("Internal error");
}
this.state.context.push(tc.functionExpression);

This comment has been minimized.

Copy link
@JLHwung

JLHwung Sep 24, 2019

Contributor

It should be more efficient to check the last element of this.state.context and simply replace it with tc.functionExpression without push and pop.

@@ -19,6 +19,7 @@
// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser

import { types as tt, type TokenType } from "../tokenizer/types";
import { types as tc } from "../tokenizer/context";

This comment has been minimized.

Copy link
@JLHwung

JLHwung Sep 24, 2019

Contributor

nit: prefer ct to be consistent with naming in tokenizer.

nicolo-ribaudo and others added 2 commits Sep 24, 2019
Co-Authored-By: Huáng Jùnliàng <i@jhuang.me>
@nicolo-ribaudo nicolo-ribaudo merged commit 5440ae1 into babel:master Dec 2, 2019
5 checks passed
5 checks passed
Travis CI - Pull Request Build Passed
Details
babel/repl REPL preview is available
Details
buildsize No significant change
Details
ci/circleci Your tests passed on CircleCI!
Details
codecov/project 88.17% (target 80%)
Details
@nicolo-ribaudo nicolo-ribaudo deleted the nicolo-ribaudo:issue-10410 branch Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.