@@ -326,7 +326,7 @@ function _to_expr(node::SyntaxNode; iteration_spec=false, need_linenodes=true,
326
326
args[1 ] = Expr (headsym, args[1 ]. args... )
327
327
headsym = :const
328
328
end
329
- elseif headsym == Symbol (" />" ) || headsym == Symbol (" \\ >" )
329
+ elseif headsym == Symbol (" />" ) || headsym == Symbol (" /> >" )
330
330
callex = only (args)
331
331
@assert Meta. isexpr (callex, :call )
332
332
args = callex. args
@@ -350,7 +350,7 @@ function _to_expr(node::SyntaxNode; iteration_spec=false, need_linenodes=true,
350
350
return Expr (:call , func, args... )
351
351
end
352
352
elseif headsym == :chain
353
- if kind (node_args[1 ]) in KSet " /> \ >"
353
+ if kind (node_args[1 ]) in KSet " /> /> >"
354
354
return Expr (:call , :(JuliaSyntax. compose_chain), args... )
355
355
else
356
356
return Expr (:call , :(JuliaSyntax. chain), args... )
@@ -360,7 +360,7 @@ function _to_expr(node::SyntaxNode; iteration_spec=false, need_linenodes=true,
360
360
end
361
361
362
362
# -------------------------------------------------------------------------------
363
- # Targets for lowering /> and \ > syntax
363
+ # Targets for lowering /> and /> > syntax
364
364
365
365
# For use with />
366
366
struct FixButFirst{F,Args,Kws}
@@ -376,7 +376,7 @@ Fix all arguments except for the first
376
376
"""
377
377
fixbutfirst (f, args... ; kws... ) = FixButFirst (f, args, kws)
378
378
379
- # For use with \ >
379
+ # For use with /> >
380
380
struct FixButLast{F,Args,Kws}
381
381
f:: F
382
382
args:: Args
@@ -394,7 +394,7 @@ chain(x, f, fs...) = chain(f(x), fs...)
394
394
chain (x) = x
395
395
396
396
# An example of how chain() can be used to rewrite
397
- # `x \> map(f) \ > reduce(g)` into `mapreduce(f, g, x)`
397
+ # `x />> map(f) /> > reduce(g)` into `mapreduce(f, g, x)`
398
398
function chain (x, f1:: FixButLast{typeof(map)} , f2:: FixButLast{typeof(reduce)} , fs... )
399
399
chain (x, fixbutlast (mapreduce, f1. args... , f2. args... ; f1. kwargs... , f2. kwargs... ), fs... )
400
400
end
0 commit comments