Commit Graph
148 Commits
Author SHA1 Message Date
Dick van den Brink 186c04cebc Remove now unused diagnostics keys 2015-01-14 23:22:04 +01:00
Lorant Pinter 47b8deb382 Show --noImplicitAny as an option to throw errors, not warnings
Fixes #1632
2015-01-11 11:14:06 +01: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
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
Cyrus Najmabadi 158cf62206 More CR feedback. 2014-12-03 15:36:39 -08:00
Cyrus Najmabadi bab0c1d258 Simplify ASI parsing. 2014-11-30 22:49:35 -08:00
Cyrus Najmabadi a766df9ed1 Tighten the bounds on an 'await' expression.
Share common helper code when parsing the right side of a dot.

Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-30 19:59:40 -08:00
Cyrus Najmabadi ca396779e3 Rename MemberAccess to PropertyAccess.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-30 19:58:27 -08:00
Cyrus Najmabadi 632591d305 Rename some kinds to match new parser.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-30 19:58:00 -08:00
Mohamed Hegazy d1bf508a7b Merge pull request #1252 from DickvdBrink/emptyFile
Remove empty file
2014-11-30 00:42:10 -08:00
Cyrus Najmabadi 7152d37ea2 Rename 'CastExpression' to 'TypeAssertionExpression'.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-29 15:32:09 -08:00
Cyrus Najmabadi ac5e9b6c88 Simplify the parser by removing the need for the 'force' parameter. 2014-11-29 15:09:57 -08:00
Cyrus Najmabadi b1f49c44f9 Simplify parser. 2014-11-29 15:07:10 -08:00
Cyrus Najmabadi aa91aa7f44 Remove IndexMemberDeclaration, we can just use IndexSignature instead.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-28 14:39:30 -08:00
Cyrus Najmabadi 749501e8bf Simplify how type members are represented in the tree.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-28 14:38:57 -08:00
Cyrus Najmabadi aaaa078199 Update name of variable declaration member.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-28 14:38:23 -08:00
Cyrus Najmabadi f68e006024 Add support for parsing 'let' and 'const' declarations. 2014-11-28 14:37:47 -08:00
Cyrus Najmabadi dcfaf6d6d3 Support parsing const enums. 2014-11-28 14:37:26 -08:00
Cyrus Najmabadi 2de7beb24c Add support for parsing type aliases.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-28 14:37:07 -08:00
Cyrus Najmabadi 65b5d47217 Removing duplication in the parser. 2014-11-28 14:36:22 -08:00
Cyrus Najmabadi 5f2da4afc8 Don't use bitwise operations on this nmber. It may be more than 32 bits. 2014-11-28 14:36:05 -08:00
Cyrus Najmabadi ab057b9e58 Use a const enum for the syntax kind.
Conflicts:
	Jakefile
	src/services/syntax/SyntaxGenerator.js.map
	tests/Fidelity/Program.ts
	tests/Fidelity/program.js
	tests/Fidelity/program.js.map
2014-11-28 14:35:04 -08:00
Cyrus Najmabadi 1ac2f818b3 Simplify syntaxtree. 2014-11-26 00:16:50 -08:00
Cyrus Najmabadi 01ce9f8cc8 Add appropriate switch case. 2014-11-26 00:16:40 -08:00
Cyrus Najmabadi 480020e1d6 Allow modifiers on an Export Assignment node.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-26 00:16:23 -08:00
Cyrus Najmabadi ac5d670d7c Simplify parsing. 2014-11-25 21:45:05 -08:00
Cyrus Najmabadi 70ecd0b00c Simplify parsing. 2014-11-25 21:37:02 -08:00
Cyrus Najmabadi 2233a01fb3 Rename SimplePropertyAssignment to PropertyAssignment.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-25 19:33:35 -08:00
Cyrus Najmabadi 7c0eb2679b Remove redundant syntax type.
A method declaration serves perfectly well as a function-property-assignment in an object literal.

Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-25 19:21:37 -08:00
Cyrus Najmabadi e6ada5fb81 Be more lenient with computed property names. 2014-11-25 18:41:45 -08:00
Cyrus Najmabadi 3d2979a50c Inline method. 2014-11-25 18:22:17 -08:00
Cyrus Najmabadi a4710442c8 Rename some functions. 2014-11-25 18:13:16 -08:00
Cyrus Najmabadi 3fe6623c57 Only allow 'async' as a modifier if it is not followed by newline. 2014-11-25 18:07:19 -08:00
Cyrus Najmabadi 05668cede7 Add support for parsing async/await in fidelity.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-25 17:14:37 -08:00
Cyrus Najmabadi 3597f4f4d7 Improve comments for both parsers and bring more in sync. 2014-11-25 01:21:10 -08:00
Cyrus Najmabadi dc6886c1ca Add clarifying comments. 2014-11-25 01:12:21 -08:00
Cyrus Najmabadi 8bbc4090ef Simplify fidelity implementation of context flags. 2014-11-25 01:03:13 -08:00
Cyrus Najmabadi 2f075a1c06 Fix parsing of function expression names. 2014-11-24 22:41:55 -08:00
Cyrus Najmabadi 14f90b889d Update fidelity to match names. 2014-11-24 18:51:07 -08:00
CyrusNajmabadi 99eb271e78 Merge pull request #1239 from Microsoft/incrementalParser
Change how the incremental parser works.
2014-11-24 17:47:30 -08:00
Dick van den Brink 2dfdc5ad30 Remove empty file 2014-11-24 00:35:10 +01:00
Cyrus Najmabadi 71a1f13226 Don't report a diagnostic explicitly. 2014-11-23 13:35:48 -08:00
Cyrus Najmabadi 76d83ee624 Don't explicitly make diagnostics in the parser. 2014-11-23 13:35:30 -08:00