Skip to content

Commit

Permalink
make a.$b work as expected. fixes #4004
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Aug 29, 2013
1 parent 57b8fda commit 523cbef
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/julia-parser.scm
Original file line number Diff line number Diff line change
Expand Up @@ -789,13 +789,18 @@
(else (error "unknown parse-cat result (internal error)"))))))
((|.|)
(take-token s)
(if (eqv? (peek-token s) #\()
(loop `(|.| ,ex ,(parse-atom s)))
(let ((name (parse-atom s)))
(if (and (pair? name) (eq? (car name) 'macrocall))
`(macrocall (|.| ,ex (quote ,(cadr name)))
,@(cddr name))
(loop `(|.| ,ex (quote ,name)))))))
(cond ((eqv? (peek-token s) #\()
(loop `(|.| ,ex ,(parse-atom s))))
((eq? (peek-token s) '$)
(let ((dollarex (parse-unary s)))
(loop `(|.| ,ex ($ (call (top Expr) (quote quote)
,(cadr dollarex)))))))
(else
(let ((name (parse-atom s)))
(if (and (pair? name) (eq? (car name) 'macrocall))
`(macrocall (|.| ,ex (quote ,(cadr name)))
,@(cddr name))
(loop `(|.| ,ex (quote ,name))))))))
((|.'| |'|) (take-token s)
(loop (list t ex)))
((#\{ ) (take-token s)
Expand Down

0 comments on commit 523cbef

Please sign in to comment.