From 223bab21aa803e9eea87abde1a99b1420699f0f7 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Sat, 16 Mar 2019 00:11:04 +0100 Subject: [PATCH] less verbose anon label names --- compiler/src/prog8/ast/AST.kt | 2 +- compiler/src/prog8/compiler/target/c64/AsmGen.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/src/prog8/ast/AST.kt b/compiler/src/prog8/ast/AST.kt index 903e9e38b..26246768a 100644 --- a/compiler/src/prog8/ast/AST.kt +++ b/compiler/src/prog8/ast/AST.kt @@ -1584,7 +1584,7 @@ class AnonymousScope(override var statements: MutableList, override lateinit var parent: Node init { - name = "<<>>" + name = "" // make sure it's an invalid soruce code identifier so user source code can never produce it sequenceNumber++ } diff --git a/compiler/src/prog8/compiler/target/c64/AsmGen.kt b/compiler/src/prog8/compiler/target/c64/AsmGen.kt index 109fc4a91..e6e0b0ec9 100644 --- a/compiler/src/prog8/compiler/target/c64/AsmGen.kt +++ b/compiler/src/prog8/compiler/target/c64/AsmGen.kt @@ -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 "<<>>") to something that's allowed. + // Also, convert invalid label names (such as "") to something that's allowed. // Also have to do that for the variablesMarkedForZeropage! val newblocks = mutableListOf() 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)