Closed Bug 965141 Opened 10 years ago Closed 5 years ago

Support ES6 syntax for prettyprinting

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: vporof, Unassigned)

References

(Blocks 1 open bug)

Details

for (let foo of bar) {}

Pretty prints to:

for (letfooofbar) {
}

Alternatively, if using var:

for (var fooofbar) {
}
Expected as it doesn't do ES6.

Would be nice if we could disable auto pretty printing only for chrome debugging.
Summary: Pretty printer can't handle for..of loops → [prettify] Pretty printer can't handle for..of loops
Priority: -- → P3
Summary: [prettify] Pretty printer can't handle for..of loops → Support ES6 syntax for prettyprinting
We can pass `{ ecmaVersion: 6 }` as an option to the tokenizer and get this functionality (most likely would want to bump to the latest version of acorn to get more features supported, but I believe it should work with the current version).
There's a particular case of es6 prettyprining that seems to be fixed by passing the option to acorn in Bug 951622
Depends on: 951622
...However, it doesn't fix the 
for (let foo of bar) -> for (let fooofbar) thing
Depends on: 1206633
Bug 938203 seems to be a similar meta bug for the same issue, but with different bugs under it.  Someone may want to fold them together if they work on this issue.
See Also: → 938203
Looks like duplicate of bug 938203...
Product: Firefox → DevTools

This is no longer an issue in the debugger.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.