Browse Source

Change format of symbols to fit databse model.

tags/v1.0^2
Benjamin Attal 10 years ago
parent
commit
ca4bb8ff42
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      bitshift/parser/__init__.py

+ 7
- 0
bitshift/parser/__init__.py View File

@@ -125,4 +125,11 @@ def parse(codelet):
server_socket.send("%d\n%s" % (len(source), source))

symbols = json.loads(_recv_data(server_socket))
symbols = {key: [(name, [tuple(loc)
for loc in syms[name]['assignments']],
[tuple(loc) for loc in syms[name]['uses']])
for name in syms.keys()]
for key, syms in symbols.iteritems()}

print symbols
codelet.symbols = symbols

Loading…
Cancel
Save