MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / exec

Method exec

shared/common-utils.ts:187–206  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

185 }
186
187 public exec(): string[] {
188 while (this.rest) {
189 if (this.inDoubleQuotes) {
190 this.handleDoubleQuotes();
191 continue;
192 }
193
194 this.handleWhitespace();
195
196 const nextMatch = /[\s'"\\]/.exec(this.rest);
197 if (!nextMatch) {
198 this.addResult(this.rest);
199 this.rest = '';
200 continue;
201 }
202
203 this.handleNonDoubleQuote(nextMatch);
204 }
205 return this.results;
206 }
207}
208
209export function splitArguments(str = ''): string[] {

Callers 7

regexExecAllFunction · 0.45
parseNumericValueFunction · 0.45
startFunction · 0.45
handleDoubleQuotesMethod · 0.45
handleWhitespaceMethod · 0.45
splitArgumentsFunction · 0.45
readValueMethod · 0.45

Calls 4

handleDoubleQuotesMethod · 0.95
handleWhitespaceMethod · 0.95
addResultMethod · 0.95
handleNonDoubleQuoteMethod · 0.95

Tested by

no test coverage detected