Skip to content

Commit

Permalink
fix #20406, parse infix ~ as a normal operator
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Feb 2, 2017
1 parent ad5cd7b commit 569eb76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]).
Expand Down
4 changes: 1 addition & 3 deletions src/julia-parser.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 569eb76

Please sign in to comment.