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

Function fxRestBinding

xs/sources/xsSyntaxical.c:3889–3898  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3887}
3888
3889void fxRestBinding(txParser* parser, txToken theToken, txUnsigned flag)
3890{
3891 txInteger aLine = parser->states[0].line;
3892 fxMatchToken(parser, XS_TOKEN_SPREAD);
3893 fxBinding(parser, theToken, 0);
3894 if (flag && ((parser->root->description->token == XS_TOKEN_ARRAY_BINDING) || (parser->root->description->token == XS_TOKEN_OBJECT_BINDING))) {
3895 fxReportParserError(parser, parser->states[0].line, "invalid rest");
3896 }
3897 fxPushNodeStruct(parser, 1, XS_TOKEN_REST_BINDING, aLine);
3898}
3899
3900txNode* fxRestBindingFromExpression(txParser* parser, txNode* theNode, txToken theToken, txUnsigned flag)
3901{

Callers 3

fxArrayBindingFunction · 0.85
fxObjectBindingFunction · 0.85
fxParametersBindingFunction · 0.85

Calls 4

fxMatchTokenFunction · 0.85
fxBindingFunction · 0.85
fxReportParserErrorFunction · 0.85
fxPushNodeStructFunction · 0.85

Tested by

no test coverage detected