MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / setupArgs

Method setupArgs

ij/src/main/java/ij/macro/Interpreter.java:517–535  ·  view source on GitHub ↗
(int nArgs)

Source from the content-addressed store, hash-verified

515 }
516
517 void setupArgs(int nArgs) {
518 getLeftParen();
519 int i = topOfStack;
520 int count = nArgs;
521 if (nextToken()!=')') {
522 do {
523 getToken();
524 if (i>=0)
525 stack[i].symTabIndex = tokenAddress;
526 i--;
527 count--;
528 getToken();
529 } while (token==',');
530 putTokenBack();
531 }
532 if (count!=0)
533 error(nArgs+" argument"+(nArgs==1?"":"s")+" expected");
534 getRightParen();
535 }
536
537 // cache exception object for better performance
538 ReturnException returnException;

Callers 1

runUserFunctionMethod · 0.95

Calls 6

getLeftParenMethod · 0.95
nextTokenMethod · 0.95
getTokenMethod · 0.95
putTokenBackMethod · 0.95
errorMethod · 0.95
getRightParenMethod · 0.95

Tested by

no test coverage detected