diff mbox series

[bug#53882,01/24] import: opam: Accept tabulations.

Message ID 1dcef02fe1f5f25657c6427d09c43bfc41091050.1644350657.git.julien@lepiller.eu
State Accepted
Headers show
Series [bug#53882,01/24] import: opam: Accept tabulations. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Julien Lepiller Feb. 8, 2022, 8:14 p.m. UTC
* guix/import/opam.scm (SP, SP2): Accept tabulation as whitespace.
---
 guix/import/opam.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

M Feb. 23, 2022, 6:09 p.m. UTC | #1
Julien Lepiller schreef op di 08-02-2022 om 21:14 [+0100]:
>  ;; Define a PEG parser for the opam format
>  (define-peg-pattern comment none (and "#" (* COMMCHR) "\n"))
> -(define-peg-pattern SP none (or " " "\n" comment))
> -(define-peg-pattern SP2 body (or " " "\n"))
> +(define-peg-pattern SP none (or " " "\n" "\t" comment))
> +(define-peg-pattern SP2 body (or " " "\n" "\t"))

To test this, perhaps a few spaces can be replaced by tabs
in 'test-opam-file' in tests/opam.scm?

Greetings,
Maxime.
diff mbox series

Patch

diff --git a/guix/import/opam.scm b/guix/import/opam.scm
index f569c921b1..f51d17dea4 100644
--- a/guix/import/opam.scm
+++ b/guix/import/opam.scm
@@ -61,8 +61,8 @@  (define-module (guix import opam)
 
 ;; Define a PEG parser for the opam format
 (define-peg-pattern comment none (and "#" (* COMMCHR) "\n"))
-(define-peg-pattern SP none (or " " "\n" comment))
-(define-peg-pattern SP2 body (or " " "\n"))
+(define-peg-pattern SP none (or " " "\n" "\t" comment))
+(define-peg-pattern SP2 body (or " " "\n" "\t"))
 (define-peg-pattern QUOTE none "\"")
 (define-peg-pattern QUOTE2 body "\"")
 (define-peg-pattern COLON none ":")