Coverage report: /home/ellis/comp/core/lib/organ/element/lesser/node-property.lisp

KindCoveredAll%
expression2021 95.2
branch00nil
Key
Not instrumented
Conditionalized out
Executed
Not executed
 
Both branches taken
One branch taken
Neither branch taken
1
 ;;; lib/organ/element/lesser/node-property.lisp --- Org Node Property Element
2
 
3
 ;; Node properties match the patterns:
4
 
5
 #|
6
 :NAME: VALUE
7
 :NAME:
8
 :NAME+: VALUE
9
 :NAME+:
10
 |#
11
 
12
 ;;; Code:
13
 (in-package :organ)
14
 
15
 (define-org-element node-property ((name :initarg :name :accessor name) (value :initarg :value :accessor value)) :lesser t)
16
 
17
 ;; assumes caller is org-property-drawer = single line
18
 (define-org-parser (node-property :from string)
19
   (multiple-value-bind (match subs)
20
       (scan-to-strings org-property-rx input)
21
     (when match
22
       (let ((name (aref subs 0))
23
             (value (aref subs 1)))
24
         (org-create :node-property :name name :value value)))))