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

Function fxRelationalExpression

xs/sources/xsSyntaxical.c:1982–2008  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1980}
1981
1982void fxRelationalExpression(txParser* parser)
1983{
1984 if (parser->states[0].token == XS_TOKEN_PRIVATE_IDENTIFIER) {
1985 txInteger aLine = parser->states[0].line;
1986 fxPushSymbol(parser, parser->states[0].symbol);
1987 fxGetNextToken(parser);
1988 fxMatchToken(parser, XS_TOKEN_IN);
1989 if (parser->flags & mxForFlag)
1990 fxReportParserError(parser, parser->states[0].line, "invalid %s", gxTokenNames[XS_TOKEN_IN]);
1991 fxShiftExpression(parser);
1992 fxCheckArrowFunction(parser, 2);
1993 fxPushNodeStruct(parser, 2, XS_TOKEN_PRIVATE_IDENTIFIER, aLine);
1994 }
1995 else {
1996 fxShiftExpression(parser);
1997 if ((parser->flags & mxForFlag) && ((parser->states[0].token == XS_TOKEN_IN) || fxIsKeyword(parser, parser->ofSymbol)))
1998 return;
1999 while (gxTokenFlags[parser->states[0].token] & XS_TOKEN_RELATIONAL_EXPRESSION) {
2000 txToken aToken = parser->states[0].token;
2001 txInteger aLine = parser->states[0].line;
2002 fxMatchToken(parser, aToken);
2003 fxShiftExpression(parser);
2004 fxCheckArrowFunction(parser, 2);
2005 fxPushNodeStruct(parser, 2, aToken, aLine);
2006 }
2007 }
2008}
2009
2010void fxShiftExpression(txParser* parser)
2011{

Callers 1

fxEqualExpressionFunction · 0.85

Calls 8

fxPushSymbolFunction · 0.85
fxGetNextTokenFunction · 0.85
fxMatchTokenFunction · 0.85
fxReportParserErrorFunction · 0.85
fxShiftExpressionFunction · 0.85
fxCheckArrowFunctionFunction · 0.85
fxPushNodeStructFunction · 0.85
fxIsKeywordFunction · 0.70

Tested by

no test coverage detected