isNoSeparatorRequired returns true if tokenType is a punctuation/operator token that does not require whitespace separation from the next token.
(tokenType int)
| 80 | // isNoSeparatorRequired returns true if tokenType is a punctuation/operator token |
| 81 | // that does not require whitespace separation from the next token. |
| 82 | func isNoSeparatorRequired(tokenType int) bool { |
| 83 | switch tokenType { |
| 84 | case '$', '(', ')', '[', ']', ',', ';', ':', '=', '.', |
| 85 | '+', '-', '/', '^', '<', '>', '%', '*', |
| 86 | pgparser.TYPECAST, pgparser.DOT_DOT, pgparser.COLON_EQUALS, |
| 87 | pgparser.EQUALS_GREATER, pgparser.LESS_EQUALS, |
| 88 | pgparser.GREATER_EQUALS, pgparser.NOT_EQUALS, pgparser.PARAM, |
| 89 | pgparser.Op: |
| 90 | return true |
| 91 | } |
| 92 | return false |
| 93 | } |
| 94 | |
| 95 | type Completer struct { |
| 96 | ctx context.Context |