Details
-
Bug
-
Resolution: Fixed
-
P4: Low
-
6.7
-
None
-
8b7551264 (dev)
Description
After formatting of the following statements (most likely the whole class of statements where BinaryExpression of FunctionExpression or something(undiscovered yet) is taking place)
1) export default 1 + 1 //BinaryExpression 2) export default(x,y) => x + 2 //FunctionExpression
semicolon is missing. Maybe it's not needed, however "js prettier" adds it.
This task can be treated as an acknowledgement and documentation of this fact.
If the fix is needed, the starting debugging / implementation points could be
bool ScriptFormatter::visit(FunctionExpression *ast) {
....
if (ast->body) { <one line body> }
}