diff --git a/NEWS.md b/NEWS.md index 94d8d1f56be72..4c93092182818 100644 --- a/NEWS.md +++ b/NEWS.md @@ -112,6 +112,9 @@ This section lists changes that do not have deprecation warnings. * In macro calls with parentheses, e.g. `@m(a=1)`, assignments are now parsed as `=` expressions, instead of as `kw` expressions. ([#7669]) + * When used as an infix operator, `~` is now parsed as a call to an ordinary operator + with assignment precedence, instead of as a macro call. ([#20406]) + * (µ "micro" and ɛ "latin epsilon") are considered equivalent to the corresponding Greek characters in identifiers. `\varepsilon` now tab-completes to U+03B5 (greek small letter epsilon) ([#19464]). diff --git a/doc/src/devdocs/ast.md b/doc/src/devdocs/ast.md index 6a8f3993a4bbf..bacb91e1bd0e3 100644 --- a/doc/src/devdocs/ast.md +++ b/doc/src/devdocs/ast.md @@ -422,7 +422,6 @@ call. Finally, chains of comparisons have their own special expression structure | `x"y"z` | `(macrocall @x_str "y" "z")` | | `"x = $x"` | `(string "x = " x)` | | ``` `a b c` ``` | `(macrocall @cmd "a b c")` | -| `x ~ distr` | `(macrocall @~ x distr)` | Doc string syntax: diff --git a/src/julia-parser.scm b/src/julia-parser.scm index 43dd546c4b4b7..a6cae89d91927 100644 --- a/src/julia-parser.scm +++ b/src/julia-parser.scm @@ -754,9 +754,7 @@ (not (eqv? (peek-char (ts:port s)) #\ ))) (begin (ts:put-back! s t) ex) - (let ((args (parse-chain s down '~))) - `(macrocall @~ ,ex ,@(butlast args) - ,(loop (last args) (peek-token s))))) + (list 'call t ex (parse-assignment s down))) (list t ex (parse-assignment s down))))))) (define (parse-eq s)