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 18, 2015
1 parent ca2ca31 commit cdd67df
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 cdd67df

Please sign in to comment.