Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 00a4953

Browse filesBrowse files
Initial refactoring to support doing grammar checks as a separate pass of the tree.
Right now, this means hiding 'syntacticDiagnostics' behind a getter function that only computes all the syntactic diagnostics (parser+grammar checks) lazily. This will help incremental parsing out as we can reuse nodes that have grammar errors in them, and we dont' have to even do grammar checks if this is not the full-type-check type-checker.
1 parent a9cf216 commit 00a4953
Copy full SHA for 00a4953

6 files changed

+96-57Lines changed: 96 additions & 57 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/compiler/binder.ts‎

Copy file name to clipboardExpand all lines: src/compiler/binder.ts
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ module ts {
125125
: Diagnostics.Duplicate_identifier_0;
126126

127127
forEach(symbol.declarations, declaration => {
128-
file.semanticErrors.push(createDiagnosticForNode(declaration.name, message, getDisplayName(declaration)));
128+
file.semanticDiagnostics.push(createDiagnosticForNode(declaration.name, message, getDisplayName(declaration)));
129129
});
130-
file.semanticErrors.push(createDiagnosticForNode(node.name, message, getDisplayName(node)));
130+
file.semanticDiagnostics.push(createDiagnosticForNode(node.name, message, getDisplayName(node)));
131131

132132
symbol = createSymbol(0, name);
133133
}
@@ -148,7 +148,7 @@ module ts {
148148
if (node.name) {
149149
node.name.parent = node;
150150
}
151-
file.semanticErrors.push(createDiagnosticForNode(symbol.exports[prototypeSymbol.name].declarations[0],
151+
file.semanticDiagnostics.push(createDiagnosticForNode(symbol.exports[prototypeSymbol.name].declarations[0],
152152
Diagnostics.Duplicate_identifier_0, prototypeSymbol.name));
153153
}
154154
symbol.exports[prototypeSymbol.name] = prototypeSymbol;
Collapse file

‎src/compiler/checker.ts‎

Copy file name to clipboardExpand all lines: src/compiler/checker.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9143,7 +9143,7 @@ module ts {
91439143
// Bind all source files and propagate errors
91449144
forEach(program.getSourceFiles(), file => {
91459145
bindSourceFile(file);
9146-
forEach(file.semanticErrors, addDiagnostic);
9146+
forEach(file.semanticDiagnostics, addDiagnostic);
91479147
});
91489148
// Initialize global symbol table
91499149
forEach(program.getSourceFiles(), file => {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.