jquery / esprima

ECMAScript parsing infrastructure for multipurpose analysis
http://esprima.org
BSD 2-Clause "Simplified" License
7.04k stars 786 forks source link

Translate Back AST to Javascript Code #2074

Closed jogibear9988 closed 3 years ago

jogibear9988 commented 3 years ago

I'm trying translate an AST to Javascript Code.

I got to following Problem:

 var a=[]
 for (var a=[];;){}

In the VaraibleDeclaration, I don't know if I need to apply a ";" at the end.

If I do it always, I can not add it in the for, but when in the for the first statement is no variable declaration, then it's wrong.