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