mirror of
https://github.com/irmen/prog8.git
synced 2025-02-27 03:29:22 +00:00
fix %option merge possible error
This commit is contained in:
parent
9ca71bc937
commit
798383596d
@ -114,6 +114,9 @@ class ModuleImporter(private val program: Program,
|
||||
if(existingBlock!=null) {
|
||||
existingBlock.statements.addAll(block.statements.filter { it !is Directive })
|
||||
importedModule.statements.remove(block)
|
||||
} else {
|
||||
val merges = block.statements.filter { it is Directive && it.directive=="%option" && it.args.any { a->a.name=="merge" } }
|
||||
block.statements.removeAll(merges)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -168,6 +168,7 @@ class IntermediateAstMaker(private val program: Program, private val options: Co
|
||||
"align_word" -> alignment = PtBlock.BlockAlignment.WORD
|
||||
"align_page" -> alignment = PtBlock.BlockAlignment.PAGE
|
||||
"force_output" -> forceOutput=true
|
||||
"merge" -> { /* ignore this one */ }
|
||||
else -> throw FatalAstException("weird directive option: ${arg.name}")
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user