MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / highlightingTokenize

Function highlightingTokenize

tools/shell/linenoise.cpp:1538–1548  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1536}
1537
1538std::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
1551void insertToken(tokenType insert_type, uint64_t insert_pos, std::vector<highlightToken>& tokens) {

Callers 2

truncateTextFunction · 0.85
refreshMultiLineFunction · 0.85

Calls 2

getParseTokensFunction · 0.85
getShellCommandTokensFunction · 0.85

Tested by

no test coverage detected