guix: opam: Allow for whitespace at the start of an opam file.

* guix/import/opam.scm (records): Accept whitespace at the beginning.
This commit is contained in:
Julien Lepiller 2021-07-05 16:06:22 +02:00
parent 685cfdec94
commit 45940f59aa
No known key found for this signature in database
GPG key ID: 53D457B2D636EE82

View file

@ -66,7 +66,7 @@ (define-peg-pattern STRCHR body
(range #\# #\頋)))
(define-peg-pattern operator all (or "=" "!" "<" ">"))
(define-peg-pattern records body (* (and (or record weird-record) (* SP))))
(define-peg-pattern records body (and (* SP) (* (and (or record weird-record) (* SP)))))
(define-peg-pattern record all (and key COLON (* SP) value))
(define-peg-pattern weird-record all (and key (* SP) dict))
(define-peg-pattern key body (+ (or (range #\a #\z) "-")))