From eff5b2e9b0a67757e950e180113f1357b253d2ee Mon Sep 17 00:00:00 2001 From: Dream Scatter <18372368+chakravala@users.noreply.github.com> Date: Wed, 3 Apr 2019 19:10:38 -0400 Subject: [PATCH 1/5] =?UTF-8?q?added=20=E2=8B=86=20as=20unary=20operator?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit as disccussed in [star is not an operator](https://discourse.julialang.org/t/is-not-an-operator/20221/17?u=chakravala) --- src/julia-parser.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/julia-parser.scm b/src/julia-parser.scm index 7c8a36d21f141..62536093661df 100644 --- a/src/julia-parser.scm +++ b/src/julia-parser.scm @@ -102,7 +102,7 @@ 0)) (define unary-ops (append! '(|<:| |>:|) - (add-dots '(+ - ! ~ ¬ √ ∛ ∜)))) + (add-dots '(+ - ! ~ ¬ √ ∛ ∜ ⋆)))) (define unary-op? (Set unary-ops)) From 5efcf0b93e8dc45f6dd664a0cc55cfcd8bdaa1e0 Mon Sep 17 00:00:00 2001 From: Dream Scatter <18372368+chakravala@users.noreply.github.com> Date: Wed, 3 Apr 2019 20:10:38 -0400 Subject: [PATCH 2/5] =?UTF-8?q?updated=20NEWS.md=20with=20=E2=8B=86=20([#3?= =?UTF-8?q?0577])?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index e7cf33f0b1c46..bccbe1b7e8955 100644 --- a/NEWS.md +++ b/NEWS.md @@ -32,6 +32,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 --------------------------- From 7c2fbf19e3575c071a7e4a7fbe1e5d03a1df1aee Mon Sep 17 00:00:00 2001 From: Michael Reed <18372368+chakravala@users.noreply.github.com> Date: Thu, 4 Apr 2019 14:42:52 -0400 Subject: [PATCH 3/5] =?UTF-8?q?added=20=E2=8B=86=20to=20unary-and-binary-o?= =?UTF-8?q?ps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/julia-parser.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/julia-parser.scm b/src/julia-parser.scm index 62536093661df..55ca94bc42036 100644 --- a/src/julia-parser.scm +++ b/src/julia-parser.scm @@ -107,7 +107,7 @@ (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)) From 9395215a75580506feb04aa696580f449f21f3dc Mon Sep 17 00:00:00 2001 From: Michael Reed <18372368+chakravala@users.noreply.github.com> Date: Thu, 4 Apr 2019 16:08:09 -0400 Subject: [PATCH 4/5] =?UTF-8?q?added=20.=E2=8B=86=20to=20unary-and-binary-?= =?UTF-8?q?ops?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/julia-parser.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/julia-parser.scm b/src/julia-parser.scm index 55ca94bc42036..a7faa8c567ea1 100644 --- a/src/julia-parser.scm +++ b/src/julia-parser.scm @@ -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)) From c56d0e60a0aedddeed40691fc8f5e2a233a7e260 Mon Sep 17 00:00:00 2001 From: Michael Reed <18372368+chakravala@users.noreply.github.com> Date: Fri, 5 Apr 2019 14:47:07 -0400 Subject: [PATCH 5/5] resolved the dot-star issue --- src/julia-parser.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/julia-parser.scm b/src/julia-parser.scm index a7faa8c567ea1..a8f35a54298b6 100644 --- a/src/julia-parser.scm +++ b/src/julia-parser.scm @@ -102,7 +102,7 @@ 0)) (define unary-ops (append! '(|<:| |>:|) - (add-dots '(+ - ! ~ ¬ √ ∛ ∜ ⋆ |⋆.|)))) + (add-dots '(+ - ! ~ ¬ √ ∛ ∜ ⋆)))) (define unary-op? (Set unary-ops))