TypeScript/tests/cases/compiler/uncaughtCompilerError1.ts
2014-07-12 17:30:19 -07:00

14 lines
522 B
TypeScript

declare var index, lineTokens, token, tokens;
function f() {
if (lineTokens[index].trim() === '=' && index > 0 && token.type === '' && tokens[index - 1].type === 'attribute.name.html') {
if (index === (tokens.length - 1)) {
return { appendText: '\"\"', advanceCount: 1 };
}
else if (tokens[index + 1].type !== 'attribute.value.html' && tokens[index + 1].type !== '') {
return { appendText: '\"\"', advanceCount: 1 };
}
return null;
}
}