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

Function fxIsKeyword

xs/sources/xsSyntaxical.c:517–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

515};
516
517txBoolean fxIsKeyword(txParser* parser, txSymbol* keyword)
518{
519 txBoolean result = ((parser->states[0].token == XS_TOKEN_IDENTIFIER) && (parser->states[0].symbol == keyword)) ? 1 : 0;
520 if (result) {
521 if (parser->states[0].escaped)
522 fxReportParserError(parser, parser->states[0].line, "escaped keyword");
523 }
524 return result;
525}
526
527txBoolean fxIsToken(txParser* parser, txToken theToken)
528{

Callers 8

fxExportDeclarationFunction · 0.70
fxImportDeclarationFunction · 0.70
fxSpecifiersFunction · 0.70
fxForStatementFunction · 0.70
xsSyntaxical.cFile · 0.70
fxRelationalExpressionFunction · 0.70
fxNewExpressionFunction · 0.70
fxPropertyNameFunction · 0.70

Calls 1

fxReportParserErrorFunction · 0.85

Tested by

no test coverage detected