MCPcopy
hub / github.com/microsoft/pyright / _parseContinueStatement

Method _parseContinueStatement

server/src/parser/parser.ts:862–874  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

860 }
861
862 private _parseContinueStatement(): ContinueNode {
863 let continueToken = this._getKeywordToken(KeywordType.Continue);
864
865 if (!this._isInLoop) {
866 this._addError('"continue" can be used only within a loop',
867 continueToken);
868 } else if (this._isInFinally) {
869 this._addError('"continue" cannot be used within a finally clause',
870 continueToken);
871 }
872
873 return new ContinueNode(continueToken);
874 }
875
876 // return_stmt: 'return' [testlist]
877 private _parseReturnStatement(): ReturnNode {

Callers 1

_parseSmallStatementMethod · 0.95

Calls 2

_getKeywordTokenMethod · 0.95
_addErrorMethod · 0.95

Tested by

no test coverage detected