Commit Graph
1330 Commits
Author SHA1 Message Date
Cyrus Najmabadi 8820ca0596 Change the error-bit to be a node-flag and not a parser context flag.
Do not reuse nodes with errors in them.  We need to reparse them to make
sure we produce the right errors the second time around.
2014-12-12 03:25:49 -08:00
Cyrus Najmabadi 60c62e5b6b Don't consume nodes during calls to isListElement. 2014-12-12 03:06:05 -08:00
Cyrus Najmabadi 9c0e4211bc Properly adjust nodes while walking down the tree. 2014-12-12 02:34:53 -08:00
Cyrus Najmabadi 2f833d5f97 Provide a way for tests to try out incremental parsing. 2014-12-12 02:21:45 -08:00
Cyrus Najmabadi f218ce7684 Merge branch 'master' into sourceFileUpdate
Conflicts:
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
	src/compiler/parser.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
2014-12-12 00:52:07 -08:00
Daniel RosenwasserandDaniel Rosenwasser 854586e824 Merge branch 'release-1.4' into fixProcessDiagMessagesProbWith1.4Merge
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
	tests/cases/compiler/APISample_node_compile.ts
	tests/cases/compiler/APISample_standalone_compile.ts
2014-12-12 00:09:23 -08:00
Daniel Rosenwasser 87b7ddd51b Merge pull request #1453 from Microsoft/fixSysDependencyForDiagnostics
Fix sys dependency for processDiagnosticMessages.ts
2014-12-12 00:03:43 -08:00
Daniel RosenwasserandDaniel Rosenwasser c5943de3cd Just temporarily removing the tests until we can get back into a good state. 2014-12-11 23:54:33 -08:00
Cyrus Najmabadi 0391e02fee Merge branch 'master' into sourceFileUpdate
Conflicts:
	src/compiler/parser.ts
	src/services/formatting/tokenSpan.ts
	src/services/text.ts
2014-12-11 18:08:57 -08:00
CyrusNajmabadi 122d8a4d98 Merge pull request #1456 from Microsoft/mergeMarkers
Make the compiler resilient to encountering merge conflict markers in a source code file.
2014-12-11 18:04:25 -08:00
Jason Freeman 7f097140c9 Merge branch 'release-1.4' 2014-12-11 17:29:03 -08:00
Jason Freeman 06d7ef14cf Don't quote the word 'generators' in error messages 2014-12-11 17:22:22 -08:00
Cyrus Najmabadi 402c57cf7e Adding classification test. 2014-12-11 17:04:21 -08:00
Cyrus Najmabadi 7df3a407c2 Make the compiler resilient to encountering merge conflict markers in a source code file. 2014-12-11 16:56:10 -08:00
Jason Freeman d385f2ebf4 Disable computed properties in TypeScript 1.4 2014-12-11 16:49:53 -08:00
Daniel Rosenwasser 47ed584d12 Re-add baselines. 2014-12-11 16:39:54 -08:00
Daniel Rosenwasser cfca38f0af Remove baselines. 2014-12-11 16:39:32 -08:00
Cyrus Najmabadi fbeb7dd75e Merge branch 'funcDeclsInBlocks' into sourceFileUpdate
Conflicts:
	src/services/outliningElementsCollector.ts
2014-12-11 15:16:46 -08:00
Cyrus Najmabadi 63dbb78d02 Merge branch 'master' into sourceFileUpdate 2014-12-11 15:07:49 -08:00
Cyrus Najmabadi 76df92cc78 Merge branch 'master' into funcDeclsInBlocks 2014-12-11 14:59:03 -08:00
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
Daniel Rosenwasser 036209a89e Moved createCompilerHost into parser.ts
Conflicts:
	src/compiler/tsc.ts
2014-12-11 14:11:01 -08:00
Daniel Rosenwasser 77d5d40d20 Fixed up baselines. 2014-12-11 14:02:07 -08:00
Mohamed HegazyandDaniel Rosenwasser b45ab580d5 Add tests for public declarations 2014-12-11 14:02:01 -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
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 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
Daniel Rosenwasser 905d978883 Moved createCompilerHost into parser.ts 2014-12-10 17:13:39 -08:00
Daniel Rosenwasser 7fb92f8af0 Fixed up baselines. 2014-12-10 16:57:02 -08:00
Mohamed HegazyandDaniel Rosenwasser 38bf383f03 Add tests for public declarations 2014-12-10 16:54:42 -08:00
Daniel Rosenwasser 9ad6eb21ed Merge pull request #1341 from Microsoft/escapingTheTemplateOfDoom
Template string escaping fixes
2014-12-10 16:29:00 -08:00
Vladimir Matveev 10d08b816e do not indent leading comments that attached to tokens with errors 2014-12-10 15:08:26 -08:00
Anders Hejlsberg 35adeb8363 Addressing CR feedback 2014-12-10 14:44:31 -08:00
Anders Hejlsberg 98c9f75e21 Adding test case 2014-12-10 14:41:37 -08:00
Cyrus Najmabadi 888b88ee43 Move textSpan and textChangeRange impls to the compiler layer. 2014-12-10 14:36:37 -08:00
Anders Hejlsberg ab4706a211 Merge pull request #1433 from Microsoft/typeGuardWithAny
Type guards should not affect values of type any
2014-12-10 14:33:31 -08:00
Anders Hejlsberg 2876ba6a6c Addressing CR feedback 2014-12-10 14:25:02 -08:00
Vladimir Matveev 30ada4cffe conditionals are now introduce indentation scope 2014-12-10 14:03:14 -08:00
Cyrus Najmabadi c2d4cd5887 Move TextSpan into the compiler layer. 2014-12-10 13:45:08 -08:00
Mohamed Hegazy b0574cbdf9 Respond to code review comments 2014-12-10 12:37:09 -08:00
Cyrus Najmabadi 5bd49fec1d Initial entrypoint in SourceFile for the LS to call to peform incremental parsing.
Right now the entrypoint just causes a full parse to happen.  But the LS code is
cleaned up to take advantage of it appropriately.
2014-12-10 11:45:33 -08:00
Anders Hejlsberg 37b5c74b93 Adding test case 2014-12-10 10:17:48 -08:00