1033 Commits

Author SHA1 Message Date
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
Mohamed Hegazy
1049b7139d Respond to code review comments 2014-12-11 17:08:11 -08:00
Mohamed Hegazy
de73d50ee9 Remove compiletionSettings handeling from shims 2014-12-11 17:08:05 -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
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
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
606ee84fd1 move text defintions to services.ts 2014-12-11 13:43:39 -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
Vladimir Matveev
10d08b816e do not indent leading comments that attached to tokens with errors 2014-12-10 15:08:26 -08:00
Vladimir Matveev
51903106c7 Merge pull request #1395 from Microsoft/dev_mode
Add 'dev mode' to the language service
2014-12-10 14:34:23 -08:00
Vladimir Matveev
30ada4cffe conditionals are now introduce indentation scope 2014-12-10 14:03:14 -08:00
Cyrus Najmabadi
1170a1c436 Only set parents for parse trees in the LS for the syntactic trees.
we don't need this for the semantic trees because the compiler will set them all during
the binding.
2014-12-10 10:09:40 -08:00
Cyrus Najmabadi
fa4b68fa6c Initial test harness for incremental parser tests. 2014-12-09 16:39:52 -08:00
Cyrus Najmabadi
6170c56af4 Remove 'isOpen' and 'version' from teh compiler's SourceFile type.
Also, provide a way for creators of a source file to specify if they
want parent nodes hooked up.
2014-12-09 16:08:01 -08:00
Anders Hejlsberg
bb70e9eb12 Merge pull request #1346 from Microsoft/destructuring
Destructuring
2014-12-09 11:39:23 -08:00
Anders Hejlsberg
7bc35b3ae0 Merge branch 'master' into destructuring
Conflicts:
	src/compiler/binder.ts
	src/compiler/checker.ts
	src/compiler/emitter.ts
	src/compiler/parser.ts
	src/services/services.ts
	tests/baselines/reference/parserCommaInTypeMemberList2.errors.txt
2014-12-09 11:26:43 -08:00
Vladimir Matveev
cd2016c48a Merge pull request #1416 from Microsoft/inherited_deltas
inherit delta from nodes on the same line
2014-12-09 10:46:41 -08:00
Vladimir Matveev
7ed4225413 inherit delta from nodes on the same line 2014-12-09 04:55:33 -08:00
CyrusNajmabadi
96a8f22385 Merge pull request #1408 from Microsoft/methods
Remove the 'Method' syntaxkind and introduce MethodSignature and MethodDeclaration instead.
2014-12-08 18:13:42 -08:00
Cyrus Najmabadi
cc83925f32 Also split out .PropertyDeclaration and .PropertySignature from .Property. 2014-12-08 16:37:35 -08:00
Cyrus Najmabadi
c1b19d761d Remove the 'Method' syntaxkind and introduce MethodSignature and MethodDeclaration instead.
Sharing a single kind here would be bad for incremental scenarios as these two node types
are not interchangeable.

For now, i have updated nearly all code to look for both kinds.  However, it may not make sense
in all locations, and we could likely tighten up many code locations to only have to deal with
one or the other.
2014-12-08 16:16:11 -08:00
Anders Hejlsberg
459dee0e84 Merge branch 'master' into destructuring
Move downlevel vs. ES6 emit branching into individual emit functions
2014-12-08 14:42:38 -08:00
Vladimir Matveev
929d359bdf fix formatting to add space after comma between arguments when arguments starts with open paren 2014-12-08 14:28:19 -08:00
Vladimir Matveev
3469b4ce03 addressed CR feedback: rename getApiVersion to getServicesVersion 2014-12-07 21:41:15 -08:00
Vladimir Matveev
a4a87f87fa removed dummy parameter from getApiVersion method 2014-12-07 15:17:20 -08:00
Vladimir Matveev
89a065185b added getApiVersion method to TypeScriptServicesFactory 2014-12-07 00:13:19 -08:00
Vladimir Matveev
80c67db75b add error\trace message that should be exposed by the host 2014-12-06 21:23:54 -08:00
Anders Hejlsberg
b3dffffeb7 Addressing a bit more CR feedback 2014-12-06 14:56:34 -08:00
Anders Hejlsberg
05c9966180 Addressing CR feedback:
New SyntaxKind.BindingElement
Introduced new VariableLikeDeclaration and BindingElement types
Cleaned up VariableDeclaration, ParameterDeclaration, PropertyDeclaration types
Node kind of binding element is always SyntaxKind.BindingElement
Changed CheckVariableDeclaration to CheckVariableLikeDeclaration
Reorganized CheckVariableLikeDeclaration
2014-12-06 13:53:06 -08:00
Vladimir Matveev
98750ca7b4 Merge pull request #1389 from Microsoft/colorize_type_aliases
add classification for type aliases
2014-12-06 07:24:59 -08:00
Cyrus Najmabadi
b25d0a6fbc Merge branch 'master' into invertedIncremental
Conflicts:
	src/services/syntax/parser.ts
