From b35051cb08e22edbff44914f4d67e491fa185b5c Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 28 Aug 2015 05:13:38 -0500 Subject: [PATCH] compiler.embedding: handle calls into lambdas (poorly). --- artiq/compiler/embedding.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/artiq/compiler/embedding.py b/artiq/compiler/embedding.py index dbac0fa17..5d6472e3c 100644 --- a/artiq/compiler/embedding.py +++ b/artiq/compiler/embedding.py @@ -471,7 +471,10 @@ class Stitcher: line += 1 source_line = linecache.getline(filename, line) - column = re.search("def", source_line).start(0) + if "" 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)