Skip to content

Commit

Permalink
another workaround for #577
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Mar 14, 2012
1 parent 3eaf953 commit 353e8bb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
1 change: 1 addition & 0 deletions jl/string.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ print(x...) = for i=x; print(i); end
println(args...) = print(args..., '\n')

show(s::String) = print_quoted(s)
showln(x) = (show(x); println())

(*)(s::String...) = strcat(s...)
(^)(s::String, r::Integer) = repeat(s,r)
Expand Down
24 changes: 13 additions & 11 deletions src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -284,17 +284,19 @@
args
field-names)))
body)))
(pattern-replace
(pattern-set
(pattern-lambda (function (call name . sig) body)
`(function ,(cadr __) ,(ctor-body body)))
(pattern-lambda (= (call name . sig) body)
`(= ,(cadr __) ,(ctor-body body)))
(pattern-lambda (function (call (curly name . p) . sig) body)
`(function ,(cadr __) ,(ctor-body body)))
(pattern-lambda (= (call (curly name . p) . sig) body)
`(= ,(cadr __) ,(ctor-body body))))
ctor))
(let ((ctor2
(pattern-replace
(pattern-set
(pattern-lambda (function (call name . sig) body)
`(function ,(cadr __) ,(ctor-body body)))
(pattern-lambda (= (call name . sig) body)
`(= ,(cadr __) ,(ctor-body body)))
(pattern-lambda (function (call (curly name . p) . sig) body)
`(function ,(cadr __) ,(ctor-body body)))
(pattern-lambda (= (call (curly name . p) . sig) body)
`(= ,(cadr __) ,(ctor-body body))))
ctor)))
ctor2))

;; remove line numbers and nested blocks
(define (flatten-blocks e)
Expand Down

0 comments on commit 353e8bb

Please sign in to comment.