Commit Graph
460 Commits
Author SHA1 Message Date
togru d94cbed413 Merge remote-tracking branch 'upstream/master' 2015-02-11 10:12:22 +01:00
Cyrus Najmabadi 5c0b38b203 Remove getEnumMemberValue, it is now subsumed into getConstantValue. 2015-02-05 18:26:56 -08:00
Cyrus Najmabadi c77f732762 CR feedback. 2015-02-05 17:24:46 -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 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
togru 9974526101 updated code style, added tests, fixed regex bug, merged to latest branch 2015-02-05 12:07:00 +01: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 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 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
Vladimir Matveev 288e38fa36 merge with master 2015-02-03 11:26:39 -08:00
Cyrus Najmabadi e63d795b1a Rename function. 2015-02-02 15:55:50 -08:00
Cyrus Najmabadi dd8d3535ff Remove the concept of early errors from the compiler.
Currently only parse errors prevent emitting (And this will be changed in the next
code review as well).
2015-02-02 15:14:19 -08:00
Daniel Rosenwasser e174fe4f47 Merge pull request #1575 from chrisbubernak/betterErrorsForTypesWithSameName
Better errors for types with same name
2015-01-30 21:08:48 -08:00
Ryan Cavanaugh d224286d59 Address CR feedback 2015-01-29 14:37:57 -08:00
Ryan Cavanaugh b7824e8de4 Merge remote-tracking branch 'origin/master' into elaborateErrorsOnce 2015-01-29 11:27:39 -08:00
Anders Hejlsberg 9289cfb0b0 Merge pull request #1803 from Microsoft/enumUnionTypeGuard
Fixes to union types in type guards and instanceof
2015-01-27 06:52:03 -08:00
Anders Hejlsberg a298835f01 Addressing CR feedback 2015-01-26 16:23:21 -08:00
Anders Hejlsberg e5e06d8ca5 Allow union types containing primtives as first argument in instanceof 2015-01-25 16:14:20 -08:00
Anders Hejlsberg 15dcccde7d Improved subtype compatibility for types of object literals 2015-01-24 08:03:29 -08:00
Vladimir Matveev ad42afc4af resolve merge conflicts 2015-01-22 11:23:27 -08:00
Ryan Cavanaugh fa239326f0 Elaborate relational errors at least once when reporting them 2015-01-20 14:18:22 -08:00
Vladimir Matveev cf8c21893a moved update function out of SourceFile 2015-01-16 16:22:11 -08:00
Vladimir Matveev c40977c5fb move getSyntacticDiagnostics out of SourceFile 2015-01-16 12:32:37 -08:00
Vladimir Matveev 45ac06a0f2 move line map related function out of SourceFile 2015-01-16 12:02:12 -08:00
Anders Hejlsberg f9f95ba614 Support for tsconfig.json files in command-line compiler 2015-01-15 13:22:23 -08:00
Anders Hejlsberg 968a56924f Type guard narrows type any in a primitive type check 2015-01-08 14:27:39 -08:00
ChrisBubernak 8808a692e5 rewrote the fix to use a new type format flag and fixed the baselines I broke 2015-01-02 11:04:00 -08:00
Cyrus Najmabadi 12cb284e5d CR feedback. 2014-12-29 16:23:11 -08:00
Cyrus Najmabadi ff9f59c913 Remove unused constants. 2014-12-18 19:43:36 -08:00
Cyrus Najmabadi 67b2f13cce Merge branch 'master' into layering
Conflicts:
	src/compiler/parser.ts
2014-12-18 00:39:56 -08:00
Daniel Rosenwasser 6fed3e2601 Merge pull request #1501 from Arnavion/no-emit
Add -noEmit compiler flag that skips the emit stage in ts.compile()
2014-12-17 18:00:33 -08:00
Cyrus Najmabadi b37b98138d Merge branch 'master' into layering
Conflicts:
	src/compiler/checker.ts
	src/compiler/utilities.ts
2014-12-17 15:35:30 -08:00
Cyrus Najmabadi 6a08c54f42 Merge branch 'master' into sourceFileUpdate
Conflicts:
	src/compiler/checker.ts
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
	src/harness/fourslash.ts
2014-12-17 13:22:04 -08:00
Anders Hejlsberg 766756b4b1 Merge branch 'master' into spreadAndRest
Conflicts:
	src/compiler/parser.ts
2014-12-17 11:49:45 -08:00
Cyrus Najmabadi f459951431 Merge branch 'diagnostics' into sourceFileUpdate
Conflicts:
	src/compiler/parser.ts
2014-12-16 23:48:00 -08:00
Cyrus Najmabadi 5df0ca529e Merge branch 'master' into layering
Conflicts:
	src/compiler/checker.ts
	src/compiler/parser.ts
2014-12-16 23:15:57 -08:00