Coverage report: /home/ellis/comp/core/lib/organ/element/lesser/keyword.lisp
Kind | Covered | All | % |
expression | 0 | 52 | 0.0 |
branch | 0 | 0 | nil |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
1
;;; lib/organ/element/lesser/keyword.lisp --- Org Keyword Element
3
;; Keywords match the pattern '#+KEY: VALUE'
5
;; VALUE can be any of the standard-set of objects.
7
;; Affiliated keywords match the patterns:
18
(define-org-element keyword
19
((key :accessor keyword-key :initarg :key :type string)
20
(val :accessor keyword-val :initarg :val))
23
(define-org-parser (keyword :from string)
24
(multiple-value-bind (match-start match-end start end) (scan org-file-property-rx input)
25
(declare (ignore match-end))
27
(let ((key (subseq input (aref start 0) (aref end 0)))
28
(val (subseq input (aref start 1) (aref end 1))))
30
(string-case ((string-upcase key) :default (org-create :keyword :key key :val val))
31
("COMMENT" (org-create :comment :contents val))
33
(with-input-from-string (s val)
35
(params (read-lisp-until-end s)))
36
(org-create :dynamic-block :name name :parameters params)))))))))
38
(define-org-element affiliated-keyword (key opt value) :lesser t)
40
(define-org-parser (affiliated-keyword :from string))