forked from babel/babel
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove navigation for PipelineBody node
The parser no longer produces a PipelineBody node
- Loading branch information
1 parent
6ac6faf
commit 523e18c
Showing
2 changed files
with
19 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 17 additions & 12 deletions
29
...-plugin-proposal-pipeline-operator/test/fixtures/fsharp/arrow-functions-parenless/exec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,34 @@ | ||
const y = 2; | ||
// parenthised until parser is fixed | ||
|
||
const f = (x) => (x | ||
|> (y) => y + 1) | ||
|> (z) => z * y | ||
|
||
const _f = (x) => x | ||
|> (y) => y + 1 | ||
|> (z) => z * y | ||
|
||
const g = (x) => x | ||
|> (y => { return ( | ||
|> (y) => ( | ||
y + 1 | ||
|> (z) => z * y); | ||
} | ||
|> (z) => z * y | ||
) | ||
|
||
const h = (x) => x | ||
const _g = (x) => x | ||
|> (y => ( | ||
y + 1 | ||
|> (z) => z * y) | ||
) | ||
|
||
const i = (x) => x | ||
|> (y) => ( | ||
const __g = (x) => x | ||
|> (y => { return ( | ||
y + 1 | ||
|> (z) => z * y | ||
|> (z) => z * y); | ||
} | ||
) | ||
|
||
expect(f(1)).toBe(4); | ||
expect(g(1)).toBe(2); | ||
expect(h(1)).toBe(2); | ||
expect(i(1)).toBe(2); | ||
expect( f(1)).toBe(4); | ||
expect( _f(1)).toBe(4); | ||
expect( g(1)).toBe(2); | ||
expect( _g(1)).toBe(2); | ||
expect(__g(1)).toBe(2); |