remove 'romsub' as a recognised alternative for 'extsub'

This commit is contained in:
Irmen de Jong 2024-11-18 23:02:31 +01:00
parent 9da70bdf05
commit fb0d9b46b0
3 changed files with 2 additions and 4 deletions

View File

@ -176,8 +176,6 @@ private fun AsmsubroutineContext.toAst(): Subroutine {
}
private fun ExtsubroutineContext.toAst(): Subroutine {
if(this.text.startsWith("romsub"))
println("INFO ${toPosition().toClickableStr()} 'romsub' keyword is deprecated, change to 'extsub'") // TODO eventually, remove this 'romsub' support altogether
val subdecl = asmsub_decl().toAst()
val constbank = constbank?.toAst()?.number?.toUInt()?.toUByte()
val varbank = varbank?.toAst()

View File

@ -3,7 +3,7 @@
main {
sub start() {
romsub $fff1 = WriteCharacter(ubyte character @A)
extsub $fff1 = WriteCharacter(ubyte character @A)
for cx16.r0L in "\n\n\n.... Hello from Prog8 :-)"
WriteCharacter(cx16.r0L)

View File

@ -296,7 +296,7 @@ asmsubroutine :
;
extsubroutine :
('romsub' | 'extsub') ('@bank' (constbank=integerliteral | varbank=scoped_identifier))? address=integerliteral '=' asmsub_decl
'extsub' ('@bank' (constbank=integerliteral | varbank=scoped_identifier))? address=integerliteral '=' asmsub_decl
;
asmsub_decl : identifier '(' asmsub_params? ')' asmsub_clobbers? asmsub_returns? ;