Fix comments

This commit is contained in:
Yui T 2015-07-06 10:51:43 -07:00
parent 06c9876368
commit 6da98ce897
3 changed files with 15 additions and 12 deletions

View File

@ -12680,10 +12680,6 @@ namespace ts {
break;
case SyntaxKind.FunctionExpression:
case SyntaxKind.ClassExpression:
// The reason we are not using copySymbol for function expression and class expression
// is that copySymbol will not copy a symbol into SymbolTable if the symbol has name prefix
// with "__". Therefore, if class expression or function expression have declared name,
// we will add the symbol into the table using its declared name
let name = (<FunctionExpression|ClassExpression>location).name;
if (name) {
copySymbol(location.symbol, meaning, name.text);

View File

@ -705,8 +705,14 @@ module FourSlash {
}
/**
* Verfiy that the completion list does NOT contain the given symbol. If text, or documentation, or kind are provided,
* the list contains the symbol all given parameters must matched. When any parameter is omitted, the parameters is ignored during comparison.
* Verify that the completion list does NOT contain the given symbol.
* The symbol is considered matched with the symbol in the list if and only if all given parameters must matched.
* When any parameter is omitted, the parameter is ignored during comparison and assumed that the parameter with
* that property of the symbol in the list.
* @param symbol the name of symbol
* @param expectedText the text associated with the symbol
* @param expectedDocumentation the documentation text associated with the symbol
* @param expectedKind the kind of symbol (see ScriptElementKind)
*/
public verifyCompletionListDoesNotContain(symbol: string, expectedText?: string, expectedDocumentation?: string, expectedKind?: string) {
let that = this;

View File

@ -2847,13 +2847,14 @@ namespace ts {
name = stripQuotes(name);
// We can simply return name with strip quotes because the name could be an invalid identifier name
// e.g "b a" is valid quoted name but when we strip off the quotes, it is invalid.
// We, thus, need to check if whatever was inside the quotes is actually a valid identifier name.
if (!name) {
return undefined;
}
// If the user entered name for the symbol was quoted, removing the quotes is not enough, as the name could be an
// invalid identifier name. We need to check if whatever was inside the quotes is actually a valid identifier name.
// e.g "b a" is valid quoted name but when we strip off the quotes, it is invalid.
// We, thus, need to check if whatever was inside the quotes is actually a valid identifier name.
if (performCharacterChecks) {
if (!isIdentifierStart(name.charCodeAt(0), target)) {
return undefined;
@ -3829,10 +3830,10 @@ namespace ts {
}
}
if (symbolFlags & SymbolFlags.Class && !hasAddedSymbolInfo) {
// Special case for class expressions because we would like to indicate that
// the class name is local to the class body (similar to function expression)
// (local class) class <className>
if (getDeclarationOfKind(symbol, SyntaxKind.ClassExpression)) {
// Special case for class expressions because we would like to indicate that
// the class name is local to the class body (similar to function expression)
// (local class) class <className>
pushTypePart(ScriptElementKind.localClassElement);
}
else {