guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#33811] [PATCH 5/5] import: opam: Parse comments.


From: Julien Lepiller
Subject: [bug#33811] [PATCH 5/5] import: opam: Parse comments.
Date: Thu, 20 Dec 2018 12:01:03 +0100

* guix/import/opam.scm: Add comment support in parser.
---
 guix/import/opam.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/guix/import/opam.scm b/guix/import/opam.scm
index b30d28561..c254db5f2 100644
--- a/guix/import/opam.scm
+++ b/guix/import/opam.scm
@@ -42,7 +42,8 @@
             %opam-updater))
 
 ;; Define a PEG parser for the opam format
-(define-peg-pattern SP none (or " " "\n"))
+(define-peg-pattern comment none (and "#" (* STRCHR) "\n"))
+(define-peg-pattern SP none (or " " "\n" comment))
 (define-peg-pattern SP2 body (or " " "\n"))
 (define-peg-pattern QUOTE none "\"")
 (define-peg-pattern QUOTE2 body "\"")
-- 
2.19.2






reply via email to

[Prev in Thread] Current Thread [Next in Thread]