-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix literals format #237
Fix literals format #237
Conversation
token/quote.go
Outdated
if q != "" { | ||
buf.WriteString(q) | ||
continue | ||
} | ||
if char.IsPrint(b) { | ||
|
||
// Note: char.IsPrint(' ') is false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better to fix char.IsPrint
, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. You could fix char.IsPrint
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
This PR align literals format to Spanner/ZetaSQL
FORMAT("%T", input)
functions.Generic quoted literals and quoted identifiers
' '
and'~'
should be printable characters.\
is always escaped printable character.String literals
\x%02x
for non-printable runes ofr <= 0x7f
.\t
,\r
,\n
inr < 0x20
instead of\x%02x
.Bytes literals
b""
rather thanB""
for bytes literalclose Emulate string/bytes literal format in FORMAT("%T", input) #236