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

Function fxCommaExpression

xs/sources/xsSyntaxical.c:1837–1858  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1835}
1836
1837void fxCommaExpression(txParser* parser)
1838{
1839 txInteger aCount = 0;
1840 txInteger aLine = parser->states[0].line;
1841 if (gxTokenFlags[parser->states[0].token] & XS_TOKEN_BEGIN_EXPRESSION) {
1842 fxAssignmentExpression(parser);
1843 aCount++;
1844 while (parser->states[0].token == XS_TOKEN_COMMA) {
1845 fxGetNextToken(parser);
1846 fxAssignmentExpression(parser);
1847 aCount++;
1848 }
1849 }
1850 if (aCount > 1) {
1851 fxPushNodeList(parser, aCount);
1852 fxPushNodeStruct(parser, 1, XS_TOKEN_EXPRESSIONS, aLine);
1853 }
1854 else if (aCount == 0) {
1855 fxPushNULL(parser);
1856 fxReportParserError(parser, parser->states[0].line, "missing expression");
1857 }
1858}
1859
1860void fxAssignmentExpression(txParser* parser)
1861{

Callers 15

fxStatementFunction · 0.85
fxDoStatementFunction · 0.85
fxForStatementFunction · 0.85
xsSyntaxical.cFile · 0.85
fxIfStatementFunction · 0.85
fxReturnStatementFunction · 0.85
fxSwitchStatementFunction · 0.85
fxThrowStatementFunction · 0.85
fxWhileStatementFunction · 0.85
fxWithStatementFunction · 0.85
fxCallExpressionFunction · 0.85
fxNewExpressionFunction · 0.85

Calls 6

fxAssignmentExpressionFunction · 0.85
fxGetNextTokenFunction · 0.85
fxPushNodeListFunction · 0.85
fxPushNodeStructFunction · 0.85
fxPushNULLFunction · 0.85
fxReportParserErrorFunction · 0.85

Tested by

no test coverage detected