summaryrefslogtreecommitdiff
path: root/guix/import
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2018-12-19 23:55:44 +0100
committerJulien Lepiller <julien@lepiller.eu>2019-01-07 22:05:51 +0100
commitf31ce9ecf1ecb4eeab4fc37792684b3fa03ec95f (patch)
treeb8faa4cfdbe3aa9f61c4559b8758158b82eb6b01 /guix/import
parent8737666a99f15a65776f866f4cc9d097e947bc0e (diff)
import: opam: Parse comments.
* guix/import/opam.scm: Add comment support in parser.
Diffstat (limited to 'guix/import')
-rw-r--r--guix/import/opam.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/guix/import/opam.scm b/guix/import/opam.scm
index b30d28561b..c254db5f2c 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 "\"")