378 Commits

Author SHA1 Message Date
Cyrus Najmabadi
62dd12cb7a Move functions from 'types.ts' to 'utilities.ts'. 2014-12-12 00:56:14 -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
Cyrus Najmabadi
14cb05f443 Add explanatory comments to explain how node moving works. 2014-12-11 23:39:44 -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
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
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
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
Mohamed Hegazy
eaa812e3b5 Move Map to types to ensure it is visible in definition files 2014-12-11 13:43:48 -08:00
Cyrus Najmabadi
ee828dc1da More incremental parser tests. 2014-12-10 19:15:44 -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
2b4a769dc3 Merge remote-tracking branch 'origin/release-1.4' into exposeServices2 2014-12-10 16:43:21 -08:00
Anders Hejlsberg
35adeb8363 Addressing CR feedback 2014-12-10 14:44:31 -08:00
Mohamed Hegazy
fc950ed930 Move Map to types to ensure it is visible in definition files 2014-12-10 14:41:57 -08:00
Anders Hejlsberg
7ed933f5c4 Type guards do no affect values of type any 2014-12-10 14:41:29 -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
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
48765ec904 Update comment. 2014-12-10 12:18:31 -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
7c09b724dc Type guards do no affect values of type any 2014-12-10 10:16:51 -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
Mohamed Hegazy
06e73d33be Commandline definitions use a property "paramType" to specify the name of thier type e.g. File, Version, etc.., that was changed in the defintion to paramName, without changing the use site, changing it back to paramType. 2014-12-09 14:13:44 -08:00
Mohamed Hegazy
0a1eabc9aa Add new compiler flag to suppress noImplicitAny errors for object access 2014-12-09 14:08:44 -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
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
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
CyrusNajmabadi
f99bc15783 Merge pull request #1369 from Microsoft/parserErrors2
Track if the parser encountered any errors as a bit in the next node that is produced.
2014-12-04 13:37:50 -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
Sheetal Nandi
c3c44dc3c8 Some renaming and added comments as per feedback 2014-12-04 12:55:54 -08:00
Cyrus Najmabadi
1976f0de2e Track if the parser encountered any errors as a bit in the next node that is produced. 2014-12-04 10:19:57 -08:00
Anders Hejlsberg
816abb19e4 Merge branch 'master' into destructuring
Conflicts:
	src/compiler/checker.ts
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
	src/compiler/emitter.ts
	src/compiler/parser.ts
	src/compiler/types.ts
	src/services/navigationBar.ts
	tests/baselines/reference/assignmentLHSIsValue.errors.txt
	tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt
	tests/baselines/reference/parserErrorRecovery_ParameterList2.errors.txt
2014-12-03 16:43:01 -08:00
Cyrus Najmabadi
158cf62206 More CR feedback. 2014-12-03 15:36:39 -08:00
Cyrus Najmabadi
22d7aed980 CR feedback. 2014-12-03 15:27:14 -08:00
Sheetal Nandi
1939c7f2cd Fix the getSymbolInfo and getTypeOfNode entry points to resolve the context sensitive information before resolving the actual node 2014-12-03 14:47:13 -08:00
Sheetal Nandi
c40e0f6738 Fixes the quickInfo when hovering over var inside the context sensitive expression
Handles #1165
2014-12-03 14:00:58 -08:00
Cyrus Najmabadi
0900005438 Don't rewrite function property assignments in the AST. 2014-12-03 01:46:04 -08:00
Cyrus Najmabadi
ed81cad39a Remove the 'FunctionBlock' ast kind.
We don't want different AST forms for identical syntactic constructs ('Block' and 'FunctionBock').
This prevents reuse in incremental scenarios and forces the incremental parser to know when to
change between the two.
2014-12-02 22:52:21 -08:00
Cyrus Najmabadi
a8badd921e Update the name of 'PropertyAssignment' to 'LonghandPropertyAssignment'.
'PropertyAssignment' is now the name of the super interface brand we use for all thigns that can
be members of an object literal.
2014-12-02 22:01:52 -08:00
Cyrus Najmabadi
5a7500ca5e Add a dedicated 'EndOfFile' token to a SourceFile.
This is important for incremental parsing, as it is where we can attach parse errors at the end of
the file to.  Also, it helps with things like emitting comments at the end of the file.
2014-12-02 16:09:41 -08:00
CyrusNajmabadi
6e945afdf5 Merge pull request #1343 from Microsoft/parserWork
Extract reference comments out into their own diagnostics array.
2014-12-02 16:05:07 -08:00
Yui T
c53f3f5868 Merge branch 'master' into refactorEmitter 2014-12-02 15:31:35 -08:00
Vladimir Matveev
76e8560b0e fix crash in signature help 2014-12-02 15:04:44 -08:00