MCPcopy
hub / github.com/thesysdev/openui / parseComp

Function parseComp

packages/lang-core/src/parser/expressions.ts:285–296  ·  view source on GitHub ↗

Parse `TypeName(arg1, arg2, ...)`

()

Source from the content-addressed store, hash-verified

283
284 /** Parse `TypeName(arg1, arg2, ...)` */
285 function parseComp(): ASTNode {
286 const name = cur().v as string;
287 adv(); // consume TypeName
288 eat(T.LParen);
289 const args: ASTNode[] = [];
290 while (cur().t !== T.RParen && cur().t !== T.EOF) {
291 args.push(parseExpr(0));
292 if (cur().t === T.Comma) adv();
293 }
294 eat(T.RParen);
295 return { k: "Comp", name, args };
296 }
297
298 /** Parse `[elem1, elem2, ...]` */
299 function parseArr(): ASTNode {

Callers 1

parsePrefixFunction · 0.85

Calls 5

curFunction · 0.85
advFunction · 0.85
eatFunction · 0.85
parseExprFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected