guix-commits
[Top][All Lists]
Advanced

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

05/05: import: opam: Parse comments.


From: guix-commits
Subject: 05/05: import: opam: Parse comments.
Date: Mon, 7 Jan 2019 16:06:32 -0500 (EST)

roptat pushed a commit to branch master
in repository guix.

commit f31ce9ecf1ecb4eeab4fc37792684b3fa03ec95f
Author: Julien Lepiller <address@hidden>
Date:   Wed Dec 19 23:55:44 2018 +0100

    import: opam: Parse comments.
    
    * 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 b30d285..c254db5 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 "\"")



reply via email to

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