Refactoring parser/scanner using short-hand

This commit is contained in:
Yui T 2014-11-18 11:54:50 -08:00
parent 8df64293f9
commit 36cc705fa2
2 changed files with 21 additions and 22 deletions

View file

@ -774,13 +774,12 @@ module ts {
if (matchResult) {
var start = commentRange.pos;
var end = commentRange.end;
var fileRef = {
pos: start,
end: end,
filename: matchResult[3]
};
return {
fileReference: fileRef,
fileReference: {
pos: start,
end: end,
filename: matchResult[3]
},
isNoDefaultLib: false
};
}
@ -944,11 +943,11 @@ module ts {
}
return {
addLabel: addLabel,
pushCurrentLabelSet: pushCurrentLabelSet,
pushFunctionBoundary: pushFunctionBoundary,
pop: pop,
nodeIsNestedInLabel: nodeIsNestedInLabel,
addLabel,
pushCurrentLabelSet,
pushFunctionBoundary,
pop,
nodeIsNestedInLabel,
};
})();
@ -1674,8 +1673,8 @@ module ts {
}
return {
typeParameters: typeParameters,
parameters: parameters,
typeParameters,
parameters,
type: type
};
}
@ -4276,8 +4275,8 @@ module ts {
}
commentRanges = undefined;
return {
referencedFiles: referencedFiles,
amdDependencies: amdDependencies
referencedFiles,
amdDependencies
};
}

View file

@ -1167,13 +1167,13 @@ module ts {
hasPrecedingLineBreak: () => precedingLineBreak,
isIdentifier: () => token === SyntaxKind.Identifier || token > SyntaxKind.LastReservedWord,
isReservedWord: () => token >= SyntaxKind.FirstReservedWord && token <= SyntaxKind.LastReservedWord,
reScanGreaterToken: reScanGreaterToken,
reScanSlashToken: reScanSlashToken,
reScanTemplateToken: reScanTemplateToken,
scan: scan,
setText: setText,
setTextPos: setTextPos,
tryScan: tryScan,
reScanGreaterToken,
reScanSlashToken,
reScanTemplateToken,
scan,
setText,
setTextPos,
tryScan,
};
}
}