Skip to content

Commit

Permalink
Remove TODO from code and make bug #159 instead
Browse files Browse the repository at this point in the history
  • Loading branch information
stuaxo committed May 7, 2018
1 parent 1492481 commit b7490ac
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions shoebot/grammar/livecode.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,13 @@ def load_edited_source(self, source, good_cb=None, bad_cb=None, filename=None):

def reload_functions(self):
"""
Recompile functions
Replace functions in namespace with functions from edited_source.
"""
with LiveExecution.lock:
if self.edited_source:
source = self.edited_source
tree = ast.parse(source)
for f in [n for n in ast.walk(tree) if isinstance(n, ast.FunctionDef)]:
# TODO - Could modify __code__ etc of functions, but this info will
# need to be saved if thats the case

self.ns[f.name] = meta.decompiler.compile_func(f, self.filename, self.ns)

def do_exec(self, source, ns, tenuous = False):
Expand Down

0 comments on commit b7490ac

Please sign in to comment.