Commit 7c4c36f7 authored by Alexey Kozyatinskiy's avatar Alexey Kozyatinskiy Committed by Commit Bot

[DevTools] roll acorn to 5.5.3

New version of acorn support spread and rest operators.

R=dgozman@chromium.org

Bug: chromium:756006
Change-Id: I8c0a5a6d0f39027920f7d0e8b8df42a711262d97
Reviewed-on: https://chromium-review.googlesource.com/956559Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542031}
parent 88b34c8f
...@@ -82,4 +82,6 @@ let q = 1, s = await 2 ...@@ -82,4 +82,6 @@ let q = 1, s = await 2
undefined undefined
s s
2 2
await {...{foo: 42}}
{foo: 42}
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
await test('p'); await test('p');
await test('let q = 1, s = await 2'); await test('let q = 1, s = await 2');
await test('s'); await test('s');
await test('await {...{foo: 42}}');
await new Promise(resolve => ConsoleTestRunner.waitForRemoteObjectsConsoleMessages(resolve)); await new Promise(resolve => ConsoleTestRunner.waitForRemoteObjectsConsoleMessages(resolve));
ConsoleTestRunner.dumpConsoleMessages(); ConsoleTestRunner.dumpConsoleMessages();
TestRunner.completeTest(); TestRunner.completeTest();
......
...@@ -100,7 +100,7 @@ FormatterWorker.parseJSONRelaxed = function(content) { ...@@ -100,7 +100,7 @@ FormatterWorker.parseJSONRelaxed = function(content) {
* @param {string} content * @param {string} content
*/ */
FormatterWorker.evaluatableJavaScriptSubstring = function(content) { FormatterWorker.evaluatableJavaScriptSubstring = function(content) {
const tokenizer = acorn.tokenizer(content, {ecmaVersion: 8}); const tokenizer = acorn.tokenizer(content, {ecmaVersion: 9});
let result = ''; let result = '';
try { try {
let token = tokenizer.getToken(); let token = tokenizer.getToken();
...@@ -143,7 +143,7 @@ FormatterWorker.evaluatableJavaScriptSubstring = function(content) { ...@@ -143,7 +143,7 @@ FormatterWorker.evaluatableJavaScriptSubstring = function(content) {
*/ */
FormatterWorker.preprocessTopLevelAwaitExpressions = function(content) { FormatterWorker.preprocessTopLevelAwaitExpressions = function(content) {
let wrapped = '(async () => {' + content + '})()'; let wrapped = '(async () => {' + content + '})()';
const root = acorn.parse(wrapped, {ecmaVersion: 8}); const root = acorn.parse(wrapped, {ecmaVersion: 9});
const body = root.body[0].expression.callee.body; const body = root.body[0].expression.callee.body;
const changes = []; const changes = [];
let containsAwait = false; let containsAwait = false;
...@@ -227,7 +227,7 @@ FormatterWorker.preprocessTopLevelAwaitExpressions = function(content) { ...@@ -227,7 +227,7 @@ FormatterWorker.preprocessTopLevelAwaitExpressions = function(content) {
* @param {string} content * @param {string} content
*/ */
FormatterWorker.javaScriptIdentifiers = function(content) { FormatterWorker.javaScriptIdentifiers = function(content) {
const root = acorn.parse(content, {ranges: false, ecmaVersion: 8}); const root = acorn.parse(content, {ranges: false, ecmaVersion: 9});
/** @type {!Array<!ESTree.Node>} */ /** @type {!Array<!ESTree.Node>} */
const identifiers = []; const identifiers = [];
......
List of Acorn contributors. Updated before every release.
Adrian Heine
Adrian Rakovsky
Alistair Braidwood
Amila Welihinda
Andres Suarez
Angelo
Aparajita Fishman
Arian Stolwijk
Artem Govorov
Boopesh Mahendran
Bradley Heinz
Brandon Mills
Charles Hughes
Charmander
Conrad Irwin
Daniel Tschinder
David Bonnet
Domenico Matteo
ehmicky
Felix Maier
Forbes Lindesay
Gilad Peleg
impinball
Ingvar Stepanyan
Jackson Ray Hamilton
Jesse McCarthy
Jiaxing Wang
Joel Kemp
Johannes Herr
John-David Dalton
Jordan Klassen
Jürg Lehni
Kai Cataldo
keeyipchan
Keheliya Gallaba
Kevin Irish
Kevin Kwok
krator
laosb
Marek
Marijn Haverbeke
Martin Carlberg
Mat Garcia
Mathias Bynens
Mathieu 'p01' Henri
Matthew Bastien
Max Schaefer
Max Zerzouri
Mihai Bazon
Mike Rennie
naoh
Nicholas C. Zakas
Nick Fitzgerald
Olivier Thomann
Oskar Schöldström
Paul Harper
Peter Rust
PlNG
Prayag Verma
ReadmeCritic
r-e-d
Richard Gibson
Rich Harris
Sebastian McKenzie
Shahar Soel
Sheel Bedi
Simen Bekkhus
Teddy Katz
Timothy Gu
Toru Nagashima
Victor Homyakov
Wexpo Lyu
zsjforcn
Copyright (C) 2012-2014 by various contributors (see AUTHORS) Copyright (C) 2012-2018 by various contributors (see AUTHORS)
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment