code
stringlengths
24
2.07M
docstring
stringlengths
25
85.3k
func_name
stringlengths
1
92
language
stringclasses
1 value
repo
stringlengths
5
64
path
stringlengths
4
172
url
stringlengths
44
218
license
stringclasses
7 values
function isJSDocType() { switch (token) { case 37 /* AsteriskToken */: case 53 /* QuestionToken */: case 17 /* OpenParenToken */: case 19 /* OpenBracketToken */: case 49 /* ExclamationToken */: ...
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
isJSDocType
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseJSDocTypeExpressionForTests(content, start, length) { initializeState("file.js", content, 2 /* Latest */, /*isJavaScriptFile*/ true, /*_syntaxCursor:*/ undefined); var jsDocTypeExpression = parseJSDocTypeExpression(start, length); var diagnostics = parseDiag...
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseJSDocTypeExpressionForTests
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseJSDocTopLevelType() { var type = parseJSDocType(); if (token === 47 /* BarToken */) { var unionType = createNode(253 /* JSDocUnionType */, type.pos); unionType.types = parseJSDocTypeList(type); type = finishNode(un...
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseJSDocTopLevelType
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseJSDocType() { var type = parseBasicTypeExpression(); while (true) { if (token === 19 /* OpenBracketToken */) { var arrayType = createNode(252 /* JSDocArrayType */, type.pos); arrayType.elementType = type; ...
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseJSDocType
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseBasicTypeExpression() { switch (token) { case 37 /* AsteriskToken */: return parseJSDocAllType(); case 53 /* QuestionToken */: return parseJSDocUnknownOrNullableType(); case 17 /* Op...
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseBasicTypeExpression
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseJSDocThisType() { var result = createNode(264 /* JSDocThisType */); nextToken(); parseExpected(54 /* ColonToken */); result.type = parseJSDocType(); return finishNode(result); }
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseJSDocThisType
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseJSDocConstructorType() { var result = createNode(263 /* JSDocConstructorType */); nextToken(); parseExpected(54 /* ColonToken */); result.type = parseJSDocType(); return finishNode(result); }
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseJSDocConstructorType
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseJSDocVariadicType() { var result = createNode(262 /* JSDocVariadicType */); nextToken(); result.type = parseJSDocType(); return finishNode(result); }
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseJSDocVariadicType
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseJSDocFunctionType() { var result = createNode(261 /* JSDocFunctionType */); nextToken(); parseExpected(17 /* OpenParenToken */); result.parameters = parseDelimitedList(22 /* JSDocFunctionParameters */, parseJSDocParameter); ch...
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseJSDocFunctionType
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseJSDocParameter() { var parameter = createNode(138 /* Parameter */); parameter.type = parseJSDocType(); return finishNode(parameter); }
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseJSDocParameter
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseJSDocOptionalType(type) { var result = createNode(260 /* JSDocOptionalType */, type.pos); nextToken(); result.type = type; return finishNode(result); }
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseJSDocOptionalType
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseJSDocTypeReference() { var result = createNode(259 /* JSDocTypeReference */); result.name = parseSimplePropertyName(); while (parseOptional(21 /* DotToken */)) { if (token === 25 /* LessThanToken */) { result.typeA...
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseJSDocTypeReference
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseTypeArguments() { // Move past the < nextToken(); var typeArguments = parseDelimitedList(23 /* JSDocTypeArguments */, parseJSDocType); checkForTrailingComma(typeArguments); checkForEmptyTypeArgumentList(typeArguments); ...
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseTypeArguments
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function checkForEmptyTypeArgumentList(typeArguments) { if (parseDiagnostics.length === 0 && typeArguments && typeArguments.length === 0) { var start = typeArguments.pos - "<".length; var end = ts.skipTrivia(sourceText, typeArguments.end) + ">".length; ...
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
checkForEmptyTypeArgumentList
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseQualifiedName(left) { var result = createNode(135 /* QualifiedName */, left.pos); result.left = left; result.right = parseIdentifierName(); return finishNode(result); }
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseQualifiedName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseJSDocRecordType() { var result = createNode(257 /* JSDocRecordType */); nextToken(); result.members = parseDelimitedList(24 /* JSDocRecordMembers */, parseJSDocRecordMember); checkForTrailingComma(result.members); parseExpecte...
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseJSDocRecordType
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseJSDocRecordMember() { var result = createNode(258 /* JSDocRecordMember */); result.name = parseSimplePropertyName(); if (token === 54 /* ColonToken */) { nextToken(); result.type = parseJSDocType(); } ...
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseJSDocRecordMember
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseJSDocNonNullableType() { var result = createNode(256 /* JSDocNonNullableType */); nextToken(); result.type = parseJSDocType(); return finishNode(result); }
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseJSDocNonNullableType
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseJSDocTupleType() { var result = createNode(254 /* JSDocTupleType */); nextToken(); result.types = parseDelimitedList(25 /* JSDocTupleTypes */, parseJSDocType); checkForTrailingComma(result.types); parseExpected(20 /* CloseBrac...
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseJSDocTupleType
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function checkForTrailingComma(list) { if (parseDiagnostics.length === 0 && list.hasTrailingComma) { var start = list.end - ",".length; parseErrorAtPosition(start, ",".length, ts.Diagnostics.Trailing_comma_not_allowed); } }
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
checkForTrailingComma
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseJSDocUnionType() { var result = createNode(253 /* JSDocUnionType */); nextToken(); result.types = parseJSDocTypeList(parseJSDocType()); parseExpected(18 /* CloseParenToken */); return finishNode(result); }
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseJSDocUnionType
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseJSDocTypeList(firstType) { ts.Debug.assert(!!firstType); var types = []; types.pos = firstType.pos; types.push(firstType); while (parseOptional(47 /* BarToken */)) { types.push(parseJSDocType()); ...
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseJSDocTypeList
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseJSDocAllType() { var result = createNode(250 /* JSDocAllType */); nextToken(); return finishNode(result); }
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseJSDocAllType
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseJSDocUnknownOrNullableType() { var pos = scanner.getStartPos(); // skip the ? nextToken(); // Need to lookahead to decide if this is a nullable or unknown type. // Here are cases where we'll pick the unknown type: ...
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseJSDocUnknownOrNullableType
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseIsolatedJSDocComment(content, start, length) { initializeState("file.js", content, 2 /* Latest */, /*isJavaScriptFile*/ true, /*_syntaxCursor:*/ undefined); var jsDocComment = parseJSDocComment(/*parent:*/ undefined, start, length); var diagnostics = parseDi...
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseIsolatedJSDocComment
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseJSDocComment(parent, start, length) { var comment = parseJSDocCommentWorker(start, length); if (comment) { fixupParentReferences(comment); comment.parent = parent; } return comment; }
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseJSDocComment
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseJSDocCommentWorker(start, length) { var content = sourceText; start = start || 0; var end = length === undefined ? content.length : start + length; length = end - start; ts.Debug.assert(start >= 0); ts.Debug.as...
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHan...
parseJSDocCommentWorker
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createJSDocComment() { if (!tags) { return undefined; } var result = createNode(265 /* JSDocComment */, start); result.tags = tags; return finishNode(result, end); }
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
createJSDocComment
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function skipWhitespace() { while (pos < end && ts.isWhiteSpace(content.charCodeAt(pos))) { pos++; } }
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
skipWhitespace
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseTag() { ts.Debug.assert(content.charCodeAt(pos - 1) === 64 /* at */); var atToken = createNode(55 /* AtToken */, pos - 1); atToken.end = pos; var tagName = scanIdentifier(); if (!tagName) { ...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
parseTag
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function handleTag(atToken, tagName) { if (tagName) { switch (tagName.text) { case "param": return handleParamTag(atToken, tagName); case "return": case "return...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
handleTag
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function handleUnknownTag(atToken, tagName) { var result = createNode(266 /* JSDocTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; return finishNode(result, pos); }
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
handleUnknownTag
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function addTag(tag) { if (tag) { if (!tags) { tags = []; tags.pos = tag.pos; } tags.push(tag); tags.end = tag.end; } ...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
addTag
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function tryParseTypeExpression() { skipWhitespace(); if (content.charCodeAt(pos) !== 123 /* openBrace */) { return undefined; } var typeExpression = parseJSDocTypeExpression(pos, end - pos); pos ...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
tryParseTypeExpression
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function handleParamTag(atToken, tagName) { var typeExpression = tryParseTypeExpression(); skipWhitespace(); var name; var isBracketed; if (content.charCodeAt(pos) === 91 /* openBracket */) { pos+...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
handleParamTag
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function handleReturnTag(atToken, tagName) { if (ts.forEach(tags, function (t) { return t.kind === 268 /* JSDocReturnTag */; })) { parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } ...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
handleReturnTag
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function handleTypeTag(atToken, tagName) { if (ts.forEach(tags, function (t) { return t.kind === 269 /* JSDocTypeTag */; })) { parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } ...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
handleTypeTag
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function handleTemplateTag(atToken, tagName) { if (ts.forEach(tags, function (t) { return t.kind === 270 /* JSDocTemplateTag */; })) { parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } ...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
handleTemplateTag
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function scanIdentifier() { var startPos = pos; for (; pos < end; pos++) { var ch = content.charCodeAt(pos); if (pos === startPos && ts.isIdentifierStart(ch, 2 /* Latest */)) { continue; ...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
scanIdentifier
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) { aggressiveChecks = aggressiveChecks || ts.Debug.shouldAssert(2 /* Aggressive */); checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks); if (ts.textChangeRangeIsUnchanged(textChange...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
updateSourceFile
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function moveElementEntirelyPastChangeRange(element, isArray, delta, oldText, newText, aggressiveChecks) { if (isArray) { visitArray(element); } else { visitNode(element); } return; function visitNode(node) { ...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
moveElementEntirelyPastChangeRange
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function visitNode(node) { var text = ""; if (aggressiveChecks && shouldCheckNode(node)) { text = oldText.substring(node.pos, node.end); } // Ditch any existing LS children we may have created. This way we can avoid // ...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
visitNode
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function visitArray(array) { array._children = undefined; array.pos += delta; array.end += delta; for (var _i = 0, array_7 = array; _i < array_7.length; _i++) { var node = array_7[_i]; visitNode(node); ...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
visitArray
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function shouldCheckNode(node) { switch (node.kind) { case 9 /* StringLiteral */: case 8 /* NumericLiteral */: case 69 /* Identifier */: return true; } return false; }
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
shouldCheckNode
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function adjustIntersectingElement(element, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta) { ts.Debug.assert(element.end >= changeStart, "Adjusting an element that was entirely before the change range"); ts.Debug.assert(element.pos <= changeRangeOldEnd, "Adjusting an element that was ...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
adjustIntersectingElement
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function checkNodePositions(node, aggressiveChecks) { if (aggressiveChecks) { var pos = node.pos; forEachChild(node, function (child) { ts.Debug.assert(child.pos >= pos); pos = child.end; }); ts.Debug.ass...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
checkNodePositions
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function updateTokenPositionsAndMarkElements(sourceFile, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta, oldText, newText, aggressiveChecks) { visitNode(sourceFile); return; function visitNode(child) { ts.Debug.assert(child.pos <= child.end); ...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
updateTokenPositionsAndMarkElements
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function visitNode(child) { ts.Debug.assert(child.pos <= child.end); if (child.pos > changeRangeOldEnd) { // Node is entirely past the change range. We need to move both its pos and // end, forward or backward appropriately. mo...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
visitNode
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function visitArray(array) { ts.Debug.assert(array.pos <= array.end); if (array.pos > changeRangeOldEnd) { // Array is entirely after the change range. We need to move it, and move any of // its children. moveElementEntirelyPas...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
visitArray
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function extendToAffectedRange(sourceFile, changeRange) { // Consider the following code: // void foo() { /; } // // If the text changes with an insertion of / just before the semicolon then we end up with: // void foo() { //; } // ...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
extendToAffectedRange
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function findNearestNodeStartingBeforeOrAtPosition(sourceFile, position) { var bestResult = sourceFile; var lastNodeEntirelyBeforePosition; forEachChild(sourceFile, visit); if (lastNodeEntirelyBeforePosition) { var lastChildOfLastEntireNodeBeforePosition =...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
findNearestNodeStartingBeforeOrAtPosition
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getLastChild(node) { while (true) { var lastChild = getLastChildWorker(node); if (lastChild) { node = lastChild; } else { return node; } ...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
getLastChild
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getLastChildWorker(node) { var last = undefined; forEachChild(node, function (child) { if (ts.nodeIsPresent(child)) { last = child; } }); return last; }
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
getLastChildWorker
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function visit(child) { if (ts.nodeIsMissing(child)) { // Missing nodes are effectively invisible to us. We never even consider them // When trying to find the nearest node before us. return; } // If the child i...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
visit
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks) { var oldText = sourceFile.text; if (textChangeRange) { ts.Debug.assert((oldText.length - textChangeRange.span.length + textChangeRange.newLength) === newText.length); if (aggressive...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
checkChangeRange
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createSyntaxCursor(sourceFile) { var currentArray = sourceFile.statements; var currentArrayIndex = 0; ts.Debug.assert(currentArrayIndex < currentArray.length); var current = currentArray[currentArrayIndex]; var lastQueriedPosition = -1 /* Value */; ...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
createSyntaxCursor
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function visitNode(node) { if (position >= node.pos && position < node.end) { // Position was within this node. Keep searching deeper to find the node. forEachChild(node, visitNode, visitArray); // don't procede any futher in t...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
visitNode
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function visitArray(array) { if (position >= array.pos && position < array.end) { // position was in this array. Search through this array to see if we find a // viable element. for (var i = 0, n = array.length; i < n; i++) { ...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
visitArray
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function or(state1, state2) { return (state1 | state2) & 2 /* Reachable */ ? 2 /* Reachable */ : (state1 & state2) & 8 /* ReportedUnreachable */ ? 8 /* ReportedUnreachable */ : 4 /* Unreachable */; }
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
or
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getModuleInstanceState(node) { // A module is uninstantiated if it contains only // 1. interface declarations, type alias declarations if (node.kind === 215 /* InterfaceDeclaration */ || node.kind === 216 /* TypeAliasDeclaration */) { return 0 /* NonInstantiated */; ...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
getModuleInstanceState
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bindSourceFile(file, options) { var start = new Date().getTime(); binder(file, options); ts.bindTime += new Date().getTime() - start; }
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
bindSourceFile
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createBinder() { var file; var options; var parent; var container; var blockScopeContainer; var lastContainer; var seenThisKeyword; // state used by reachability checks var hasExplicitReturn; var currentReachabilityState; v...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
createBinder
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bindSourceFile(f, opts) { file = f; options = opts; inStrictMode = !!file.externalModuleIndicator; classifiableNames = {}; Symbol = ts.objectAllocator.getSymbolConstructor(); if (!file.locals) { bind(file); ...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
bindSourceFile
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createSymbol(flags, name) { symbolCount++; return new Symbol(flags, name); }
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
createSymbol
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function addDeclarationToSymbol(symbol, node, symbolFlags) { symbol.flags |= symbolFlags; node.symbol = symbol; if (!symbol.declarations) { symbol.declarations = []; } symbol.declarations.push(node); if (symbolFlags & 1952 /* HasExp...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
addDeclarationToSymbol
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getDeclarationName(node) { if (node.name) { if (node.kind === 218 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */) { return "\"" + node.name.text + "\""; } if (node.name.kind === 136 /* ComputedPropertyName */) ...
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
getDeclarationName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getDisplayName(node) { return node.name ? ts.declarationNameToString(node.name) : getDeclarationName(node); }
".length; pos < end;) { var ch = content.charCodeAt(pos); pos++; if (ch === 64 /* at
getDisplayName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function declareSymbol(symbolTable, parent, node, includes, excludes) { ts.Debug.assert(!ts.hasDynamicName(node)); var isDefaultExport = node.flags & 512 /* Default */; // The exported symbol for an export default function/class node is always named "default" var name = i...
Declares a Symbol for the node and adds it to symbols. Reports errors for conflicting identifier names. @param symbolTable - The symbol table which node will be added to. @param parent - node's parent declaration. @param node - The declaration to be added to the symbol table @param includes - The SymbolFlags that node ...
declareSymbol
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function declareModuleMember(node, symbolFlags, symbolExcludes) { var hasExportModifier = ts.getCombinedNodeFlags(node) & 2 /* Export */; if (symbolFlags & 8388608 /* Alias */) { if (node.kind === 230 /* ExportSpecifier */ || (node.kind === 221 /* ImportEqualsDeclaration */ && ha...
Declares a Symbol for the node and adds it to symbols. Reports errors for conflicting identifier names. @param symbolTable - The symbol table which node will be added to. @param parent - node's parent declaration. @param node - The declaration to be added to the symbol table @param includes - The SymbolFlags that node ...
declareModuleMember
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bindChildren(node) { // Before we recurse into a node's chilren, we first save the existing parent, container // and block-container. Then after we pop out of processing the children, we restore // these saved values. var saveParent = parent; var sav...
Declares a Symbol for the node and adds it to symbols. Reports errors for conflicting identifier names. @param symbolTable - The symbol table which node will be added to. @param parent - node's parent declaration. @param node - The declaration to be added to the symbol table @param includes - The SymbolFlags that node ...
bindChildren
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bindReachableStatement(node) { if (checkUnreachable(node)) { ts.forEachChild(node, bind); return; } switch (node.kind) { case 198 /* WhileStatement */: bindWhileStatement(node); break; ...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
bindReachableStatement
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bindWhileStatement(n) { var preWhileState = n.expression.kind === 84 /* FalseKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; var postWhileState = n.expression.kind === 99 /* TrueKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; // bind expressions (do...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
bindWhileStatement
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bindDoStatement(n) { var preDoState = currentReachabilityState; var postDoLabel = pushImplicitLabel(); bind(n.statement); var postDoState = n.expression.kind === 99 /* TrueKeyword */ ? 4 /* Unreachable */ : preDoState; popImplicitLabel(postDoLabel, po...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
bindDoStatement
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bindForStatement(n) { var preForState = currentReachabilityState; var postForLabel = pushImplicitLabel(); // bind expressions (don't affect reachability) bind(n.initializer); bind(n.condition); bind(n.incrementor); bind(n.state...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
bindForStatement
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bindForInOrForOfStatement(n) { var preStatementState = currentReachabilityState; var postStatementLabel = pushImplicitLabel(); // bind expressions (don't affect reachability) bind(n.initializer); bind(n.expression); bind(n.statement); ...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
bindForInOrForOfStatement
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bindIfStatement(n) { // denotes reachability state when entering 'thenStatement' part of the if statement: // i.e. if condition is false then thenStatement is unreachable var ifTrueState = n.expression.kind === 84 /* FalseKeyword */ ? 4 /* Unreachable */ : currentReachabili...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
bindIfStatement
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bindReturnOrThrow(n) { // bind expression (don't affect reachability) bind(n.expression); if (n.kind === 204 /* ReturnStatement */) { hasExplicitReturn = true; } currentReachabilityState = 4 /* Unreachable */; }
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
bindReturnOrThrow
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bindBreakOrContinueStatement(n) { // call bind on label (don't affect reachability) bind(n.label); // for continue case touch label so it will be marked a used var isValidJump = jumpToLabel(n.label, n.kind === 203 /* BreakStatement */ ? currentReachabilityState :...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
bindBreakOrContinueStatement
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bindTryStatement(n) { // catch\finally blocks has the same reachability as try block var preTryState = currentReachabilityState; bind(n.tryBlock); var postTryState = currentReachabilityState; currentReachabilityState = preTryState; bind(n....
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
bindTryStatement
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bindSwitchStatement(n) { var preSwitchState = currentReachabilityState; var postSwitchLabel = pushImplicitLabel(); // bind expression (don't affect reachability) bind(n.expression); bind(n.caseBlock); var hasDefault = ts.forEach(n.caseBloc...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
bindSwitchStatement
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bindCaseBlock(n) { var startState = currentReachabilityState; for (var _i = 0, _a = n.clauses; _i < _a.length; _i++) { var clause = _a[_i]; currentReachabilityState = startState; bind(clause); if (clause.statements.length &...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
bindCaseBlock
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bindLabeledStatement(n) { // call bind on label (don't affect reachability) bind(n.label); var ok = pushNamedLabel(n.label); bind(n.statement); if (ok) { popNamedLabel(n.label, currentReachabilityState); } }
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
bindLabeledStatement
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getContainerFlags(node) { switch (node.kind) { case 186 /* ClassExpression */: case 214 /* ClassDeclaration */: case 215 /* InterfaceDeclaration */: case 217 /* EnumDeclaration */: case 155 /* TypeLiteral */: ...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
getContainerFlags
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function addToContainerChain(next) { if (lastContainer) { lastContainer.nextContainer = next; } lastContainer = next; }
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
addToContainerChain
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { // Just call this directly so that the return type of this function stays "void". declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes); }
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
declareSymbolAndAddToSymbolTable
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes) { switch (container.kind) { // Modules, source files, and classes need specialized handling for how their // members are declared (for example, a member of a class will go into a specific ...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
declareSymbolAndAddToSymbolTableWorker
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function declareClassMember(node, symbolFlags, symbolExcludes) { return node.flags & 64 /* Static */ ? declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes) : declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, s...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
declareClassMember
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function declareSourceFileMember(node, symbolFlags, symbolExcludes) { return ts.isExternalModule(file) ? declareModuleMember(node, symbolFlags, symbolExcludes) : declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes); }
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
declareSourceFileMember
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function hasExportDeclarations(node) { var body = node.kind === 248 /* SourceFile */ ? node : node.body; if (body.kind === 248 /* SourceFile */ || body.kind === 219 /* ModuleBlock */) { for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { var stat = ...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
hasExportDeclarations
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function setExportContextFlag(node) { // A declaration source file or ambient module declaration that contains no export declarations (but possibly regular // declarations with export modifiers) is an export context in which declarations are implicitly exported. if (ts.isInAmbientCon...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
setExportContextFlag
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bindModuleDeclaration(node) { setExportContextFlag(node); if (node.name.kind === 9 /* StringLiteral */) { declareSymbolAndAddToSymbolTable(node, 512 /* ValueModule */, 106639 /* ValueModuleExcludes */); } else { var state = getModu...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
bindModuleDeclaration
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bindFunctionOrConstructorType(node) { // For a given function symbol "<...>(...) => T" we want to generate a symbol identical // to the one we would get for: { <...>(...): T } // // We do that by making an anonymous type literal symbol, and then setting the funct...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
bindFunctionOrConstructorType
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bindObjectLiteralExpression(node) { var ElementKind; (function (ElementKind) { ElementKind[ElementKind["Property"] = 1] = "Property"; ElementKind[ElementKind["Accessor"] = 2] = "Accessor"; })(ElementKind || (ElementKind = {})); if ...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
bindObjectLiteralExpression
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bindAnonymousDeclaration(node, symbolFlags, name) { var symbol = createSymbol(symbolFlags, name); addDeclarationToSymbol(symbol, node, symbolFlags); }
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
bindAnonymousDeclaration
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { case 218 /* ModuleDeclaration */: declareModuleMember(node, symbolFlags, symbolExcludes); break; case 248 /* SourceFile */: ...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
bindBlockScopedDeclaration
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bindBlockScopedVariableDeclaration(node) { bindBlockScopedDeclaration(node, 2 /* BlockScopedVariable */, 107455 /* BlockScopedVariableExcludes */); }
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
bindBlockScopedVariableDeclaration
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function checkStrictModeIdentifier(node) { if (inStrictMode && node.originalKeywordKind >= 106 /* FirstFutureReservedWord */ && node.originalKeywordKind <= 114 /* LastFutureReservedWord */ && !ts.isIdentifierName(node)) { // Report error only i...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
checkStrictModeIdentifier
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getStrictModeIdentifierMessage(node) { // Provide specialized messages to help the user understand why we think they're in // strict mode. if (ts.getContainingClass(node)) { return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_d...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
getStrictModeIdentifierMessage
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function checkStrictModeBinaryExpression(node) { if (inStrictMode && ts.isLeftHandSideExpression(node.left) && ts.isAssignmentOperator(node.operatorToken.kind)) { // ECMA 262 (Annex C) The identifier eval or arguments may not appear as the LeftHandSideExpression of an // Assi...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
checkStrictModeBinaryExpression
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function checkStrictModeCatchClause(node) { // It is a SyntaxError if a TryStatement with a Catch occurs within strict code and the Identifier of the // Catch production is eval or arguments if (inStrictMode && node.variableDeclaration) { checkStrictModeEvalOrArgument...
Returns true if node and its subnodes were successfully traversed. Returning false means that node was not examined and caller needs to dive into the node himself.
checkStrictModeCatchClause
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT