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

Function fxCheckStrictSymbol

xs/sources/xsSyntaxical.c:4184–4198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4182}
4183
4184void fxCheckStrictSymbol(txParser* parser, txSymbol* symbol)
4185{
4186 if (parser->flags & mxStrictFlag) {
4187 if (symbol == parser->argumentsSymbol)
4188 fxReportParserError(parser, parser->states[0].line, "invalid arguments (strict mode)");
4189 else if (symbol == parser->evalSymbol)
4190 fxReportParserError(parser, parser->states[0].line, "invalid eval (strict mode)");
4191 else if (symbol == parser->yieldSymbol)
4192 fxReportParserError(parser, parser->states[0].line, "invalid yield (strict mode)");
4193 }
4194 else if (parser->flags & mxYieldFlag) {
4195 if (symbol == parser->yieldSymbol)
4196 fxReportParserError(parser, parser->states[0].line, "invalid yield");
4197 }
4198}
4199
4200void fxCheckUniqueProperty(txParser* parser, txNode* base, txNode* current)
4201{

Callers 8

fxLiteralExpressionFunction · 0.85
fxFunctionExpressionFunction · 0.85
fxGeneratorExpressionFunction · 0.85
fxBindingFunction · 0.85
fxBindingFromExpressionFunction · 0.85
fxCheckReferenceFunction · 0.85
fxCheckStrictBindingFunction · 0.85
fxCheckStrictFunctionFunction · 0.85

Calls 1

fxReportParserErrorFunction · 0.85

Tested by

no test coverage detected