forked from M-Labs/artiq
1
0
Fork 0

compiler.embedding: handle calls into lambdas (poorly).

This commit is contained in:
whitequark 2015-08-28 05:13:38 -05:00
parent 5916c10b24
commit b35051cb08
1 changed files with 4 additions and 1 deletions

View File

@ -471,6 +471,9 @@ class Stitcher:
line += 1
source_line = linecache.getline(filename, line)
if "<lambda>" in function.__qualname__:
column = 0 # can't get column of lambda
else:
column = re.search("def", source_line).start(0)
source_buffer = source.Buffer(source_line, filename, line)
return source.Range(source_buffer, column, column)