865 Commits

Author SHA1 Message Date
Arthur Ozga
1608845f33 merged with master 2015-07-01 13:51:27 -07:00
Ron Buckton
4b4a96b9dc Merge branch 'master' into asyncFunctions 2015-07-01 09:27:45 -07:00
Arthur Ozga
d8fe237edf merged in master 2015-06-29 14:34:12 -07:00
Ryan Cavanaugh
3402f3556c Missed a file in merge; use Tristate.True in arrow fn check 2015-06-29 10:39:52 -07:00
Ryan Cavanaugh
634d35a7d0 Merge remote-tracking branch 'upstream/master' into jsxAndAs
Conflicts:
	src/compiler/checker.ts
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
	src/services/services.ts
2015-06-29 09:23:44 -07:00
Ryan Cavanaugh
ce6f39edca Move token scan to inside if 2015-06-26 14:21:29 -07:00
Ryan Cavanaugh
306de4d681 CR feedback 2015-06-26 14:18:51 -07:00
Arthur Ozga
a7ec1c4874 merged master 2015-06-25 13:25:44 -07:00
Dick van den Brink
2a483187a7 Remove unused variables 2015-06-25 00:23:13 +02:00
Ryan Cavanaugh
b3ca00986f Merge remote-tracking branch 'upstream/master' into jsxAndAs 2015-06-22 22:41:41 -07:00
Ryan Cavanaugh
5bc10b9828 It's no longer safe to store JSX elem. attr. type in nodelinks.resolvedType 2015-06-22 15:22:47 -07:00
Ryan Cavanaugh
16c834420c More cleanup 2015-06-22 13:55:09 -07:00
Ryan Cavanaugh
e448d8b932 Treat </ as a token in TSX files 2015-06-22 11:53:38 -07:00
Ryan Cavanaugh
25553446ef Misc cleanup 2015-06-22 10:31:00 -07:00
Arthur Ozga
b7f4ee5478 Merge branch 'master' into abstract-classes2 2015-06-19 15:46:26 -07:00
Jason Freeman
f2044a9011 Merge branch 'master' of https://github.com/Microsoft/TypeScript 2015-06-18 16:03:41 -07:00
Jason Freeman
111fdcb499 Merge branch 'release-1.5'
Conflicts:
	src/compiler/emitter.ts
	src/compiler/parser.ts
	src/compiler/program.ts
	src/services/services.ts
	tests/cases/unittests/transpile.ts
2015-06-18 15:06:03 -07:00
Arthur Ozga
10c8b6a089 removed comment 2015-06-18 14:44:01 -07:00
Arthur Ozga
4c1002e96b removed premature parser check 2015-06-18 14:39:16 -07:00
Cyrus Najmabadi
38a54bc0b9 Fix incremental parsing issue.
We were moving a method-declaration called "constructor" into a class.  This is incorrect
as that same code should be parsed as a constructor-declaration now that it is in the
class context.
2015-06-18 14:16:00 -07:00
Ryan Cavanaugh
a4045e539b Scanner / parser for JSX and As 2015-06-18 14:00:54 -07:00
Ron Buckton
82eae194f1 Inlined checks for NodeFlags.Async in parser 2015-06-17 16:10:17 -07:00
Cyrus Najmabadi
009c3ee43a Merge branch 'master' into removeGeneratorParameter
Conflicts:
	src/compiler/checker.ts
	src/compiler/parser.ts
	src/compiler/types.ts
2015-06-16 13:48:03 -07:00
Arthur Ozga
388e2fd926 merge with extendsExpressions 2015-06-16 13:33:03 -07:00
Cyrus Najmabadi
f1c99f3397 Remove generatorParameter and asyncParameter contexts. 2015-06-16 13:25:46 -07:00
Cyrus Najmabadi
ec9e461869 Remove 'strict mode' from parsing and checking, and make it purely something purely checked at bind time. 2015-06-15 17:31:15 -07:00
Arthur Ozga
506349f9c5 Fix merge conflicts with master 2015-06-15 16:48:09 -07:00
Arthur Ozga
5316d0d0df Abstract keyword: Added parsing and some checks
keyword `abstract` is parsed at the head of class declarations and as a modifier for class member functions/variables.

