private SoyMsgBundle doExtractMsgs ( ) { // extractMsgs disables a bunch of passes since it is typically not configured with things // like global definitions, type definitions, plugins, etc. SoyFileSetNode soyTree = parse ( passManagerBuilder ( ) . allowUnknownGlobals ( ) . allowV1Expression ( ) . setTypeRegistry ( SoyTypeRegistry . DEFAULT_UNKNOWN ) // TODO(lukes): consider changing this to pass a null resolver instead of the // ALLOW_UNDEFINED mode . setPluginResolver ( new PluginResolver ( PluginResolver . Mode . ALLOW_UNDEFINED , printDirectives , soyFunctionMap , soySourceFunctionMap , errorReporter ) ) . disableAllTypeChecking ( ) , // override the type registry so that the parser doesn't report errors when it // can't resolve strict types SoyTypeRegistry . DEFAULT_UNKNOWN ) . fileSet ( ) ; throwIfErrorsPresent ( ) ; SoyMsgBundle bundle = new ExtractMsgsVisitor ( ) . exec ( soyTree ) ; throwIfErrorsPresent ( ) ; return bundle ; }
Performs the parsing and extraction logic .