Add support for symbols.

This commit is contained in:
niten 2022-05-30 15:42:27 -07:00
parent 815750e93e
commit d9f744ac19
1 changed files with 5 additions and 1 deletions

View File

@ -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