The following checks have been implemented:
* Objects whose type is an abstract class cannot be instantiated with `new`.
* all overloads of a function must match w/r/t having the abstract keyword.
* a member/class decl can't use the `abstract` keyword multiple times.
* a member can't be both `abstract` and `static`.
* a member can't be both `abstract` and `private`.
* Accessibility modifiers can't follow `abstract`
* Only classes and member functions can be declared abstract.
* abstract methods don't need an implementation
* abstract methods can only appear in abstract classes.

TODO:

* forbid abstract methods from having an implementation.
* make sure, barring overriding, an inherited method is abstract iff it is abstract in the parent.
* If a class has an abstract members, then it must be abstract. (eg: class B does not implement inherited member 'foo()')
* prevent overriding a non-abstract method with an abstract method.
* update "abstractness" flag when overriding abstract method with non-abstract method.
* prevent calling an abstract method via super.<abstract method name>()
* make all overloads of an abstract method adjacent to eachother.
* constructors can't be declared abstract -- give appropriate error.
* figure out what to emit to the *.ts file -- probably nothing.
* figure out what to emit to the *.d.ts file.
* process abstract declarations.
2015-06-15 16:29:34 -07:00
Jason Freeman
54edbaeea7 Parse class member with a missing identifier in the presence of a modifier 2015-06-15 16:28:29 -07:00
Ron Buckton
5ebad5889c Merge branch 'master' into asyncFunctions 2015-06-15 11:47:15 -07:00
Mohamed Hegazy
224e7630ea use namespaces instead of modules in the codebase 2015-06-12 09:01:48 -07:00
Jason Freeman
380918c497 Add comments 2015-06-10 17:20:51 -07:00
Jason Freeman
635a773186 Unite ParsingContext.ModuleElements and ParsingContext.BlockStatements 2015-06-10 16:41:48 -07:00
Ron Buckton
6fc07e65f5 Merged branch 'master' into asyncFunctions 2015-06-10 12:31:35 -07:00
Jason Freeman
32d57d900b Remove the ModuleElement type in favor of Statement 2015-06-10 11:26:51 -07:00
Jason Freeman
10fccc578e Improve error recovery after a dot 2015-06-09 18:09:14 -07:00
Jason Freeman
cc9bf13ffd Some cleanup and renaming 2015-06-09 17:12:12 -07:00
Jason Freeman
d01a9667fc Convert StatementFlags to a boolean 2015-06-09 16:57:42 -07:00
Jason Freeman
75ed565f81 Don't consume 'is' keyword if there is a preceding line terminator 2015-06-09 11:12:00 -07:00
Anders Hejlsberg
cd59573908 Merge branch 'master' into genericTypeAliases
Conflicts:
	src/compiler/checker.ts
2015-06-09 06:28:56 -07:00
Tingan Ho
efb701387e Merge commits from master 2015-06-09 07:43:05 +08:00
Daniel Rosenwasser
6b77c24753 Merge pull request #3365 from Microsoft/painInTheASI
Parse namespaces/types aliases/interfaces/ambient declarations only when they cannot be legal JS
2015-06-08 10:27:15 -07:00
Anders Hejlsberg
9c6e6acf97 Support generic type aliases 2015-06-05 14:28:57 -07:00
Tingan Ho
fa9a914648 Adds error for non-return positioned type predicates and changed parse type predicate logic 2015-06-05 16:36:02 +08:00
Vladimir Matveev
7c8a50336d emit module name for system modules, add moduleName argument to 'transpile' function
Conflicts:
	src/services/services.ts
2015-06-04 22:37:52 -07:00
Daniel Rosenwasser
3d9293e0de Moved lookahead logic into 'getDeclarationFlags'. 2015-06-04 18:08:11 -07:00
Daniel Rosenwasser
10861b1648 Amended comment. 2015-06-04 16:29:12 -07:00
Daniel Rosenwasser
047d3aef19 Account for interfaces. 2015-06-04 15:08:56 -07:00
Ron Buckton
9560d6f1e9 Merge branch 'master' into asyncFunctions 2015-06-04 11:53:51 -07:00
Tingan Ho
e1f82c599b Removes old type predicate functions 2015-06-04 20:04:17 +08:00