MCPcopy Index your code
hub / github.com/reactjs/react-rails / parseContinueStatement

Function parseContinueStatement

lib/assets/javascripts/JSXTransformer.js:7607–7646  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7605 // 12.7 The continue statement
7606
7607 function parseContinueStatement() {
7608 var label = null, marker = markerCreate();
7609
7610 expectKeyword('continue');
7611
7612 // Optimize the most common form: 'continue;'.
7613 if (source.charCodeAt(index) === 59) {
7614 lex();
7615
7616 if (!state.inIteration) {
7617 throwError({}, Messages.IllegalContinue);
7618 }
7619
7620 return markerApply(marker, delegate.createContinueStatement(null));
7621 }
7622
7623 if (peekLineTerminator()) {
7624 if (!state.inIteration) {
7625 throwError({}, Messages.IllegalContinue);
7626 }
7627
7628 return markerApply(marker, delegate.createContinueStatement(null));
7629 }
7630
7631 if (lookahead.type === Token.Identifier) {
7632 label = parseVariableIdentifier();
7633
7634 if (!state.labelSet.has(label.name)) {
7635 throwError({}, Messages.UnknownLabel, label.name);
7636 }
7637 }
7638
7639 consumeSemicolon();
7640
7641 if (label === null && !state.inIteration) {
7642 throwError({}, Messages.IllegalContinue);
7643 }
7644
7645 return markerApply(marker, delegate.createContinueStatement(label));
7646 }
7647
7648 // 12.8 The break statement
7649

Callers 1

parseStatementFunction · 0.85

Calls 8

markerCreateFunction · 0.85
expectKeywordFunction · 0.85
lexFunction · 0.85
throwErrorFunction · 0.85
markerApplyFunction · 0.85
peekLineTerminatorFunction · 0.85
parseVariableIdentifierFunction · 0.85
consumeSemicolonFunction · 0.85

Tested by

no test coverage detected