Commit Graph
105 Commits
Author SHA1 Message Date
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
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
Cyrus Najmabadi af2dd5ce69 Rename 'block' to 'body'.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-22 22:37:00 -08:00
Cyrus Najmabadi 300862a3df Make parser more lenient with what it allows as the body of a function.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-22 22:36:45 -08:00
Cyrus Najmabadi 80366711d0 Move parser error to the grammar checker.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-22 13:22:08 -08:00
Cyrus Najmabadi 5fcbeb59ae Move parser error to grammar check phase.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-22 12:51:51 -08:00
Cyrus Najmabadi f10794be74 Simplify rewind points. 2014-11-21 16:43:37 -08:00
Cyrus Najmabadi b590ceb6b3 Fixing check. 2014-11-21 16:43:26 -08:00
Cyrus Najmabadi 3bcec5e3fd Remove unused asserts. 2014-11-21 16:00:19 -08:00
Cyrus Najmabadi ca5a01b3ae Make 'kind' non-enumerable. 2014-11-21 16:00:12 -08:00
Cyrus Najmabadi eb35cd5d59 Speed up incremental parser. 2014-11-21 16:00:04 -08:00
Cyrus Najmabadi 7a1d2fbf7b Simplify incremental parser. 2014-11-21 15:59:32 -08:00
Cyrus Najmabadi 45c3dffd4e Slightly speed up marking by avoiding calling fullStart on so many nodes and tokens. 2014-11-21 15:59:21 -08:00
Cyrus Najmabadi 3c3e3b23dd Always mark nodes and tokens that cross the edited range. 2014-11-21 15:59:12 -08:00
Cyrus Najmabadi 6afd5e4ad2 Simplify incremental code. 2014-11-21 15:59:00 -08:00
Cyrus Najmabadi 19198256fb Simplify parser initializer. 2014-11-21 15:58:48 -08:00
Cyrus Najmabadi c6088ce683 Fix interface. 2014-11-21 15:58:35 -08:00
Cyrus Najmabadi 161dc656cb Simplify incremental parsing by moving old source tree nodes before doing anything. 2014-11-21 15:58:12 -08:00
Cyrus Najmabadi b8a8c35f3f Have the parser give real positions for empty tokens.
Previously this was difficult because we didn't know where empty tokens
would go due to the presense of skipped tokens.  Thanks to the recent
work i did to place skipped tokens on the *next* real token we hit, this
became much simpler.
2014-11-20 16:21:04 -08:00
Cyrus Najmabadi 7dd30d32fe Simplify how regexs are incrementally parsed.
Conflicts:
	tests/Fidelity/incremental/IncrementalParserTests.ts
	tests/Fidelity/parser/ecmascript5/MissingTokens/MissingToken2.ts.expected
	tests/Fidelity/parser/ecmascript5/RegressionTests/645086_1.ts.expected
	tests/Fidelity/parser/ecmascript5/RegressionTests/645086_2.ts.expected
	tests/Fidelity/parser/ecmascript5/RegularExpressions/RegularExpressionDivideAmbiguity4.ts.expected
	tests/Fidelity/parser/ecmascript5/SyntaxWalker.generated.ts.expected
	tests/Fidelity/program.js
	tests/Fidelity/program.js.map
	tests/Fidelity/scanner/ecmascript5/StringLiterals.ts.expected
	tests/Fidelity/test262/suite/ch07/7.3/S7.3_A2.1_T2.js.expected
	tests/Fidelity/test262/suite/ch07/7.3/S7.3_A2.2_T2.js.expected
	tests/Fidelity/test262/suite/ch07/7.4/S7.4_A3.js.expected
	tests/Fidelity/test262/suite/ch07/7.4/S7.4_A4_T1.js.expected
	tests/Fidelity/test262/suite/ch07/7.4/S7.4_A4_T4.js.expected
	tests/Fidelity/test262/suite/ch07/7.8/7.8.4/S7.8.4_A1.1_T1.js.expected
	tests/Fidelity/test262/suite/ch07/7.8/7.8.4/S7.8.4_A1.1_T2.js.expected
	tests/Fidelity/test262/suite/ch07/7.8/7.8.4/S7.8.4_A1.2_T1.js.expected
	tests/Fidelity/test262/suite/ch07/7.8/7.8.4/S7.8.4_A1.2_T2.js.expected
	tests/Fidelity/test262/suite/ch07/7.8/7.8.4/S7.8.4_A3.1_T1.js.expected
	tests/Fidelity/test262/suite/ch07/7.8/7.8.4/S7.8.4_A3.1_T2.js.expected
	tests/Fidelity/test262/suite/ch07/7.8/7.8.4/S7.8.4_A3.2_T1.js.expected
	tests/Fidelity/test262/suite/ch07/7.8/7.8.4/S7.8.4_A3.2_T2.js.expected
	tests/Fidelity/test262/suite/ch07/7.8/7.8.5/S7.8.5_A1.2_T2.js.expected
	tests/Fidelity/test262/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T1.js.expected
	tests/Fidelity/test262/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T3.js.expected
	tests/Fidelity/test262/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T1.js.expected
	tests/Fidelity/test262/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T3.js.expected
	tests/Fidelity/test262/suite/ch07/7.8/7.8.5/S7.8.5_A2.2_T1.js.expected
	tests/Fidelity/test262/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T1.js.expected
	tests/Fidelity/test262/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T3.js.expected
	tests/Fidelity/test262/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T1.js.expected
	tests/Fidelity/test262/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T3.js.expected
	tests/Fidelity/test262/suite/ch08/8.4/S8.4_A13_T1.js.expected
	tests/Fidelity/test262/suite/ch08/8.4/S8.4_A13_T2.js.expected
	tests/Fidelity/test262/suite/ch08/8.4/S8.4_A14_T1.js.expected
	tests/Fidelity/test262/suite/ch08/8.4/S8.4_A14_T2.js.expected
