Skip to content

Commit

Permalink
allow ± and ∓ as unary operators
Browse files Browse the repository at this point in the history
  • Loading branch information
simeonschaub committed Feb 2, 2020
1 parent 8a08400 commit 4b6d267
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/julia-parser.scm
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,13 @@
0))

(define unary-ops (append! '(|<:| |>:|)
(add-dots '(+ - ! ~ ¬ √ ∛ ∜ ⋆))))
(add-dots '(+ - ! ~ ¬ √ ∛ ∜ ⋆ ± ∓))))

(define unary-op? (Set unary-ops))

; operators that are both unary and binary
(define unary-and-binary-ops '(+ - $ & ~ ⋆ |.+| |.-| |.⋆|))
(define unary-and-binary-ops (append! '($ & ~)
(add-dots '(+ - ⋆ ± ∓))))

(define unary-and-binary-op? (Set unary-and-binary-ops))

Expand Down

0 comments on commit 4b6d267

Please sign in to comment.