Fix parser bug.

This commit is contained in:
Dan Davison 2009-07-23 22:32:03 -04:00
parent d48ec0884b
commit c2bef96b7f
2 changed files with 18 additions and 4 deletions

View File

@ -156,8 +156,8 @@ return nil."
(when (= depth 0)
(setq return (reverse (cons (substring buffer 0 -1) return)))
(setq buffer "")))
((string= holder "(") (setq depth (+ 1 depth)))
((string= holder ")") (setq depth (- 1 depth)))))
((string= holder "(") (setq depth (+ depth 1)))
((string= holder ")") (setq depth (- depth 1)))))
(reverse (cons buffer return))))
(defun org-babel-ref-at-ref-p ()

View File

@ -2798,13 +2798,27 @@ arg
: 105
**** TODO Nesting problem II
**** DONE Nesting problem II
This generates parsing errors
#+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
#+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?
It was picking up the wrong definition of adder