private CompilerInput createClosureJsAst(JsProgram program, JsProgramFragment fragment,
String source) {
String inputName = source;
InputId inputId = new InputId(inputName);
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);