Alex Zaworski
d26b7522d9
Allow 'name' as object literal shorthand property ( #1617 )
...
fixes #1613
2017-03-18 01:29:13 +08:00
Alex Lam S.L
1dd339f95e
fix unused crashes ( #1599 )
...
- `AST_DefaultAssign` on `keep_fargs`
- `AST_Expansion on` `keep_fargs`
- `AST_Destructuring` on top-level declarations without `toplevel`
2017-03-14 13:13:43 +08:00
alexlamsl
bc9bfd15a2
fix test
2017-02-27 11:39:48 +08:00
Anthony Van de Gejuchte
13ed445607
Improve support for binding pattern
...
Including improvements for parameters, variable assignment and
catch parameter.
2016-09-05 17:48:48 +02:00
Richard van Velzen
1db50c3b16
Don't parenthesize arrow functions in parameter lists
2016-09-02 09:35:31 +02:00
Anthony Van de Gejuchte
1c15d0db45
Fix quoting of properties
...
- Make AST_ConciseMethod child of AST_ObjectProperty.
- Fix some typos.
2016-08-26 15:06:24 +02:00
Anthony Van de Gejuchte
72a9d799b6
Various property fixes
...
* Implement getter/setter with computed value
* Fix parsing getter/setter after static or generator token
* Allow storing expressions for computed expression in AST_SymbolMethod
* Allow get and set in shorthand properties in object literals
Fixes #1094 , #1146 and #1221
2016-07-21 16:50:32 +02:00
Anthony Van de Gejuchte
0af42d1831
Template fixes
...
* Fixes #1147 : template strings not obeying -b ascii_only true
* Allow evaluation of template expressions by adding optimizers and
walkers
* Make sure tagged templates are never changed
* Remove template tokenizer in parser, add template tokenizer in
tokenizer. It is using a brace counter to track brace position of
templates
* Add tokens `template_head` and `template_substitution` but parsing
tokens stays mostly the same
* Do not output strings anymore in AST_TemplateString, instead use
AST_TemplateSegment
* Fix parsing tagged templates, allowing multiple templates behind
as spec allows this
These changes don't influence tagged templates because raw content
may influence code execution, however they are safe to do in normal
templates:
* Allow basic string concatenation of templates where possible
* Allow custom character escape style similar to strings, except in
tagged templates
Note that expressions are still compressed in tagged templates.
Optional things that may be improved later:
* Custom quote style for templates if it doesn't have expressions.
Making it obey the quote_style option if this is the case.
2016-07-17 00:36:42 +02:00
Anthony Van de Gejuchte
dda58244b6
Fixes to prevent failing tests after merging master
...
* Add missing quote properties to AST_ObjectKeyVal
* Avoid test results being interpret as directives
2016-06-20 15:02:09 +02:00
Anthony Van de Gejuchte
ca04508cd1
Restrict yield outside generators in strict mode
...
* Move some yield/generic tests from compress/harmony.js to
compress/yield.js
* Adjust error messages to conform ecmascript standards
2016-06-19 21:03:36 +02:00
Anthony Van de Gejuchte
dcfc514c38
Improve yield support and restrict usage of strict
...
- Partially reverting 91cdb93e57 and eaf3911c31 and reimplement
- Add generators support for objects and classes
- Only classes can have static methods so restrict use of it
Special thanks to @rvanvelzen and @kzc for reviewing this patch and
providing constructive feedback over and over again.
2016-06-09 22:22:15 +02:00
not-an-aardvark
5b893c8ec3
Avoid syntax error in yield assignments ( fixes #1054 )
2016-04-25 19:14:44 -04:00
Richard van Velzen
68cc14f846
Fixups after merge
2016-04-18 15:51:32 +02:00
Darío Javier Cravero
91cdb93e57
Implement harmony generators and yield
...
Uses #716 's implementation and adds tests.
Fixes #716 .
2016-04-13 14:22:08 +02:00
Fábio Santos
6702cae918
fix #1021
2016-03-27 12:21:39 +01:00
Fábio Santos
6d2f77c180
fix #1003 by removing AST_ObjectSymbol and using AST_ObjectKeyVal for the same effect
2016-03-14 13:42:50 +01:00
Fábio Santos
0bc4f6edb4
Don't mangle exported symbols
2016-03-14 12:54:05 +01:00
Fábio Santos
ce84a706a3
Implement the export statement
2016-03-14 12:54:05 +01:00
Fábio Santos
86b5248837
Mangling externally imported names by using aliasing
2016-03-14 12:54:05 +01:00
Fábio Santos
59e1601fb8
importing names in the modules, not just default imports
2016-03-14 12:54:05 +01:00
Fábio Santos
d35a9e7839
Importing names from places
2016-03-14 12:54:05 +01:00
Fábio Santos
0465bd270d
Starting out the import statement
2016-03-14 12:54:05 +01:00
Fábio Santos
d7ec2ecc12
Fix #931 : Create arrow functions in maybe_assign so that they can be used in assignments
2016-02-09 00:02:23 +00:00
Fábio Santos
028ff64e9a
Default values inside destructurings
2016-01-19 19:22:22 +01:00
Fábio Santos
5b553aafe2
Destructuring parameters with defaults. function x({ foo, bar } = {}) { }
2016-01-19 19:22:22 +01:00
Fábio Santos
084437bc6d
Non-destructuring default parameters
2016-01-19 19:22:22 +01:00
Fábio Santos
a800356ad0
Implement new.target
2015-11-21 14:48:23 +00:00
Fábio Santos
e076abdbf2
Mangle class names correctly
2015-11-21 13:59:18 +00:00
Fábio Santos
425613b0d2
mangle class names
2015-11-21 12:20:20 +00:00
Fábio Santos
9ffed2bea6
static properties
2015-10-27 12:24:37 +00:00
Fábio Santos
5f7cb6939c
Starting ES6 classes
2015-10-27 12:24:37 +00:00
Fábio Santos
64e7a00399
Accept keyword names as concise method names
2015-10-27 09:31:16 +01:00
Fábio Santos
c99eaae360
Make concise methods work with propmangle
2015-10-27 09:31:16 +01:00
Fábio Santos
da8c428a07
Just making sure that concise methods are separated by commas. When classes come, they won't be necessary.
2015-10-27 09:31:16 +01:00
Fábio Santos
0d8dea9538
start concise methods
2015-10-27 09:31:16 +01:00
Fábio Santos
2cce61c564
Allow 'of' to be a name.
2015-10-26 20:56:59 +00:00
Fábio Santos
76ed083e47
Using single quotes
2015-10-12 21:39:19 +01:00
Fábio Santos
b31918bbf0
computed properties
2015-10-12 21:38:20 +01:00
Richard van Velzen
34685a6f55
Merge pull request #794 from fabiosantoscode/feature/harmony-template-strings-2
...
Harmony: template strings
2015-09-08 21:23:41 +02:00
Fábio Santos
2fac2bbfe4
Remove unused state variable in_parameters, and also remove unreachable code (try_an_object always returned an object!)
2015-09-05 23:01:29 +01:00
Fábio Santos
242c61be94
prefixed template strings, like "String.rawfoo\nbar".
2015-09-05 22:48:38 +01:00
Fábio Santos
e1cb1a0e3c
Parse and output ES6 template strings. Yikes!
2015-09-05 22:32:57 +01:00
Richard van Velzen
c8b82583d2
Merge pull request #773 from fabiosantoscode/harmony-typeof-arrows
...
Fix evaluating the typeof an arrow function.
2015-08-21 11:51:42 +02:00
Fábio Santos
36420183fd
s/binary/number/g
2015-08-17 16:23:43 +01:00
Fábio Santos
a8f8aa518b
Add new-style octal literals and make the B and the O case insensitive.
2015-08-17 11:50:56 +01:00
Fábio Santos
dcce4e5c66
Fix evaluating the typeof an arrow function. Using evaluate on used to cause a crash.
2015-08-14 22:05:42 +01:00
Fábio Santos
a68953c491
=> with destructuring arguments. Requires a lot of parser changes
2015-08-04 00:57:53 +01:00
Fábio Santos
fa5c4f2d03
Adding arrow functions
2015-08-04 00:57:53 +01:00