| 1536 | } |
| 1537 | |
| 1538 | std::vector<highlightToken> highlightingTokenize(char* buf, size_t len, bool is_shell_command) { |
| 1539 | std::vector<highlightToken> tokens; |
| 1540 | if (!is_shell_command) { |
| 1541 | // SQL query - use parser to obtain tokens |
| 1542 | tokens = getParseTokens(buf, len); |
| 1543 | } else { |
| 1544 | // : command |
| 1545 | tokens = getShellCommandTokens(buf, len); |
| 1546 | } |
| 1547 | return tokens; |
| 1548 | } |
| 1549 | |
| 1550 | // insert a token of length 1 of the specified type |
| 1551 | void insertToken(tokenType insert_type, uint64_t insert_pos, std::vector<highlightToken>& tokens) { |
no test coverage detected