Refactoring parser/scanner using short-hand
This commit is contained in:
parent
8df64293f9
commit
36cc705fa2
2 changed files with 21 additions and 22 deletions
|
@ -774,13 +774,12 @@ module ts {
|
||||||
if (matchResult) {
|
if (matchResult) {
|
||||||
var start = commentRange.pos;
|
var start = commentRange.pos;
|
||||||
var end = commentRange.end;
|
var end = commentRange.end;
|
||||||
var fileRef = {
|
|
||||||
pos: start,
|
|
||||||
end: end,
|
|
||||||
filename: matchResult[3]
|
|
||||||
};
|
|
||||||
return {
|
return {
|
||||||
fileReference: fileRef,
|
fileReference: {
|
||||||
|
pos: start,
|
||||||
|
end: end,
|
||||||
|
filename: matchResult[3]
|
||||||
|
},
|
||||||
isNoDefaultLib: false
|
isNoDefaultLib: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -944,11 +943,11 @@ module ts {
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
addLabel: addLabel,
|
addLabel,
|
||||||
pushCurrentLabelSet: pushCurrentLabelSet,
|
pushCurrentLabelSet,
|
||||||
pushFunctionBoundary: pushFunctionBoundary,
|
pushFunctionBoundary,
|
||||||
pop: pop,
|
pop,
|
||||||
nodeIsNestedInLabel: nodeIsNestedInLabel,
|
nodeIsNestedInLabel,
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
@ -1674,8 +1673,8 @@ module ts {
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
typeParameters: typeParameters,
|
typeParameters,
|
||||||
parameters: parameters,
|
parameters,
|
||||||
type: type
|
type: type
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -4276,8 +4275,8 @@ module ts {
|
||||||
}
|
}
|
||||||
commentRanges = undefined;
|
commentRanges = undefined;
|
||||||
return {
|
return {
|
||||||
referencedFiles: referencedFiles,
|
referencedFiles,
|
||||||
amdDependencies: amdDependencies
|
amdDependencies
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1167,13 +1167,13 @@ module ts {
|
||||||
hasPrecedingLineBreak: () => precedingLineBreak,
|
hasPrecedingLineBreak: () => precedingLineBreak,
|
||||||
isIdentifier: () => token === SyntaxKind.Identifier || token > SyntaxKind.LastReservedWord,
|
isIdentifier: () => token === SyntaxKind.Identifier || token > SyntaxKind.LastReservedWord,
|
||||||
isReservedWord: () => token >= SyntaxKind.FirstReservedWord && token <= SyntaxKind.LastReservedWord,
|
isReservedWord: () => token >= SyntaxKind.FirstReservedWord && token <= SyntaxKind.LastReservedWord,
|
||||||
reScanGreaterToken: reScanGreaterToken,
|
reScanGreaterToken,
|
||||||
reScanSlashToken: reScanSlashToken,
|
reScanSlashToken,
|
||||||
reScanTemplateToken: reScanTemplateToken,
|
reScanTemplateToken,
|
||||||
scan: scan,
|
scan,
|
||||||
setText: setText,
|
setText,
|
||||||
setTextPos: setTextPos,
|
setTextPos,
|
||||||
tryScan: tryScan,
|
tryScan,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue