You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
string=quotation-mark*charquotation-markchar=unescaped/escape (
%x22/; " quotation mark U+0022
%x5C/; \ reverse solidus U+005C
%x2F/; / solidus U+002F
%x62/; b backspace U+0008
%x66/; f form feed U+000C
%x6E/; n line feed U+000A
%x72/; r carriage return U+000D
%x74/; t tab U+0009
%x75 4HEXDIG ) ; uXXXX U+XXXXescape= %x5C; \quotation-mark= %x22; "unescaped= %x20-21/ %x23-5B/ %x5D-10FFFF
Because MistQL is often embedded in JSON (or stringified in some way) it can get annoying to work with string constants, because you HAVE to escape them, e.g. the mistql query @ + "hi" becomes "@ + \"hi\"". On the surface that's not too bad, but it does hurt readability substantially. It doesn't hurt language size dramatically to allow for single-quoted strings, such that queries encoded in JSON look like "@ + 'hi'". Therefore, we should assess, track, and perhaps execute on adding this to the language.
The grammar for that would be VERY similar to the grammar above, with a very small modification:
single-quote-string=single-quotation-mark*charsingle-quotation-markchar=unescaped/escape (
%x22/; ' single-quotation-mark U+0027
%x5C/; \ reverse solidus U+005C
%x2F/; / solidus U+002F
%x62/; b backspace U+0008
%x66/; f form feed U+000C
%x6E/; n line feed U+000A
%x72/; r carriage return U+000D
%x74/; t tab U+0009
%x75 4HEXDIG ) ; uXXXX U+XXXXescape= %x5C; \single-quotation-mark= %x27; 'unescaped= %x20-21/ %x23-5B/ %x5D-10FFFF
The text was updated successfully, but these errors were encountered:
Strings in MistQL are encoded using JSON's standard for escaping:
https://tools.ietf.org/id/draft-ietf-json-rfc4627bis-09.html#rfc.section.7
This leaves a grammar as follows:
Because MistQL is often embedded in JSON (or stringified in some way) it can get annoying to work with string constants, because you HAVE to escape them, e.g. the mistql query
@ + "hi"
becomes"@ + \"hi\""
. On the surface that's not too bad, but it does hurt readability substantially. It doesn't hurt language size dramatically to allow for single-quoted strings, such that queries encoded in JSON look like"@ + 'hi'"
. Therefore, we should assess, track, and perhaps execute on adding this to the language.The grammar for that would be VERY similar to the grammar above, with a very small modification:
The text was updated successfully, but these errors were encountered: