Skip to content

Commit

Permalink
added ⋆ as unary operator (#31604)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dream Scatter authored and StefanKarpinski committed Apr 9, 2019
1 parent 4851ee3 commit 6e33c95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ is thrown, rather than a `ErrorException` ([#27900]).
* Functions that invoke commands (e.g. `run(::Cmd)`) now throw a `ProcessFailedException`
rather than an `ErrorException`, if those commands exit with non-zero exit code.
([#27900]).
* Added `` (`\star`) as unary operator ([#31604]).

Command-line option changes
---------------------------
Expand Down
4 changes: 2 additions & 2 deletions src/julia-parser.scm
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@
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 '(+ - $ & ~ |.+| |.-| |.⋆|))

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

Expand Down

0 comments on commit 6e33c95

Please sign in to comment.