MCPcopy
hub / github.com/Doorman11991/smallcode / _skipString

Function _skipString

src/tools/liquid_tool_parser.js:129–139  ·  view source on GitHub ↗
(s, start)

Source from the content-addressed store, hash-verified

127// Skip a Python-style string starting at `s[start]` (single or double quote).
128// Returns index just past the closing quote, or -1 on EOF.
129function _skipString(s, start) {
130 const quote = s[start];
131 let i = start + 1;
132 while (i < s.length) {
133 const c = s[i];
134 if (c === '\\') { i += 2; continue; }
135 if (c === quote) return i + 1;
136 i++;
137 }
138 return -1;
139}
140
141// Parse `key=value, key=value, ...` (Python kwargs). Returns plain object,
142// or null on parse failure.

Callers 3

_findMatchingParenFunction · 0.85
_parseListFunction · 0.85
_parseDictFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected