summaryrefslogtreecommitdiff
path: root/cook/parse.scm
diff options
context:
space:
mode:
Diffstat (limited to 'cook/parse.scm')
-rw-r--r--cook/parse.scm9
1 files changed, 7 insertions, 2 deletions
diff --git a/cook/parse.scm b/cook/parse.scm
index 33bf3b0..2cc604b 100644
--- a/cook/parse.scm
+++ b/cook/parse.scm
@@ -51,6 +51,11 @@ https://github.com/cooklang/spec/blob/main/EBNF.md
step?
(elements step-elements))
+(define-record-type <comment>
+ (make-comment text)
+ comment?
+ (text comment-text))
+
(define (metadata-line-list->hash-table meta-lines)
(let ((metadata (make-hash-table)))
(for-each (lambda (line)
@@ -86,9 +91,9 @@ https://github.com/cooklang/spec/blob/main/EBNF.md
(list->string c)))
(comment ((: "--" (=> c (+ ,any-text-chars)) ,nl)
- (list->string c))
+ (make-comment (list->string c)))
((: "[-" (=> c (* any)) "-]")
- (list->string c)))
+ (make-comment (list->string c))))
(word ((=> w (+ ,word-chars))
(list->string w)))