diff options
Diffstat (limited to 'lib/compilers/python.ts')
-rw-r--r-- | lib/compilers/python.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/compilers/python.ts b/lib/compilers/python.ts index 1036f2222..eaf1092d7 100644 --- a/lib/compilers/python.ts +++ b/lib/compilers/python.ts @@ -60,11 +60,11 @@ export class PythonCompiler extends BaseCompiler { const lineno = parseInt(match[1]); sourceLoc = {line: lineno, file: null}; lastLineNo = lineno; - } else if (!line) { + } else if (line) { + sourceLoc = {line: lastLineNo, file: null}; + } else { sourceLoc = {line: undefined, file: null}; lastLineNo = undefined; - } else { - sourceLoc = {line: lastLineNo, file: null}; } bytecodeResult.push({text: line, source: sourceLoc}); |