GNU bug report logs - #33811
[PATCH] Opam importer improvements

Previous Next

Package: guix-patches;

Reported by: Julien Lepiller <julien <at> lepiller.eu>

Date: Thu, 20 Dec 2018 10:42:01 UTC

Severity: normal

Tags: fixed, patch

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 33811 <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: 33811 <at> debbugs.gnu.org
Cc: Julien Lepiller <julien <at> lepiller.eu>
Subject: [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





This bug report was last modified 6 years and 92 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.