On Tuesday, September 9, 2014 2:02:03 AM UTC-5, gentlebeldin wrote:
>
> Not true, & is an undocumented singular case (regrettably). - is a unary 
> operator, too, but nonetheless, -(1,5) gives -4, as it well should.
>

Did you look at the link Jake posted? The `-` operator is not in the class 
`syntactic_unary_operator`, but listed in `unary_ops`, which by implication 
doesn't have the special handling:

https://github.com/jakebolewski/JuliaParser.jl/blob/aa466d7a84dee73db9cec66dbe631c1e534ebcc0/src/lexer.jl#L89

The problem is that `&`, `$`, and `::` are not just operators, but syntax 
(for instance, `&` in `ccall()`, and `$` in expression interpolation), so 
they require special parser handling, and this can conflict with the normal 
rules for parsing unary operators.

Reply via email to