diff --git a/src/julia-syntax.scm b/src/julia-syntax.scm index 59f0662e61018..688ce1ecb1978 100644 --- a/src/julia-syntax.scm +++ b/src/julia-syntax.scm @@ -4980,6 +4980,7 @@ f(x) = yt(x) (let ((code '(block)) (locs '(list)) (linetable '(list)) + (linetablelen 0) (labltable (table)) (ssavtable (table)) (current-loc 0) @@ -4992,6 +4993,7 @@ f(x) = yt(x) (if (and (null? (cdr linetable)) (not (and (pair? e) (eq? (car e) 'meta)))) (begin (set! linetable (cons (make-lineinfo name file line) linetable)) + (set! linetablelen (+ linetablelen 1)) (set! current-loc 1))) (set! code (cons e code)) (set! i (+ i 1)) @@ -5013,13 +5015,15 @@ f(x) = yt(x) (make-lineinfo name current-file current-line) (make-lineinfo name current-file current-line (caar locstack))) linetable)) - (set! current-loc (- (length linetable) 1))))) + (set! linetablelen (+ linetablelen 1)) + (set! current-loc linetablelen)))) ((and (length> e 2) (eq? (car e) 'meta) (eq? (cadr e) 'push_loc)) (set! locstack (cons (list current-loc current-line current-file) locstack)) (set! current-file (caddr e)) (set! current-line 0) (set! linetable (cons (make-lineinfo name current-file current-line current-loc) linetable)) - (set! current-loc (- (length linetable) 1))) + (set! linetablelen (+ linetablelen 1)) + (set! current-loc linetablelen)) ((and (length= e 2) (eq? (car e) 'meta) (eq? (cadr e) 'pop_loc)) (let ((l (car locstack))) (set! locstack (cdr locstack))