MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxParameters

Function fxParameters

xs/sources/xsSyntaxical.c:3270–3295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3268}
3269
3270void fxParameters(txParser* parser)
3271{
3272 txInteger aCount = 0;
3273 txInteger aLine = parser->states[0].line;
3274 txBoolean aSpreadFlag = 0;
3275 fxMatchToken(parser, XS_TOKEN_LEFT_PARENTHESIS);
3276 while ((parser->states[0].token == XS_TOKEN_SPREAD) || (gxTokenFlags[parser->states[0].token] & XS_TOKEN_BEGIN_EXPRESSION)) {
3277 txInteger aParamLine = parser->states[0].line;
3278 if (parser->states[0].token == XS_TOKEN_SPREAD) {
3279 fxGetNextToken(parser);
3280 fxAssignmentExpression(parser);
3281 fxPushNodeStruct(parser, 1, XS_TOKEN_SPREAD, aParamLine);
3282 aSpreadFlag = 1;
3283 }
3284 else
3285 fxAssignmentExpression(parser);
3286 aCount++;
3287 if (parser->states[0].token != XS_TOKEN_RIGHT_PARENTHESIS)
3288 fxMatchToken(parser, XS_TOKEN_COMMA);
3289 }
3290 fxMatchToken(parser, XS_TOKEN_RIGHT_PARENTHESIS);
3291 fxPushNodeList(parser, aCount);
3292 fxPushNodeStruct(parser, 1, XS_TOKEN_PARAMS, aLine);
3293 if (aSpreadFlag)
3294 parser->root->flags |= mxSpreadFlag;
3295}
3296
3297void fxPropertyName(txParser* parser, txSymbol** theSymbol, txToken* theToken0, txToken* theToken1, txToken* theToken2, txUnsigned* flag)
3298{

Callers 3

fxCallExpressionFunction · 0.85
fxLiteralExpressionFunction · 0.85
fxNewExpressionFunction · 0.85

Calls 5

fxMatchTokenFunction · 0.85
fxGetNextTokenFunction · 0.85
fxAssignmentExpressionFunction · 0.85
fxPushNodeStructFunction · 0.85
fxPushNodeListFunction · 0.85

Tested by

no test coverage detected