Skip to content

Commit

Permalink
chore(rename): 'apply' -> 'applyFunction'
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Oct 29, 2019
1 parent 69294a9 commit 8915dc3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function plugin(options, Parser) {
args.push(this.parseExpression());
this.expect(tt.bracketR);
} else if (this.eat(tt.parenL)) {
// x ~. (y, z) := HandledPromise.apply(base, [y, z])
// x ~. (y, z) := HandledPromise.applyFunction(base, [y, z])
// No argument other than base.
eatenParenL = true;
} else {
Expand All @@ -67,8 +67,8 @@ function plugin(options, Parser) {

if (eatenParenL || this.eat(tt.parenL)) {
// x ~. [i](y, z) := HandledPromise.applyMethod(base, i, [y, z])
// x ~. (y, z) := HandledPromise.apply(base, [y, z]);
method = eatenParenL ? 'apply' : 'applyMethod';
// x ~. (y, z) := HandledPromise.applyFunction(base, [y, z]);
method = eatenParenL ? 'applyFunction' : 'applyMethod';
// The rest of the arguments are in parens.
let expr = this.startNode();
expr.elements = this.parseCallExpressionArguments(tt.parenR, false);
Expand Down

0 comments on commit 8915dc3

Please sign in to comment.