Skip to content

Commit

Permalink
Do not require new line or ";" at the end of import expression. Fix #…
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyichao committed May 22, 2015
1 parent 8d10b60 commit aa21080
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/julia-parser.scm
Original file line number Diff line number Diff line change
Expand Up @@ -1293,9 +1293,9 @@
(from (and (eq? next ':) (not (ts:space? s))))
(done (cond ((or from (eqv? next #\,))
(begin (take-token s) #f))
((memv next '(#\newline #\;)) #t)
((eof-object? next) #t)
(else #f)))
((or (eq? next '|.|)
(eqv? (string.sub (string next) 0 1) ".")) #f)
(else #t)))
(rest (if done
'()
(parse-comma-separated s (lambda (s)
Expand Down Expand Up @@ -1341,7 +1341,7 @@
(loop (cons (symbol (string.sub (string nxt) 1))
path)))
(else
(error (string "invalid \"" word "\" statement")))))))
`(,word ,@(reverse path)))))))

; parse comma-separated assignments, like "i=1:n,j=1:m,..."
(define (parse-comma-separated s what)
Expand Down

0 comments on commit aa21080

Please sign in to comment.