}
private List<JsStatement> parse(List<JsStatement> expected, boolean compact)
throws Exception {
TextOutput text = new DefaultTextOutput(compact);
JsVisitor generator = new JsSourceGenerationVisitor(text);
generator.acceptList(expected);
return JsParser.parse(SourceOrigin.UNKNOWN, new JsProgram().getScope(),
new StringReader(text.toString()));
}