Commit Graph

35431 Commits

Author SHA1 Message Date
Daniel Rosenwasser d92d6379bd Merge branch 'release-1.4' into mergeFor1.4ToMaster
Conflicts:
	src/compiler/parser.ts
	src/compiler/utilities.ts
	src/harness/harness.ts
	tests/baselines/reference/APISample_node_compile.js
	tests/baselines/reference/APISample_node_compile.types
	tests/baselines/reference/APISample_standalone_compile.js
	tests/baselines/reference/APISample_standalone_compile.types
	tests/cases/compiler/APISample_node_compile.ts
	tests/cases/compiler/APISample_standalone_compile.ts
2014-12-11 14:49:43 -08:00
Cyrus Najmabadi b692ea9b66 Remove TryBlock and FinallyBlock.
They break the rule that syntactically identical constructs use the same syntax kind.  This
prevents node reuse in incremental parsing.
2014-12-11 14:40:25 -08:00
Yui T b34a453cd4 Move grammar checking: bindingElement 2014-12-11 14:35:55 -08:00
Daniel Rosenwasser 987dd0cede Fixed 'use strict' check. 2014-12-11 14:21:39 -08:00
Daniel Rosenwasser 94cce178dd Responded to CR feedback.
Conflicts:
	src/compiler/parser.ts
2014-12-11 14:21:18 -08:00
Daniel Rosenwasser 036209a89e Moved createCompilerHost into parser.ts
Conflicts:
	src/compiler/tsc.ts
2014-12-11 14:11:01 -08:00
Yui T 0d99f1afd5 Move grammar checking: binaryExpression 2014-12-11 14:09:49 -08:00
Yui T a485fbbf5a Merge branch 'refactorGrammarCheck' of https://github.com/Microsoft/TypeScript into refactorGrammarCheck
Conflicts:
	src/compiler/checker.ts
2014-12-11 14:05:35 -08:00
Yui T d8621069c1 Address code review: move checkGrammarAnySignature into checkSignatureDeclaration 2014-12-11 14:02:09 -08:00
Daniel Rosenwasser 77d5d40d20 Fixed up baselines. 2014-12-11 14:02:07 -08:00
Mohamed Hegazy b45ab580d5 Add tests for public declarations 2014-12-11 14:02:01 -08:00
Daniel Rosenwasser 0ce3861602 Moved non-exposed functions to utilities; fix up emitted .d.ts in Jakefile.
Conflicts:
	src/compiler/parser.ts
2014-12-11 14:00:36 -08:00
Daniel Rosenwasser a173017aa6 Explicit default target for fourslash tests in the harness. 2014-12-11 13:44:47 -08:00
Mohamed Hegazy 1fe19136d7 Remove unused parameter to getCompletionsAtPosition
Conflicts:
	tests/baselines/reference/APISample_node_compile.js
	tests/baselines/reference/APISample_node_compile.types
	tests/baselines/reference/APISample_standalone_compile.js
	tests/baselines/reference/APISample_standalone_compile.types
2014-12-11 13:44:38 -08:00
Daniel Rosenwasser 8420fae7a4 Make getLocalizedDiagnosticMessages and getCancellationToken optional 2014-12-11 13:44:32 -08:00
Mohamed Hegazy a7219e7569 move OutliningSpan definitions to services to ensure it is visible in definitions file 2014-12-11 13:44:12 -08:00
Daniel Rosenwasser f207acff51 Removed tokenSpan.ts. 2014-12-11 13:44:08 -08:00
Mohamed Hegazy b87a7fafaf move formatting.ts and smartIndernter.ts into formatting folder to match thier namespace 2014-12-11 13:44:02 -08:00
Mohamed Hegazy 791ba336cc remove unused file 2014-12-11 13:43:55 -08:00
Mohamed Hegazy eaa812e3b5 Move Map to types to ensure it is visible in definition files 2014-12-11 13:43:48 -08:00
Mohamed Hegazy 841842b733 use ts.System for tests 2014-12-11 13:43:44 -08:00
Mohamed Hegazy 606ee84fd1 move text defintions to services.ts 2014-12-11 13:43:39 -08:00
Daniel Rosenwasser be1eb3430c Put 'sys' into the 'ts' module. 2014-12-11 13:43:34 -08:00
Daniel Rosenwasser c5510444d9 Use __filename for 'getExecutingFilePath'. 2014-12-11 13:43:29 -08:00
Daniel Rosenwasser 978ac26eff Allow typescript to be importable in node. 2014-12-11 13:43:24 -08:00
Yui T c23b6a66e2 Address code review: move checkGrammarAnySignature into checkSignatureDeclaration 2014-12-11 12:55:27 -08:00
Yui T 5fe2594ec2 Merge branch 'refactorGrammarCheck' of https://github.com/Microsoft/TypeScript into refactorGrammarCheck 2014-12-11 12:07:09 -08:00
Yui T 907d1d001b Move grammar checking: callExpression, newExpression 2014-12-11 12:07:01 -08:00
Yui T 9698244391 Move grammar checking: callExpression, newExpression 2014-12-11 12:06:21 -08:00
Yui T b31981c6e9 Address code review 2014-12-11 11:35:51 -08:00
Cyrus Najmabadi 12f8bfb687 Unify accessor declaration parsing. 2014-12-10 23:33:30 -08:00
Vladimir Matveev 997aadb902 Merge pull request #1437 from Microsoft/formatting_conditionals
conditionals are now introduce indentation scope
2014-12-10 23:28:54 -08:00
Cyrus Najmabadi ba0fd4453d Add additional incremental tests. 2014-12-10 23:04:13 -08:00
Cyrus Najmabadi fe57f3d2e4 Support modifiers on object literal methods and accessors, and question tokens on object literal methods.
This makes parsing of these constructs the same whether they are in an object literal or a class.

