Commit Graph

1713 Commits

Author SHA1 Message Date
Cyrus Najmabadi
2eb1a213c7 Prevent index out of bounds exception. 2015-02-09 14:55:54 -08:00
Cyrus Najmabadi
17dd6c2de0 Be more conservative about reusing parameters. 2015-02-09 14:40:03 -08:00
Cyrus Najmabadi
a79e8e928b Remove code duplication in isModuleElement. 2015-02-09 14:34:47 -08:00
Cyrus Najmabadi
e417f3016b Add additional asserts, and make code more unified. 2015-02-09 14:23:55 -08:00
Cyrus Najmabadi
d37fdfe213 Add additional asserts. 2015-02-09 14:12:32 -08:00
Cyrus Najmabadi
318aa8ce7a Don't use dynamic type checks while incrementally parsing. 2015-02-09 14:07:09 -08:00
Cyrus Najmabadi
d0aa7891de Add additional incremental assert. 2015-02-08 18:02:13 -08:00
Cyrus Najmabadi
9d6b6b422a Rename a few members and clean up comments. 2015-02-08 17:48:56 -08:00
Cyrus Najmabadi
ad7c77ea08 Check the text change range before and after we expand it. 2015-02-08 17:35:54 -08:00
Cyrus Najmabadi
1a17fd1daf Move assertions into the parsing layer. 2015-02-08 17:30:27 -08:00
Cyrus Najmabadi
a82c57c4b9 Make sure positions of child elements are consistent. 2015-02-08 16:40:04 -08:00
Cyrus Najmabadi
f1cb97b692 Add additional aggressive checks during incremental parsing. 2015-02-08 16:10:16 -08:00
CyrusNajmabadi
911a705e8d Merge pull request #1974 from Microsoft/multiLineEmitting
Preserve single line blocks when emitting.
2015-02-06 22:00:41 -05:00
Cyrus Najmabadi
36b6f4e1b7 Preserve single line blocks when emitting. 2015-02-06 18:45:09 -08:00
Cyrus Najmabadi
449f4a4f37 Have better error recovery for whne a user uses semicolons instead of commas to delimit an object literal. 2015-02-06 17:30:29 -08:00
Cyrus Najmabadi
5c0b38b203 Remove getEnumMemberValue, it is now subsumed into getConstantValue. 2015-02-05 18:26:56 -08:00
Cyrus Najmabadi
6ed9741a7a Extract common function. 2015-02-05 18:11:21 -08:00
Cyrus Najmabadi
acbcd6c77f Merge branch 'master' into diagnosticsOrganization 2015-02-05 17:30:27 -08:00
Cyrus Najmabadi
c77f732762 CR feedback. 2015-02-05 17:24:46 -08:00
Cyrus Najmabadi
f9d3b489f2 Put curly on the right line. 2015-02-05 17:11:06 -08:00
Cyrus Najmabadi
66a363f449 Simplify the API for emitting and reporting exit statuses to callers. 2015-02-05 15:50:18 -08:00
Cyrus Najmabadi
e7f6693eda Move code for emitting above helper functions. 2015-02-05 14:46:50 -08:00
Cyrus Najmabadi
b0061c1420 Emit both javascript and declarations in the presence of errors (*unless* -noEmitOnError is specified). 2015-02-05 14:41:04 -08:00
Cyrus Najmabadi
ea4e3de91c Remove unnecessary diagnostics split on SourceFile. 2015-02-05 13:38:11 -08:00
Jason Ramsay
953e568d9e Disallow rename for elements that are defined in the standard TypeScript library. 2015-02-05 13:32:33 -08:00
Cyrus Najmabadi
f20fbb9726 Remove what looks like copy/paste errors in the parser. 2015-02-05 13:14:41 -08:00
Cyrus Najmabadi
c1dfdaa436 Simplify code for getting diagnostics in the Program. 2015-02-05 02:15:38 -08:00
Cyrus Najmabadi
337a99f62a Change the API for getting diagnostics so that all calls go through a Program instance. 2015-02-05 01:47:29 -08:00
Cyrus Najmabadi
b12be3db19 Remove dependency from the typechecker to the compiler host.
This also lets us not expose the compiler host from the Program instance.
The compiler host was only needed by the type checker to get the host newline.
The host newline was used for concatenating diagnostic message chains.  Now
we don't concatenate them up front.  Instead, we just store the message chain
in the diagnostic itself.  Then when we pass it to the host, it can then decide
what newline to use.
2015-02-04 23:20:26 -08:00
Cyrus Najmabadi
de30866460 Simplify the code for actually compiling within tsc. 2015-02-04 22:26:03 -08:00
Cyrus Najmabadi
28c1a23e7c Track performance statistics in the ts module.
This allows us to greatly simplify the compile function in tsc.
2015-02-04 18:42:44 -08:00
Cyrus Najmabadi
3cadb3c30c Use a diagnostics collection inside the program instance. 2015-02-04 18:12:13 -08:00
Cyrus Najmabadi
d8a7e376f1 Update comment. 2015-02-04 17:58:19 -08:00
Cyrus Najmabadi
476c8249ac Remove 'isEmitBlocked' from the program API.
If emitting is blocked, then calling .emit on the program will simply return
immediately with an appropriate reason given in the EmitResult.
2015-02-04 17:48:29 -08:00
Cyrus Najmabadi
2a1d78d9e3 Simplify the createProgram API.
Allow the host parameter to be optional to simplify command line programs.
2015-02-04 17:02:26 -08:00
Cyrus Najmabadi
bb307f8163 Simplify the API for emitting code from the Program instance. 2015-02-04 16:53:14 -08:00
Cyrus Najmabadi
b6d083fa40 Do not publicly expose a way on a Program instance to get typecheckers with differing behavior.
Now, you can only get the non-diagnostics, pull-type-checker from the Program instance.
If you want diagnostics, you simply ask the Program instance for the diagnostics you want.
2015-02-04 16:11:38 -08:00
Cyrus Najmabadi
5b049feb36 Hide the diagnostic producing methods from TypeChecker.
Instead, consumers should get these diagnostics through the Program instance.
2015-02-04 14:29:25 -08:00
Cyrus Najmabadi
c7160ddb31 Rename semanticDiagnostics to bindDiagnotics. 2015-02-04 13:31:36 -08:00
Cyrus Najmabadi
9fac51b108 Make more diagnostic features internal so they're not exposed in our DTS. 2015-02-04 13:22:28 -08:00
Cyrus Najmabadi
35a6d0e68a Introduce an object to store and manage diagnostics for different compiler components. 2015-02-04 13:04:42 -08:00
CyrusNajmabadi
de13648c9f Merge pull request #1918 from Microsoft/filename
Fix spelling of 'Filename' to be 'FileName'.
2015-02-03 20:05:58 -05:00
Cyrus Najmabadi
95702a89a7 Fix spelling of 'Filename' to be 'FileName'. 2015-02-03 16:08:46 -08:00
Cyrus Najmabadi
c9ef4db99a Make more sourcefile data internal. 2015-02-03 15:03:50 -08:00
Cyrus Najmabadi
2ee134c6b3 Remove certain lazyily initialized fields from the public DTS.
These should not be accessed directly.  They should be obtained by calling into the appropriate
helper functions.
2015-02-03 13:47:46 -08:00
CyrusNajmabadi
fab351e0b6 Merge pull request #1913 from Microsoft/internalDTS
Provide an experimental flag that allows us to emit declarations except for nodes marked with '@internal'.
2015-02-03 16:29:04 -05:00
Cyrus Najmabadi
838b9b6998 Provide an experimental flag that allows us to emit declarations except for nodes marked with '@internal'. 2015-02-03 13:15:28 -08:00
Cyrus Najmabadi
0ca03048cf Move the code to actually emit higher up in the function.
Now it it precedes all the other function declarations, and is much easier to debug.
2015-02-03 12:46:01 -08:00
Vladimir Matveev
288e38fa36 merge with master 2015-02-03 11:26:39 -08:00
Mohamed Hegazy
d6bd9f74d2 Merge branch 'master' into LSAPICleanup 2015-02-02 18:49:13 -08:00