aboutsummaryrefslogtreecommitdiffstats
path: root/python/vhdl_langserver/symbols.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/vhdl_langserver/symbols.py')
-rw-r--r--python/vhdl_langserver/symbols.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/vhdl_langserver/symbols.py b/python/vhdl_langserver/symbols.py
index b39827bed..11335408c 100644
--- a/python/vhdl_langserver/symbols.py
+++ b/python/vhdl_langserver/symbols.py
@@ -67,16 +67,19 @@ SYMBOLS_MAP = {
nodes.Iir_Kind.Configuration_Specification: {'kind': None},
}
+
def location_to_position(fe, loc):
assert loc != files_map.No_Location
line = files_map.Location_File_To_Line(loc, fe)
off = files_map.Location_File_Line_To_Offset(loc, fe, line)
return {'line': line - 1, 'character': off}
+
def get_symbols_chain(fe, n):
res = [get_symbols(fe, el) for el in pyutils.chain_iter(n)]
return [e for e in res if e is not None]
+
def get_symbols(fe, n):
if n == nodes.Null_Iir:
return None