mirror of
https://github.com/irmen/prog8.git
synced 2024-11-22 15:33:02 +00:00
less verbose anon label names
This commit is contained in:
parent
563122ac92
commit
223bab21aa
@ -1584,7 +1584,7 @@ class AnonymousScope(override var statements: MutableList<IStatement>,
|
||||
override lateinit var parent: Node
|
||||
|
||||
init {
|
||||
name = "<<<anonymous-$sequenceNumber>>>"
|
||||
name = "<anon-$sequenceNumber>" // make sure it's an invalid soruce code identifier so user source code can never produce it
|
||||
sequenceNumber++
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ class AsmGen(val options: CompilationOptions, val program: IntermediateProgram,
|
||||
init {
|
||||
// Because 64tass understands scoped names via .proc / .block,
|
||||
// we'll strip the block prefix from all scoped names in the program.
|
||||
// Also, convert invalid label names (such as "<<<anonymous-1>>>") to something that's allowed.
|
||||
// Also, convert invalid label names (such as "<anon-1>") to something that's allowed.
|
||||
// Also have to do that for the variablesMarkedForZeropage!
|
||||
val newblocks = mutableListOf<IntermediateProgram.ProgramBlock>()
|
||||
for(block in program.blocks) {
|
||||
@ -128,7 +128,7 @@ class AsmGen(val options: CompilationOptions, val program: IntermediateProgram,
|
||||
scoped
|
||||
}
|
||||
}
|
||||
name = name.replace("<<<", "prog8_").replace(">>>", "")
|
||||
name = name.replace("<", "prog8_").replace(">", "") // take care of the autogenerated invalid (anon) label names
|
||||
if(name=="-")
|
||||
return "-"
|
||||
if(blockLocal)
|
||||
|
Loading…
Reference in New Issue
Block a user