Add global parameters module.
This commit is contained in:
parent
8564056320
commit
49a638fa76
6 changed files with 74 additions and 22 deletions
|
@ -171,17 +171,17 @@
|
|||
;; under key k. Special handling for start/stop symbols means given
|
||||
;; value is prepended to given start/stop key (student/suspend) as
|
||||
;; parsed month for later processing of student/suspend periods.
|
||||
(define (process-member-line d k v)
|
||||
(define (process-member-line d k v line-number)
|
||||
(let ((ss (split-start/stop-symbol k)))
|
||||
(if ss
|
||||
(let ((pk (car ss))
|
||||
(pd (cadr ss))
|
||||
(vl (string-split v " ")))
|
||||
(if (null? vl)
|
||||
(if (null? vl) ; Should not happen - k/v parser already catches this
|
||||
(error 'process-member-line "Missing date for start/stop symbol" k)
|
||||
(let ((ds (car vl)))
|
||||
(dict-set d pk
|
||||
(cons (cons pd (string->month ds))
|
||||
(cons (list pd (string->month ds) line-number)
|
||||
(dict-ref d pk '()))))))
|
||||
(case k
|
||||
((card desfire credit) (dict-set d k (cons v (dict-ref d k '()))))
|
||||
|
@ -294,7 +294,7 @@
|
|||
(let ((p (split-member-line (car ls) file-name lines line-number)))
|
||||
(loop (cdr ls)
|
||||
(if p
|
||||
(apply process-member-line r p)
|
||||
(process-member-line r (car p) (cadr p) line-number)
|
||||
r)
|
||||
(+ line-number 1))))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue