diff options
author | Julien Lepiller <julien@lepiller.eu> | 2019-02-01 15:58:12 +0100 |
---|---|---|
committer | Julien Lepiller <julien@lepiller.eu> | 2019-02-05 22:33:06 +0100 |
commit | 0f4432c620f8d569ef29ca74bad2b7eebd803441 (patch) | |
tree | 8797e7fa4bbce816cccd81a75601ecd5fa60b906 /guix | |
parent | 6c8666b4513ba66bb1de0c129eec8a5623fddfeb (diff) |
import: opam: Fix conditions.
* guix/import/opam.scm (condition-eq, condition-neq): The first argument
can be empty.
* tests/opam.scm: Add test case.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/import/opam.scm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/guix/import/opam.scm b/guix/import/opam.scm index c254db5f2c..6ffb16b49b 100644 --- a/guix/import/opam.scm +++ b/guix/import/opam.scm @@ -90,8 +90,8 @@ (define-peg-pattern condition-lower all (and (ignore "<") (* SP) condition-string)) (define-peg-pattern condition-and all (and condition-form2 (* SP) (? (ignore "&")) (* SP) condition-form)) (define-peg-pattern condition-or all (and condition-form2 (* SP) (ignore "|") (* SP) condition-form)) -(define-peg-pattern condition-eq all (and condition-content (* SP) (ignore "=") (* SP) condition-content)) -(define-peg-pattern condition-neq all (and condition-content (* SP) (ignore (and "!" "=")) (* SP) condition-content)) +(define-peg-pattern condition-eq all (and (? condition-content) (* SP) (ignore "=") (* SP) condition-content)) +(define-peg-pattern condition-neq all (and (? condition-content) (* SP) (ignore (and "!" "=")) (* SP) condition-content)) (define-peg-pattern condition-content body (or condition-string condition-var)) (define-peg-pattern condition-content2 body (and condition-content (* SP) (not-followed-by (or "&" "=" "!")))) (define-peg-pattern condition-string all (and QUOTE (* STRCHR) QUOTE)) |