def __parse_declarations(self, files, gccxml_config, compilation_mode, cache, indexing_suite_version): if None is gccxml_config: gccxml_config = parser.config_t() if None is compilation_mode: compilation_mode = parser.COMPILATION_MODE.FILE_BY_FILE start_time = time.clock() self.logger.debug('parsing files - started') reader = parser.project_reader_t(gccxml_config, cache, decl_wrappers.dwfactory_t()) decls = reader.read_files(files, compilation_mode) self.logger.debug('parsing files - done( %f seconds )' % (time.clock() - start_time)) self.logger.debug('settings declarations defaults - started') global_ns = decls_package.matcher.get_single( decls_package.namespace_matcher_t(name='::'), decls) if indexing_suite_version != 1: for cls in global_ns.classes(): cls.indexing_suite_version = indexing_suite_version for cls in global_ns.decls( decl_type=decls_package.class_declaration_t): cls.indexing_suite_version = indexing_suite_version start_time = time.clock() self.__apply_decls_defaults(decls) self.logger.debug( 'settings declarations defaults - done( %f seconds )' % (time.clock() - start_time)) return global_ns
def __parse_declarations( self, files, gccxml_config, compilation_mode, cache, indexing_suite_version ): if None is gccxml_config: gccxml_config = parser.config_t() if None is compilation_mode: compilation_mode = parser.COMPILATION_MODE.FILE_BY_FILE start_time = time.clock() self.logger.debug( 'parsing files - started' ) reader = parser.project_reader_t( gccxml_config, cache, decl_wrappers.dwfactory_t() ) decls = reader.read_files( files, compilation_mode ) self.logger.debug( 'parsing files - done( %f seconds )' % ( time.clock() - start_time ) ) self.logger.debug( 'settings declarations defaults - started' ) global_ns = decls_package.matcher.get_single( decls_package.namespace_matcher_t( name='::' ) , decls ) if indexing_suite_version != 1: for cls in global_ns.classes(): cls.indexing_suite_version = indexing_suite_version for cls in global_ns.decls(decl_type=decls_package.class_declaration_t): cls.indexing_suite_version = indexing_suite_version start_time = time.clock() self.__apply_decls_defaults(decls) self.logger.debug( 'settings declarations defaults - done( %f seconds )' % ( time.clock() - start_time ) ) return global_ns
def __parse_declarations( self, files, gccxml_config, compilation_mode=None, cache=None ): if None is gccxml_config: gccxml_config = parser.config_t() if None is compilation_mode: compilation_mode = parser.COMPILATION_MODE.FILE_BY_FILE start_time = time.clock() self.logger.debug( 'parsing files - started' ) reader = parser.project_reader_t( gccxml_config, cache, decl_wrappers.dwfactory_t() ) decls = reader.read_files( files, compilation_mode ) self.logger.debug( 'parsing files - done( %f seconds )' % ( time.clock() - start_time ) ) return decls_package.matcher.get_single( decls_package.namespace_matcher_t( name='::' ) , decls )
def __parse_declarations(self, files, gccxml_config, compilation_mode=None, cache=None): if None is gccxml_config: gccxml_config = parser.config_t() if None is compilation_mode: compilation_mode = parser.COMPILATION_MODE.FILE_BY_FILE start_time = time.clock() self.logger.debug('parsing files - started') reader = parser.project_reader_t(gccxml_config, cache, decl_wrappers.dwfactory_t()) decls = reader.read_files(files, compilation_mode) self.logger.debug('parsing files - done( %f seconds )' % (time.clock() - start_time)) return decls_package.matcher.get_single( decls_package.namespace_matcher_t(name='::'), decls)