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

Function fxIfStatement

xs/sources/xsSyntaxical.c:1636–1652  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1634}
1635
1636void fxIfStatement(txParser* parser)
1637{
1638 txInteger aLine = parser->states[0].line;
1639 fxMatchToken(parser, XS_TOKEN_IF);
1640 fxMatchToken(parser, XS_TOKEN_LEFT_PARENTHESIS);
1641 fxCommaExpression(parser);
1642 fxMatchToken(parser, XS_TOKEN_RIGHT_PARENTHESIS);
1643 fxStatement(parser, 0);
1644 if (parser->states[0].token == XS_TOKEN_ELSE) {
1645 fxMatchToken(parser, XS_TOKEN_ELSE);
1646 fxStatement(parser, 0);
1647 }
1648 else {
1649 fxPushNULL(parser);
1650 }
1651 fxPushNodeStruct(parser, 3, XS_TOKEN_IF, aLine);
1652}
1653
1654void fxReturnStatement(txParser* parser)
1655{

Callers 1

fxStatementFunction · 0.85

Calls 5

fxMatchTokenFunction · 0.85
fxCommaExpressionFunction · 0.85
fxStatementFunction · 0.85
fxPushNULLFunction · 0.85
fxPushNodeStructFunction · 0.85

Tested by

no test coverage detected