Beispiel #1
0
 def __init__(self, root_uri, server):
     self._root_uri = root_uri
     self._server = server
     self._root_path = lsp.path_from_uri(self._root_uri)
     self._docs = {}  # uri -> doc
     self._fe_map = {}  # fe -> doc
     self._prj = {}
     self._last_linted_doc = None
     errorout_memory.Install_Handler()
     libghdl.thin.flags.Flag_Elocations.value = True
     #thin.Flags.Verbose.value = True
     # We do analysis even in case of errors.
     libghdl.thin.vhdl.parse.Flag_Parse_Parenthesis.value = True
     # Force analysis to get more feedback + navigation even in case
     # of errors.
     libghdl.thin.flags.Flag_Force_Analysis.value = True
     # Do not consider analysis order issues.
     libghdl.thin.flags.Flag_Elaborate_With_Outdated.value = True
     libghdl.thin.errorout.Enable_Warning(errorout.Msgid.Warnid_Unused,
                                          True)
     self.read_project()
     self.set_options_from_project()
     libghdl.analyze_init()
     self._diags_set = set()  # Documents with at least one diagnostic.
     self.read_files_from_project()
     self.gather_diagnostics(None)
Beispiel #2
0
def init():
    """Initialization: set options and then load libaries"""
    libghdl.set_option(b'--std=08')
    libghdl.analyze_init()