Add support for symbols.
This commit is contained in:
parent
815750e93e
commit
d9f744ac19
|
@ -2,10 +2,14 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
|
isSymbol = str: isNull (match "^'.+" str);
|
||||||
|
stripQuote = head (match "^'(.+)");
|
||||||
|
parseStr = str: if (isSymbol str) then (stripQuote str) else ''"${str}"'';
|
||||||
|
|
||||||
join-str = concatStringsSep " ";
|
join-str = concatStringsSep " ";
|
||||||
toEDN = ds:
|
toEDN = ds:
|
||||||
if isString ds then
|
if isString ds then
|
||||||
''"${ds}"''
|
parseStr ds
|
||||||
else
|
else
|
||||||
(if isInt ds then
|
(if isInt ds then
|
||||||
ds
|
ds
|
||||||
|
|
Loading…
Reference in New Issue