Closed KingMob closed 8 months ago
The original code included the double quotes inside the string representation of a :string
node, like \"somevar\"
Roughly speaking, I saw two strategies to consider when switching to single quotes. I went with (1) below.
:string
) when we need to generate readable Clojure.:string
node values immediately after parsing so that they are wrapped in double quotes internally, like they were before.(1) involves some small changes, mostly wrapping with double quotes in literal/read
, and making sure that scalar/plan
doesn't invoke edn/read-string
directly any more, but calls literal/read
.
(2) would involve the fewest changes, but I was concerned it would be surprising, hard to unparse, or lead to confusion with double-quoted delimited identifiers. Generally, it's redundant info that would no longer match what was parsed, which just feels like a recipe for trouble somewhere down the line.
Update the BNF and supporting code to use single quotes instead of double quotes for strings, bringing IQL more in line with SQL.