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
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
Daniel Rosenwasser
6a882e7392
Merge pull request #1363 from Microsoft/noMoreExpandoBar
...
Fixed issue where missing identifiers pushed trivia into the navigation bar
2014-12-04 12:44:58 -08:00
Vladimir Matveev
658ff2498a
drop redundant initialization code
2014-12-04 12:00:26 -08:00
Cyrus Najmabadi
4db419d93c
more baselines. revert unintentional change to harness.ts.
2014-12-03 22:14:55 -08:00
Cyrus Najmabadi
c735ccc46d
Merge branch 'master' into propertyAssignments
2014-12-03 19:33:33 -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
Daniel Rosenwasser
4d0edb51b3
Fixed navigation expansion for missing identifier nodes.
2014-12-03 14:54:00 -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
Sheetal Nandi
1551c0a466
Merge pull request #889 from Microsoft/SymbolDisplayParkKindTests
...
Symbol display part kind test cases
2014-12-03 13:21:53 -08:00
Cyrus Najmabadi
3440869010
Print out methods in the types of object literals as if they were methods, not function typed properties.
2014-12-03 03:19:46 -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
Mohamed Hegazy
4a318bb73d
Fix typo in comment
2014-12-02 21:08:16 -08:00
Mohamed Hegazy
d31dfd6f2f
Handel unsuported modiefiers in getModifierOccurrences
2014-12-02 20:20:53 -08:00
Mohamed Hegazy
d9b3d21cba
Merge branch 'master' into getOccurancesAssert
2014-12-02 20:16:50 -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
Daniel Rosenwasser
e4817b50b3
Merge pull request #1322 from Microsoft/exposeServices
...
Emit services as an external module
2014-12-02 15:34:36 -08:00