Fix parser bug.
This commit is contained in:
parent
d48ec0884b
commit
c2bef96b7f
|
@ -156,8 +156,8 @@ return nil."
|
||||||
(when (= depth 0)
|
(when (= depth 0)
|
||||||
(setq return (reverse (cons (substring buffer 0 -1) return)))
|
(setq return (reverse (cons (substring buffer 0 -1) return)))
|
||||||
(setq buffer "")))
|
(setq buffer "")))
|
||||||
((string= holder "(") (setq depth (+ 1 depth)))
|
((string= holder "(") (setq depth (+ depth 1)))
|
||||||
((string= holder ")") (setq depth (- 1 depth)))))
|
((string= holder ")") (setq depth (- depth 1)))))
|
||||||
(reverse (cons buffer return))))
|
(reverse (cons buffer return))))
|
||||||
|
|
||||||
(defun org-babel-ref-at-ref-p ()
|
(defun org-babel-ref-at-ref-p ()
|
||||||
|
|
|
@ -2798,13 +2798,27 @@ arg
|
||||||
|
|
||||||
: 105
|
: 105
|
||||||
|
|
||||||
**** TODO Nesting problem II
|
**** DONE Nesting problem II
|
||||||
This generates parsing errors
|
This generates parsing errors
|
||||||
#+srcname: deeply-nested-args-bug-II-1()
|
#+srcname: deeply-nested-args-bug-II-1()
|
||||||
#+begin_src python :var arg=adder(a=adder(a=one(),b=adder(a=1,b=4)))
|
#+begin_src python :var arg=adder(a=adder(a=one(),b=adder(a=2,b=4)))
|
||||||
arg
|
arg
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
#+resname: deeply-nested-args-bug-II-1
|
||||||
|
|
||||||
|
: 106
|
||||||
|
|
||||||
|
#+srcname: deeply-nested-args-bug-II-original()
|
||||||
|
#+begin_src python :var arg=adder(a=adder(a=one(),b=one()),b=adder(a=one(),b=adder(a=1,b=4)))
|
||||||
|
arg
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+resname: deeply-nested-args-bug-II-original
|
||||||
|
: 8
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**** DONE Why does this give 8?
|
**** DONE Why does this give 8?
|
||||||
It was picking up the wrong definition of adder
|
It was picking up the wrong definition of adder
|
||||||
|
|
Loading…
Reference in New Issue