added comments

This commit is contained in:
Vladimir Matveev
2014-12-01 15:50:17 -08:00
parent 7358b0f7d3
commit 5286f87b48

View File

@@ -146,6 +146,10 @@ module ts.formatting {
if (lastTokenInfo && expectedScanAction === lastScanAction) {
// readTokenInfo was called before with the same expected scan action.
// No need to re-scan text, return existing 'lastTokenInfo'
// it is ok to call fixTokenKind here since it does not affect
// what portion of text is consumed. In opposize rescanning can change it,
// i.e. for '>=' when originally scanner eats just one character
// and rescanning forces it to consume more.
return fixTokenKind(lastTokenInfo, n);
}