Function: gdb-mi--parse-tuple-or-list

gdb-mi--parse-tuple-or-list is a byte-compiled function defined in gdb-mi.el.gz.

Signature

(gdb-mi--parse-tuple-or-list END-CHAR)

Documentation

Parse a tuple or list, either returned as a Lisp list.

END-CHAR is the ending delimiter; will stop at end-of-buffer otherwise.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/gdb-mi.el.gz
;; Parse GDB/MI result records: this process converts
;;  list      [...]      ->  list
;;  tuple     {...}      ->  list
;;  result    KEY=VALUE  ->  (KEY . VALUE) where KEY is a symbol
;;  c-string  "..."      ->  string

(defun gdb-mi--parse-tuple-or-list (end-char)
  "Parse a tuple or list, either returned as a Lisp list.
END-CHAR is the ending delimiter; will stop at end-of-buffer otherwise."
  (let ((items nil))
    (while (not (or (eobp)
                    (eq (following-char) end-char)))
      (let ((item (gdb-mi--parse-result-or-value)))
        (push item items)
        (when (eq (following-char) ?,)
          (forward-char))))
    (when (eq (following-char) end-char)
      (forward-char))
    (nreverse items)))