2014-12-06 01:30:38 -08:00
Cyrus Najmabadi
315815c11e Move code responsible for determining node resuability (in incremental scenarios) to a single location. 2014-12-05 17:43:45 -08:00
Vladimir Matveev
f30bb7ec35 add classification for type aliases 2014-12-05 17:32:36 -08:00
Cyrus Najmabadi
c6ee1a01e3 Move over all changes from my private branch. 2014-12-05 14:55:39 -08:00
Cyrus Najmabadi
bdcbea9908 Remove setting of parents in the factory. 2014-12-05 13:23:54 -08:00
Cyrus Najmabadi
d8da2a4d34 Remove restriction that you cannot reuse nodes/tokens during incremental parsing while doing speculatively operations.
Great idea from @yuit

This restriction was in place because the old parser would mutate nodes as it created them. i.e. when
creating a node it would set the parent of its children right then.  During incremental parsing, this
couldl be bad because we might take an old node, set its parent to be something else, and then decide
we didn't even want to go down that speculative path to begin with.  Now the parent of some child node
would be mutated.  So we might have a node that pointed to a child that then pointed to a different
parent.

To get around this, we restricted the incremental so that it would not reuse from the previous tree
if we were speculatively parsing.  However, Yui had a very good idea to just move the parent setting
phase to be a postpast (similar to the new compiler).  By doing this, we never mutate nodes as we
parse, and thus we never end up with inconsistent nodes.  The post pass then ensures that all parents
are correct relative to the new tree.

Conflicts:
	src/services/syntax/SyntaxGenerator.js
	src/services/syntax/SyntaxGenerator.js.map
	src/services/syntax/incrementalParser.ts
	src/services/syntax/scanner.ts
	src/services/syntax/syntaxGenerator.ts
	src/services/syntax/syntaxNodes.concrete.generated.ts
2014-12-05 12:57:08 -08:00
Cyrus Najmabadi
9982795200 Rename _skippedTokens to skippedTokens. 2014-12-05 09:05:36 -08:00
Cyrus Najmabadi
12e90a09ef Simplify parser API. 2014-12-05 09:05:28 -08:00
Cyrus Najmabadi
9cf588d4be Move syntax cursor into its own file. 2014-12-05 09:05:14 -08:00
Cyrus Najmabadi
8032c0f950 Use callbacks for speculative parsing. 2014-12-04 19:05:01 -08:00
Anders Hejlsberg
b49e2772ea Addressing CR feedback 2014-12-04 17:43:15 -08:00
Vladimir Matveev
fc47fc31be Merge pull request #1371 from Microsoft/nullref_with_hotswapping
Remove redundant initialization code from the constructor of SyntaxTreeCache
2014-12-04 13:13:08 -08:00
Sheetal Nandi
e3320c2530 Merge pull request #1362 from Microsoft/contextSensitiveExpressions
Resolve the context sensitive expression containers before resolving node
2014-12-04 13:02:56 -08:00
CyrusNajmabadi
4d0f9920e9 Merge pull request #1364 from Microsoft/coverage
Add grammar walker test coverage cases.
2014-12-04 13:01:42 -08:00
Sheetal Nandi
c3c44dc3c8 Some renaming and added comments as per feedback 2014-12-04 12:55:54 -08:00