addressed CR feedback: renamed update to updateSourceFile

This commit is contained in:
Vladimir Matveev 2015-01-16 18:19:47 -08:00
parent cf8c21893a
commit edc65e1753
2 changed files with 2 additions and 2 deletions

View File

@ -658,7 +658,7 @@ module ts {
// from this SourceFile that are being held onto may change as a result (including
// becoming detached from any SourceFile). It is recommended that this SourceFile not
// be used once 'update' is called on it.
export function update(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange): SourceFile {
export function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange): SourceFile {
if (textChangeRangeIsUnchanged(textChangeRange)) {
// if the text didn't change, then we can just return our current source file as-is.
return sourceFile;

View File

@ -1587,7 +1587,7 @@ module ts {
if (version !== sourceFile.version || isOpen != sourceFile.isOpen) {
// Once incremental parsing is ready, then just call into this function.
if (!disableIncrementalParsing) {
var newSourceFile = update(sourceFile, scriptSnapshot.getText(0, scriptSnapshot.getLength()), textChangeRange);
var newSourceFile = updateSourceFile(sourceFile, scriptSnapshot.getText(0, scriptSnapshot.getLength()), textChangeRange);
setSourceFileFields(newSourceFile, scriptSnapshot, version, isOpen);
return newSourceFile;
}