MCPcopy
hub / github.com/CodeboxIDE/codebox / getLocation

Function getLocation

core/cb.addons/require-tools/less/lessc.js:249–266  ·  view source on GitHub ↗
(index, inputStream)

Source from the content-addressed store, hash-verified

247 }
248
249 function getLocation(index, inputStream) {
250 var n = index + 1,
251 line = null,
252 column = -1;
253
254 while (--n >= 0 && inputStream.charAt(n) !== '\n') {
255 column++;
256 }
257
258 if (typeof index === 'number') {
259 line = (inputStream.slice(0, index).match(/\n/g) || "").length;
260 }
261
262 return {
263 line: line,
264 column: column
265 };
266 }
267
268 function getDebugInfo(index, inputStream, env) {
269 var filename = env.currentFileInfo.filename;

Callers 3

getDebugInfoFunction · 0.85
LessErrorFunction · 0.85
lessc.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected