Merge pull request #4375 from basarat/fix/shebang-trivia-scan

fix(scanner) try a trivia scan only if pos === 0
This commit is contained in:
Mohamed Hegazy 2015-08-20 01:29:25 -07:00
commit 229c470025

View file

@ -472,7 +472,7 @@ namespace ts {
break;
case CharacterCodes.hash:
if (isShebangTrivia(text, pos)) {
if (pos === 0 && isShebangTrivia(text, pos)) {
pos = scanShebangTrivia(text, pos);
continue;
}