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
Cyrus Najmabadi
bea124b217
Simplify code.
2014-11-05 04:08:20 -08:00
Cyrus Najmabadi
1a1c9ace8a
Add support for parsing computed property names.
2014-11-05 03:49:25 -08:00
Cyrus Najmabadi
cb97682d83
Add the IPropertyNameSyntax.
...
This will help us introduce the ComputedPropertyName concept in the future.
Conflicts:
src/services/syntax/syntaxNodes.concrete.generated.ts
2014-11-05 00:54:53 -08:00
Cyrus Najmabadi
ae87b08e33
Add support for parsing shorthand property assignments.
2014-11-04 23:04:07 -08:00
Cyrus Najmabadi
5952036e2c
Remove unnecessary brand.
2014-11-04 22:43:11 -08:00
Cyrus Najmabadi
3753058874
Add an IAccessorSyntax interface.
2014-11-04 22:43:01 -08:00
Cyrus Najmabadi
ba2bdc4124
Add missing brands to the syntax interfaces.
2014-11-04 22:42:43 -08:00
Cyrus Najmabadi
a9a2fe501a
Specialize computeData for arrays.
2014-11-04 22:41:13 -08:00
Cyrus Najmabadi
4cefe353f3
remove file.
2014-11-04 22:40:59 -08:00
Cyrus Najmabadi
35644b3d47
Move from an array of function pointers to actual methods.
...
Conflicts:
src/services/syntax/syntaxGenerator.ts
2014-11-04 22:40:36 -08:00
Cyrus Najmabadi
419ee38c8a
Update syntax nodes.
2014-11-04 01:37:59 -08:00
Cyrus Najmabadi
12d3d8a741
Specialize findToken walk.
2014-11-04 01:20:00 -08:00
Cyrus Najmabadi
c9edc5963e
Micro optimize scanning
2014-11-04 01:19:46 -08:00
Cyrus Najmabadi
82dc827837
Use an array for getting the right childAt function.
2014-11-04 01:19:31 -08:00
Cyrus Najmabadi
aa2509a08a
Small micro optimizations to incremental parsing.
2014-11-04 01:19:19 -08:00
Cyrus Najmabadi
7c0c788886
Specialize update method for both nodes and tokens.
2014-11-04 01:19:06 -08:00
Cyrus Najmabadi
6fd900b4c2
Faster fixedWidthTokenLength function.
2014-11-04 01:18:51 -08:00
Cyrus Najmabadi
ddfdfc3dd5
Change 'kind' into a property from a method.
2014-11-04 01:18:37 -08:00
Cyrus Najmabadi
5d06cd7461
Make ISyntaxElement.parent non-optional
2014-11-03 18:59:17 -08:00
Cyrus Najmabadi
296391619e
Encode child counts as an array, not as a switch.
2014-11-03 18:29:37 -08:00
Cyrus Najmabadi
8954538399
Remove SyntaxNode.ts file
...
Lots of cleanup of the syntax generator.
Sort definitions.
Remove unused class.
2014-11-03 00:30:52 -08:00
Cyrus Najmabadi
adb775c579
Simplifying node constructors
2014-11-02 23:54:26 -08:00
Cyrus Najmabadi
02ad58c7c7
Use functions instead of classes
2014-11-02 23:51:11 -08:00