remove %option align_xxx (block level alignment, as we now have better alternatives)

This commit is contained in:
Irmen de Jong
2024-10-26 21:18:34 +02:00
parent c9535049c8
commit 1f2d46628e
12 changed files with 9 additions and 72 deletions
+1 -8
View File
@@ -80,18 +80,11 @@ class PtBlock(name: String,
val options: Options,
position: Position
) : PtNamedNode(name, position), IPtStatementContainer {
enum class BlockAlignment {
NONE,
WORD,
PAGE
}
class Options(val address: UInt? = null,
val forceOutput: Boolean = false,
val noSymbolPrefixing: Boolean = false,
val veraFxMuls: Boolean = false,
val ignoreUnused: Boolean = false,
val alignment: BlockAlignment = BlockAlignment.NONE)
val ignoreUnused: Boolean = false)
}
+1 -2
View File
@@ -97,8 +97,7 @@ fun printAst(root: PtNode, skipLibraries: Boolean, output: (text: String) -> Uni
}
is PtBlock -> {
val addr = if(node.options.address==null) "" else "@${node.options.address.toHex()}"
val align = if(node.options.alignment==PtBlock.BlockAlignment.NONE) "" else "align=${node.options.alignment}"
"\nblock '${node.name}' $addr $align"
"\nblock '${node.name}' $addr"
}
is PtConstant -> {
val value = when(node.type) {