ClosureJsAstTranslator translator = new ClosureJsAstTranslator(validate, program);
Node root = translator.translate(fragment, inputId, source);
globalVars.addAll(translator.getGlobalVariableNames());
externalProps.addAll(translator.getExternalPropertyReferences());
externalVars.addAll(translator.getExternalVariableReferences());
SourceAst sourceAst = new ClosureJsAst(inputId, root);
CompilerInput input = new CompilerInput(sourceAst, false);
return input;
}