2014-11-17 17:59:28 -08:00
Cyrus Najmabadi f7890d4ddb When entering a type context, 'yield' should be allowed (as long as you're not in strict mode). 2014-11-12 19:09:09 -08:00
Cyrus Najmabadi 9e273ddb78 Add support for [GeneratorParameter] grammar parameter. 2014-11-12 18:10:36 -08:00
Cyrus Najmabadi a496ade945 Update context names. 2014-11-12 18:10:21 -08:00
Cyrus Najmabadi 122cf8a52c Add clarifying comments. 2014-11-11 21:19:06 -08:00
Cyrus Najmabadi 9c48b23f43 Fix spelling mistakes, and remove unused function. 2014-11-11 19:19:44 -08:00
Cyrus Najmabadi 7ab80d260e Add support for parsing yield expressions.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-11 19:03:02 -08:00
Cyrus Najmabadi 6895efc7c5 Function property assignments can also be generators.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-11 19:02:12 -08:00
Cyrus Najmabadi e0c93a1c08 Add support for parsing generator declarations.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-11 19:01:33 -08:00
Cyrus Najmabadi ecfc60ff16 Update comment 2014-11-11 19:00:57 -08:00
Cyrus Najmabadi e5b997c530 Provide more consistent behavior in how parseFunctionBlock works. 2014-11-11 19:00:35 -08:00
Cyrus Najmabadi be202a4e71 Spec conformance for function blocks versus statement blocks. 2014-11-11 19:00:12 -08:00
Cyrus Najmabadi 95a7437ba0 Clean up function names. 2014-11-11 18:55:58 -08:00
Cyrus Najmabadi ba11e68ac3 CR feedback. 2014-11-10 23:44:31 -08:00
Cyrus Najmabadi 766cb28a3e Keep track of 'disallowIn' as an ambient parser flag instead of having to pass it along everywhere.
Conflicts:
	src/services/syntax/parser.ts
2014-11-10 19:07:20 -08:00
Cyrus Najmabadi 8262bc24ec Body is optional.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-10 01:14:04 -08:00
Cyrus Najmabadi 3174cbca0a Use union types to make For/ForIn statements simpler.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-10 01:04:26 -08:00
Cyrus Najmabadi 2288f4268f Simplify API for nodes that have both a block and an expression.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-10 01:04:02 -08:00
Cyrus Najmabadi f59cb6044d Simplify API for nodes htat have both a block and a semicolon token.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-10 01:03:40 -08:00
Cyrus Najmabadi 535dc0dc46 Simplify module name parsing.
Conflicts:
	src/services/syntax/SyntaxGenerator.js.map
2014-11-10 01:03:02 -08:00
Cyrus Najmabadi fc25dfbf1a Simplified parsing. 2014-11-10 01:02:23 -08:00
Cyrus Najmabadi b83c37a764 Tiny perf tweaks to scanning. 2014-11-10 01:02:08 -08:00
Cyrus Najmabadi a379d69229 Rename method. 2014-11-09 00:28:19 -08:00
Cyrus Najmabadi 37e9c2db89 Move to a syntax model where we only have leading trivia. 2014-11-09 00:28:00 -08:00
Cyrus Najmabadi f02ba7f212 move SyntaxTrivia.kind over to a property.
Conflicts:
	src/services/compiler/precompile.ts
2014-11-09 00:27:33 -08:00
Cyrus Najmabadi a0464435c9 Attach skipped tokens to the following token, not the preceding one.
This makes handling skipped tokens much simpler, and helps put us in
a position where tokens only have leading trivia and never trailing
trivia.
2014-11-09 00:25:44 -08:00