Function: icalendar-parse-value-node

icalendar-parse-value-node is a byte-compiled function defined in icalendar-parser.el.gz.

Signature

(icalendar-parse-value-node TYPE LIMIT)

Documentation

Parse an iCalendar value of type TYPE from point up to LIMIT.

Returns a syntax node containing the value.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/icalendar-parser.el.gz
(defun ical:parse-value-node (type limit)
  "Parse an iCalendar value of type TYPE from point up to LIMIT.
Returns a syntax node containing the value."
  (let ((value-regex (rx-to-string (get type 'ical:value-rx))))

    (unless (re-search-forward value-regex limit t)
      (ical:signal-parse-error
       (format "No %s value between %d and %d" type (point) limit)))

    (let ((begin (match-beginning 0))
          (end (match-end 0))
          (node (ical:read-value-node type (match-string 0))))
      (ical:ast-node-meta-set node :buffer (current-buffer))
      (ical:ast-node-meta-set node :begin begin)
      (ical:ast-node-meta-set node :end end)

      node)))