(sql: string, i: number)
| 88 | } |
| 89 | |
| 90 | function scanDoubleQuotedString(sql: string, i: number): SQLToken | null { |
| 91 | if (sql[i] !== '"') { return null; } |
| 92 | let j = i + 1; |
| 93 | while (j < sql.length) { |
| 94 | if (sql[j] === '"' && sql[j + 1] === '"') { j += 2; } |
| 95 | else if (sql[j] === '"') { j++; break; } |
| 96 | else { j++; } |
| 97 | } |
| 98 | return { type: TokenType.QuotedBlock, end: j }; |
| 99 | } |
| 100 | |
| 101 | // Matches $$ or $tag$ where tag is [a-zA-Z_]\w* (digits after $ do NOT start a tag, so $1 is safe) |
| 102 | const dollarQuoteOpenRegex = /^\$([a-zA-Z_]\w*)?\$/; |
no outgoing calls
no test coverage detected