merge with origin/master

This commit is contained in:
Vladimir Matveev
2016-01-04 12:07:26 -08:00
95 changed files with 773 additions and 751 deletions

View File

@@ -362,7 +362,8 @@ namespace ts {
function parseStrings(args: string[]) {
let i = 0;
while (i < args.length) {
let s = args[i++];
let s = args[i];
i++;
if (s.charCodeAt(0) === CharacterCodes.at) {
parseResponseFile(s.slice(1));
}
@@ -388,18 +389,21 @@ namespace ts {
switch (opt.type) {
case "number":
options[opt.name] = parseInt(args[i++]);
options[opt.name] = parseInt(args[i]);
i++;
break;
case "boolean":
options[opt.name] = true;
break;
case "string":
options[opt.name] = args[i++] || "";
options[opt.name] = args[i] || "";
i++;
break;
// If not a primitive, the possible types are specified in what is effectively a map of options.
default:
let map = <Map<number>>opt.type;
let key = (args[i++] || "").toLowerCase();
let key = (args[i] || "").toLowerCase();
i++;
if (hasProperty(map, key)) {
options[opt.name] = map[key];
}