Skip to content

Commit

Permalink
fix(pipe): use lefthand infix operator for pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
kollhof committed Feb 11, 2020
1 parent 48a4d6f commit bb22fb3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/lang/call/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import {
add_operator_like, symbol, add_non_binding
} from '@fink/prattler/symbols';

import {infix_right} from '../generic/infix';
import {infix} from '../generic/infix';
import {call} from './call';


const pipe = (op)=> infix_right(op, 'pipe');
const pipe = (op)=> infix(op, 'pipe');


export const add_call_operators = (ctx)=> (
Expand Down
12 changes: 6 additions & 6 deletions src/lang/call/pipe.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ describe('pipe: ... | ...', ()=> {
).toEqual({
type: 'pipe',
op: '|',
left: parse_expr(`foo`),
right: {
left: {
type: 'pipe',
op: '|',
left: parse_expr(' bar'),
right: parse_expr(' spam'),
left: parse_expr('foo'),
right: parse_expr(' bar'),
loc: {
start: {pos: 6, line: 1, column: 6},
end: {pos: 16, line: 1, column: 16}
start: {pos: 0, line: 1, column: 0},
end: {pos: 9, line: 1, column: 9}
}
},
right: parse_expr(` spam`),
loc: {
start: {pos: 0, line: 1, column: 0},
end: {pos: 16, line: 1, column: 16}
Expand Down

0 comments on commit bb22fb3

Please sign in to comment.