All comment ranges (line and block) in sql as [start, end) index pairs — computed by the SAME scanner parseScript uses, so a preprocessor's "is index N inside a comment?" verdict cannot diverge from the statement splitter on q-literals, -- inside quoted identifiers, or a block-comment opener inside a string. Throws ScriptParseError on the same malformed input parseScript rejects (unterminated block comment / string / q-literal).
Function: commentRanges()
Defined in: packages/core/src/script/parser.ts:95
All comment ranges (line and block) in
sqlas[start, end)index pairs — computed by the SAME scannerparseScriptuses, so a preprocessor's "is index N inside a comment?" verdict cannot diverge from the statement splitter on q-literals,--inside quoted identifiers, or a block-comment opener inside a string. ThrowsScriptParseErroron the same malformed inputparseScriptrejects (unterminated block comment / string / q-literal).Parameters
sqlstringReturns
[
number,number][]