Skip to content

Function: commentRanges() ​

ts
function commentRanges(sql): [number, number][];

Defined in: packages/core/src/script/parser.ts:95

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).

Parameters ​

ParameterType
sqlstring

Returns ​

[number, number][]

MIT Licensed. Contains data derived from the Firebird project under IDPL/IPL.