コード例 #1
0
ファイル: modules.py プロジェクト: Waxolunist/vimconf
 def parser(self):
     """ get the parser lazy """
     if not self._parser:
         try:
             parser = cache.parser_cache[self.path].parser
             cache.invalidate_star_import_cache(parser.module)
         except KeyError:
             pass
         # Call the parser already here, because it will be used anyways.
         # Also, the position is here important (which will not be used by
         # default), therefore fill the cache here.
         self._parser = fast_parser.FastParser(self.source, self.path,
                                                     self.position)
         # don't pickle that module, because it's changing fast
         cache.save_module(self.path, self.name, self._parser,
                                                         pickling=False)
     return self._parser
コード例 #2
0
ファイル: modules.py プロジェクト: heltondoria/vimconf
 def parser(self):
     """ get the parser lazy """
     if not self._parser:
         try:
             parser = cache.parser_cache[self.path].parser
             cache.invalidate_star_import_cache(parser.module)
         except KeyError:
             pass
         # Call the parser already here, because it will be used anyways.
         # Also, the position is here important (which will not be used by
         # default), therefore fill the cache here.
         self._parser = fast_parser.FastParser(self.source, self.path,
                                               self.position)
         # don't pickle that module, because it's changing fast
         cache.save_module(self.path,
                           self.name,
                           self._parser,
                           pickling=False)
     return self._parser
コード例 #3
0
ファイル: builtin.py プロジェクト: Waxolunist/vimconf
 def _load_module(self):
     source = self._get_source()
     p = self.path or self.name
     p = fast_parser.FastParser(source, p)
     cache.save_module(self.path, self.name, p)
     return p
コード例 #4
0
ファイル: builtin.py プロジェクト: heltondoria/vimconf
 def _load_module(self):
     source = self._get_source()
     p = self.path or self.name
     p = fast_parser.FastParser(source, p)
     cache.save_module(self.path, self.name, p)
     return p