Skip to content

Commit

Permalink
remove operators: <- &> &>> &< &<<
Browse files Browse the repository at this point in the history
add operators: <| |>
closes #3270
  • Loading branch information
JeffBezanson committed Jun 5, 2013
1 parent 627d1cc commit 7203173
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
4 changes: 0 additions & 4 deletions base/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,6 @@ export
#.>>,
#.<<,
>>>,
#&>,
#&>>,
#&<,
#&<<,
\,
^,
|,
Expand Down
12 changes: 5 additions & 7 deletions base/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ macro vectorize_2arg(S,f)
end

# some operators not defined yet
global //, .>>, .<<, &>, &>>, &<, &<<
global //, .>>, .<<, >:, <|, |>

module Operators

Expand Down Expand Up @@ -264,6 +264,7 @@ export
//,
<,
<:,
>:,
<<,
<=,
==,
Expand All @@ -273,21 +274,18 @@ export
.>>,
.<<,
>>>,
&>,
&>>,
&<,
&<<,
\,
^,
|,
|>,
<|,
~

import
Base.!, Base.!=, Base.$, Base.%, Base.&, Base.*, Base.+, Base.-, Base..!=,
Base..+, Base..-, Base..*, Base../, Base..<, Base..<=, Base..==, Base..>,
Base..>=, Base..\, Base..^, Base./, Base.//, Base.<, Base.<:, Base.<<,
Base.<=, Base.==, Base.>, Base.>=, Base.>>, Base..>>, Base..<<, Base.>>>,
Base.&>, Base.&>>, Base.&<, Base.&<<, Base.\, Base.^, Base.|, Base.~,
Base.!==
Base.<|, Base.|>, Base.\, Base.^, Base.|, Base.~, Base.!==, Base.>:

end
6 changes: 3 additions & 3 deletions src/julia-parser.scm
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
; note: there are some strange-looking things in here because
; the way the lexer works, every prefix of an operator must also
; be an operator.
(<- -- -->)
(> < >= <= == === != !== |.>| |.<| |.>=| |.<=| |.==| |.!=| |.=| |.!| |<:| |>:| |&>| |&<|)
(-- -->)
(> < >= <= == === != !== |.>| |.<| |.>=| |.<=| |.==| |.!=| |.=| |.!| |<:| |>:| |\|>| |<\||)
(: |..|)
(+ - |.+| |.-| |\|| $)
(<< >> >>> |.<<| |.>>| |&>>| |&<<|)
(<< >> >>> |.<<| |.>>|)
(* / |./| % & |.*| |\\| |.\\|)
(// .//)
(^ |.^|)
Expand Down

0 comments on commit 7203173

Please sign in to comment.