mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 19:28:26 +08:00
embedding: ignore empty lines, like annotations, before kernel functions.
Fixes #363.
This commit is contained in:
parent
00c0a306ef
commit
aa0882a06f
@ -611,10 +611,10 @@ class Stitcher:
|
||||
line = function.__code__.co_firstlineno
|
||||
name = function.__code__.co_name
|
||||
|
||||
source_line = linecache.getline(filename, line)
|
||||
while source_line.lstrip().startswith("@"):
|
||||
source_line = linecache.getline(filename, line).lstrip()
|
||||
while source_line.startswith("@") or source_line == "":
|
||||
line += 1
|
||||
source_line = linecache.getline(filename, line)
|
||||
source_line = linecache.getline(filename, line).lstrip()
|
||||
|
||||
if "<lambda>" in function.__qualname__:
|
||||
column = 0 # can't get column of lambda
|
||||
|
Loading…
Reference in New Issue
Block a user