MCPcopy Index your code
hub / github.com/nodejs/node / parseDoStatement

Function parseDoStatement

test/fixtures/snapshot/typescript.js:35890–35906  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35888 return withJSDoc(finishNode(factory.createIfStatement(expression, thenStatement, elseStatement), pos), hasJSDoc);
35889 }
35890 function parseDoStatement() {
35891 var pos = getNodePos();
35892 var hasJSDoc = hasPrecedingJSDocComment();
35893 parseExpected(90 /* SyntaxKind.DoKeyword */);
35894 var statement = parseStatement();
35895 parseExpected(115 /* SyntaxKind.WhileKeyword */);
35896 var openParenPosition = scanner.getTokenPos();
35897 var openParenParsed = parseExpected(20 /* SyntaxKind.OpenParenToken */);
35898 var expression = allowInAnd(parseExpression);
35899 parseExpectedMatchingBrackets(20 /* SyntaxKind.OpenParenToken */, 21 /* SyntaxKind.CloseParenToken */, openParenParsed, openParenPosition);
35900 // From: https://mail.mozilla.org/pipermail/es-discuss/2011-August/016188.html
35901 // 157 min --- All allen at wirfs-brock.com CONF --- "do{;}while(false)false" prohibited in
35902 // spec but allowed in consensus reality. Approved -- this is the de-facto standard whereby
35903 // do;while(0)x will have a semicolon inserted before x.
35904 parseOptional(26 /* SyntaxKind.SemicolonToken */);
35905 return withJSDoc(finishNode(factory.createDoStatement(statement, expression), pos), hasJSDoc);
35906 }
35907 function parseWhileStatement() {
35908 var pos = getNodePos();
35909 var hasJSDoc = hasPrecedingJSDocComment();

Callers 1

parseStatementFunction · 0.85

Calls 9

getNodePosFunction · 0.85
hasPrecedingJSDocCommentFunction · 0.85
parseExpectedFunction · 0.85
parseStatementFunction · 0.85
allowInAndFunction · 0.85
parseOptionalFunction · 0.85
withJSDocFunction · 0.85
finishNodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…