MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / skipBlanks

Function skipBlanks

src/utils/bash/bashParser.ts:272–296  ·  view source on GitHub ↗
(L: Lexer)

Source from the content-addressed store, hash-verified

270}
271
272function skipBlanks(L: Lexer): void {
273 while (L.i < L.len) {
274 const c = L.src[L.i]!
275 if (c === ' ' || c === '\t' || c === '\r') {
276 // \r is whitespace per tree-sitter-bash extras /\s/ — handles CRLF inputs
277 advance(L)
278 } else if (c === '\\') {
279 const nx = L.src[L.i + 1]
280 if (nx === '\n' || (nx === '\r' && L.src[L.i + 2] === '\n')) {
281 // Line continuation — tree-sitter extras: /\\\r?\n/
282 advance(L)
283 advance(L)
284 if (nx === '\r') advance(L)
285 } else if (nx === ' ' || nx === '\t') {
286 // \<space> or \<tab> — tree-sitter's _whitespace is /\\?[ \t\v]+/
287 advance(L)
288 advance(L)
289 } else {
290 break
291 }
292 } else {
293 break
294 }
295 }
296}
297
298/**
299 * Scan next token. Context-sensitive: `cmd` mode treats [ as operator (test

Callers 15

nextTokenFunction · 0.85
parseProgramFunction · 0.85
parseStatementsFunction · 0.85
parseCommandFunction · 0.85
parseSimpleCommandFunction · 0.85
maybeRedirectFunction · 0.85
tryParseAssignmentFunction · 0.85
tryParseRedirectFunction · 0.85
parseProcessSubFunction · 0.85
parseWordFunction · 0.85
parseDollarLikeFunction · 0.85

Calls 1

advanceFunction · 0.85

Tested by

no test coverage detected