mirror of
https://github.com/irmen/prog8.git
synced 2025-01-11 13:29:45 +00:00
dedup
This commit is contained in:
parent
a4d093afa1
commit
9678bbae4b
@ -238,9 +238,13 @@ class AsmGen6502Internal (
|
|||||||
|
|
||||||
internal fun isTargetCpu(cpu: CpuType) = options.compTarget.machine.cpu == cpu
|
internal fun isTargetCpu(cpu: CpuType) = options.compTarget.machine.cpu == cpu
|
||||||
|
|
||||||
|
private var lastSourceLineNumber: Int = -1
|
||||||
|
|
||||||
internal fun outputSourceLine(node: PtNode) {
|
internal fun outputSourceLine(node: PtNode) {
|
||||||
if(!options.includeSourcelines || node.position===Position.DUMMY)
|
if(!options.includeSourcelines || node.position===Position.DUMMY || node.position.line==lastSourceLineNumber)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
lastSourceLineNumber = node.position.line
|
||||||
val srcComment = "\t; source: ${node.position.file}:${node.position.line}"
|
val srcComment = "\t; source: ${node.position.file}:${node.position.line}"
|
||||||
val line = SourceLineCache.retrieveLine(node.position)
|
val line = SourceLineCache.retrieveLine(node.position)
|
||||||
if(line==null)
|
if(line==null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user