style: Correctly read dots in pairs and improper lists.
authorLudovic Courtès <ludo@gnu.org>
Wed, 13 Apr 2022 15:56:37 +0000 (17:56 +0200)
committerLudovic Courtès <ludo@gnu.org>
Thu, 14 Apr 2022 12:48:20 +0000 (14:48 +0200)
commitc9cded095593783a957ea500160587252d5cadf6
treeb746ae4f0ab22f6a070ccfe07cf886a7f0cd22cd
parent919cecd00b018d596cf8aca10b370c4d91989be9
style: Correctly read dots in pairs and improper lists.

Until now dots were read as symbols.

* guix/scripts/style.scm (read-with-comments)[dot]: New variable.
[dot?, reverse/dot]: New procedures.
Use 'reverse/dot' instead of 'reverse' when reading lists.
* tests/style.scm ("read-with-comments: dot notation")
("((a . 1) (b . 2))", "(a b c . boom)"): New tests.
guix/scripts/style.scm
tests/style.scm