aboutsummaryrefslogtreecommitdiffstats
path: root/python/vhdl_langserver/symbols.py
diff options
context:
space:
mode:
authorm-kru <mkru@protonmail.com>2020-08-15 04:17:53 +0200
committerGitHub <noreply@github.com>2020-08-15 04:17:53 +0200
commit8789de969e6673b195cbb28a692cc3fbbaa806e1 (patch)
tree51bf27abf5c553944543be5650ee2632a7b4153f /python/vhdl_langserver/symbols.py
parent68b879eb404e12a6414ef56e697b6dc99618d457 (diff)
downloadghdl-8789de969e6673b195cbb28a692cc3fbbaa806e1.tar.gz
ghdl-8789de969e6673b195cbb28a692cc3fbbaa806e1.tar.bz2
ghdl-8789de969e6673b195cbb28a692cc3fbbaa806e1.zip
py: adjust blank lines to PEP 8 for vhdl_langserver (#1434)
Why? 1. Conform to PEP 8. 2. Easier to read. 3. Make tools, such as PyCharm, not complain.
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