Lexical pre-processing for the SQL guard. stripCommentsAndStrings replaces the content of
string literals, quoted identifiers and comments with a single space, so a lexical safety check
cannot be fooled by a keyword - or a second statement - hidden inside a literal.
maskCommentsAndStrings hides the same spans but keeps every offset, for callers that locate
something in the masked text and then edit the original at that index.
Lexical pre-processing for the SQL guard.
stripCommentsAndStringsreplaces the content of string literals, quoted identifiers and comments with a single space, so a lexical safety check cannot be fooled by a keyword - or a second statement - hidden inside a literal.maskCommentsAndStringshides the same spans but keeps every offset, for callers that locate something in the masked text and then edit the original at that index.