Trailing comma after rest - The final fix (#10491)

* [parser] Track trailing commas in extras instead of state

* Update existing tests

* Update test262 whitelist

* Improve error message and location

* nit

* Use lookaheadCharCode
This commit is contained in:
Nicolò Ribaudo
2019-10-08 23:08:50 +02:00
committed by GitHub
parent c7add11fdc
commit 34937f13d5
46 changed files with 226 additions and 100 deletions

View File

@@ -373,7 +373,10 @@
}
]
}
]
],
"extra": {
"trailingComma": 140
}
}
}
],
@@ -494,7 +497,10 @@
}
]
}
]
],
"extra": {
"trailingComma": 200
}
}
}
],

View File

@@ -74,6 +74,9 @@
},
"name": "fn"
},
"extra": {
"trailingComma": 11
},
"arguments": [
{
"type": "Identifier",

View File

@@ -74,6 +74,9 @@
},
"name": "fn"
},
"extra": {
"trailingComma": 7
},
"arguments": [
{
"type": "Identifier",

View File

@@ -181,6 +181,9 @@
}
}
],
"extra": {
"trailingComma": 35
},
"trailingComments": [
{
"type": "CommentBlock",

View File

@@ -309,7 +309,10 @@
}
]
}
]
],
"extra": {
"trailingComma": 66
}
}
}
],

View File

@@ -163,7 +163,10 @@
}
]
}
]
],
"extra": {
"trailingComma": 13
}
}
},
"trailingComments": [