single quote is a valid rune for symbols and keywords
tolitius opened this issue · comments
Currently symbols and keywords that have single quotes (i.e. :info-didn't-change
) will fail to parse since "'
" is not a valid rune.
Since okSymbol
function in lexer.go
is used for more than just symbols, I am not sure where you think is best to add it.
For now I added it here: https://github.com/tolitius/go-edn/blob/v1/lexer.go#L251
That is of course if you agree that "'
" is a valid rune
Yeah, this is somewhat related to edn-format/edn#67: I decided to not support it initially, but I don't mind supporting single quotes in symbols and keywords.
okSymbol
is used in keywords and symbols only, so it should be fine to add single quote there: That means adding '\''
to the list of allowed characters here:
Lines 103 to 109 in d191449
Happy to take a patch for this, otherwise I'll likely just fix it later today.