Skip to content

Commit

Permalink
Remove pipeCall
Browse files Browse the repository at this point in the history
  • Loading branch information
wcjohnson committed Oct 7, 2017
1 parent 15b9b13 commit 1a4cade
Show file tree
Hide file tree
Showing 15 changed files with 0 additions and 719 deletions.
14 changes: 0 additions & 14 deletions src/parser/expression.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,12 +379,6 @@ pp.parseExprSubscripts = function (refShorthandDefaultPos) {
};

pp.parseSubscripts = function (base, startPos, startLoc, noCalls) {

// pipeCall plugin hack: pass noPipes via state to avoid changing args
// to core parser function.
const noPipes = this.state.noPipeSubscripts;
this.state.noPipeSubscripts = false;

for (;;) {
if (this.hasPlugin("lightscript") && this.crossesWhiteBlockBoundary()) {
return base;
Expand Down Expand Up @@ -482,14 +476,6 @@ pp.parseSubscripts = function (base, startPos, startLoc, noCalls) {
node.callee = base;
const next = this.parseBangCall(node, "CallExpression");
if (next) base = next; else return node;
} else if (
!noCalls &&
!noPipes &&
this.hasPlugin("pipeCall") &&
this.match(tt.pipeCall)
) {
const node = this.startNodeAt(startPos, startLoc);
base = this.parsePipeCall(node, base);
} else if (!(this.hasPlugin("lightscript") && this.isNonIndentedBreakFrom(startPos)) && this.eat(tt.bracketL)) {
const node = this.startNodeAt(startPos, startLoc);
node.object = base;
Expand Down
50 changes: 0 additions & 50 deletions src/plugins/pipeCall.js

This file was deleted.

4 changes: 0 additions & 4 deletions src/registerPlugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import bangCallPlugin from "./plugins/bangCall";
import significantWhitespacePlugin from "./plugins/significantWhitespace";
import splatComprehensionPlugin from "./plugins/splatComprehension";
import syntacticPlaceholderPlugin from "./plugins/syntacticPlaceholder";
import pipeCallPlugin from "./plugins/pipeCall";
import { matchCoreSyntax, match } from "./plugins/match";

function noncePlugin() {}
Expand Down Expand Up @@ -88,9 +87,6 @@ export default function registerPlugins(plugins, metadata) {
// as PlaceholderExpressions.
registerPlugin("syntacticPlaceholder", syntacticPlaceholderPlugin);

// |> infix operator for piped function calls
registerPlugin("pipeCall", pipeCallPlugin);

registerPlugin("whiteblockOnly", noncePlugin, {
dependencies: ["lightscript"]
});
Expand Down
9 changes: 0 additions & 9 deletions src/tokenizer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,6 @@ export default class Tokenizer {
if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2);
if (next === 61) return this.finishOp(tt.assign, 2);
if (code === 124 && next === 125 && this.hasPlugin("flow")) return this.finishOp(tt.braceBarR, 2);
if (code === 124 && next === 62 && this.hasPlugin("pipeCall")) {
this.state.pos += 2;
return this.finishToken(tt.pipeCall, "|>");
}
return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1);
}

Expand Down Expand Up @@ -456,11 +452,6 @@ export default class Tokenizer {
size = 2;
}

if (code === 60 && next === 124 && this.hasPlugin("pipeCall")) {
this.state.pos += 2;
return this.finishToken(tt.pipeCall, "<|");
}

return this.finishOp(tt.relational, size);
}

Expand Down
1 change: 0 additions & 1 deletion test/fixtures/pipe-call/basic/arrow/actual.js

This file was deleted.

137 changes: 0 additions & 137 deletions test/fixtures/pipe-call/basic/arrow/expected.json

This file was deleted.

1 change: 0 additions & 1 deletion test/fixtures/pipe-call/basic/associativity/actual.js

This file was deleted.

130 changes: 0 additions & 130 deletions test/fixtures/pipe-call/basic/associativity/expected.json

This file was deleted.

1 change: 0 additions & 1 deletion test/fixtures/pipe-call/basic/pipe/actual.js

This file was deleted.

Loading

0 comments on commit 1a4cade

Please sign in to comment.