This is important for incrementla parsing for knowing if we can reuse these nodes if we run
into them.
2014-12-10 22:30:40 -08:00
Vladimir Matveev 638518cae2 Merge pull request #1441 from Microsoft/dont_indent_comments_on_errors
do not indent leading comments that attached to tokens with errors
2014-12-10 22:02:15 -08:00
Vladimir Matveev d69ba56ece added test for inherited indentation 2014-12-10 22:01:34 -08:00
Yui T f620fa6914 Merge branch 'refactorGrammarCheck' of https://github.com/Microsoft/TypeScript into refactorGrammarCheck
Conflicts:
	src/compiler/checker.ts
2014-12-10 21:56:16 -08:00
Yui T 547e1296f8 Move grammar checking: Arrow function 2014-12-10 21:52:18 -08:00
Yui T 7cdf75e1a8 Move grammar checking: Arrow function 2014-12-10 21:38:18 -08:00
Cyrus Najmabadi 4850dfbb8e Support modifiers on index signatures in an object type.
This makes index signature parsing non-contextual.  This is necessary so that
incremental parsing can reuse index signatures acros classes and object types.
2014-12-10 20:55:46 -08:00
Yui T 408d6f3ea3 Address code review 2014-12-10 19:30:09 -08:00
Cyrus Najmabadi ee828dc1da More incremental parser tests. 2014-12-10 19:15:44 -08:00
Cyrus Najmabadi 563b234240 Incremental parser tests should verify the same set of diagnostics are produced. 2014-12-10 19:07:36 -08:00
Cyrus Najmabadi fc27f72324 Understand and handle modifiers on function declarations and variable statements within blocks.
This ensures reusability for functions/variables that may have been outside a block, but end up
inside one afterwards.  It also ensure the same tree is produced when incremental parsing.

i.e.  if you have:

declare function F() { }

And you add a { above it, then we current have an incremental parsing bug.  Namely we would see
a FunctionDeclaration node and say 'yes, we can reuse that node while parsing the block'.  This
is currently broken because the normal parse would not have normally accepted such a node (because
of the modifiers).

This was an example of contextual parsing of the same kind of node.  Something which we do not
want to do if we want incremental parsing to work properly.
2014-12-10 18:52:56 -08:00
Mohamed Hegazy b4082cec1b Merge pull request #1418 from Microsoft/suppressNoImplicitAnyErrors
Suppress no implicit any errors
2014-12-10 18:46:39 -08:00
Mohamed Hegazy 774c061779 Merge branch 'release-1.4' into suppressNoImplicitAnyErrors
Conflicts:
	src/compiler/parser.ts
	src/harness/harness.ts
2014-12-10 18:45:28 -08:00
Yui T 31e49ed93e Move grammar checking: callSignature, constructorType, ConstructSignature, FunctionType, IndexSignature 2014-12-10 18:39:24 -08:00
Yui T 16693316e5 Add isEarly flag into error from grammar checking 2014-12-10 18:34:38 -08:00
Daniel Rosenwasser b7a17e2fd5 Merge pull request #1417 from Microsoft/exposeServices
Expose services as a consumable external module
2014-12-10 18:21:41 -08:00
Daniel Rosenwasser 0aca3b9667 Fixed 'use strict' check. 2014-12-10 18:17:59 -08:00