From fb0d9b46b04f33e9894b6c09fbc9f0a03b2d0fe8 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Mon, 18 Nov 2024 23:02:31 +0100 Subject: [PATCH] remove 'romsub' as a recognised alternative for 'extsub' --- compilerAst/src/prog8/ast/antlr/Antlr2Kotlin.kt | 2 -- examples/neo/hello.p8 | 2 +- parser/antlr/Prog8ANTLR.g4 | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/compilerAst/src/prog8/ast/antlr/Antlr2Kotlin.kt b/compilerAst/src/prog8/ast/antlr/Antlr2Kotlin.kt index a60b6383f..06c86bcab 100644 --- a/compilerAst/src/prog8/ast/antlr/Antlr2Kotlin.kt +++ b/compilerAst/src/prog8/ast/antlr/Antlr2Kotlin.kt @@ -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() diff --git a/examples/neo/hello.p8 b/examples/neo/hello.p8 index b52f77b32..78b8caa7e 100644 --- a/examples/neo/hello.p8 +++ b/examples/neo/hello.p8 @@ -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) diff --git a/parser/antlr/Prog8ANTLR.g4 b/parser/antlr/Prog8ANTLR.g4 index 01b0cab2a..ba15984ea 100644 --- a/parser/antlr/Prog8ANTLR.g4 +++ b/parser/antlr/Prog8ANTLR.g4 @@ -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? ;