import: opam: Parse comments.

* guix/import/opam.scm: Add comment support in parser.
This commit is contained in:
Julien Lepiller 2018-12-19 23:55:44 +01:00
parent 8737666a99
commit f31ce9ecf1
No known key found for this signature in database
GPG Key ID: 43111F4520086A0C
1 changed files with 2 additions and 1 deletions

View File

@ -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 "\"")