added 'inline' keyword to force inlining of trivial subroutines

This commit is contained in:
Irmen de Jong
2020-12-26 05:33:00 +01:00
parent c62ff16f8b
commit 170a0183f8
18 changed files with 89 additions and 57 deletions

View File

@@ -244,9 +244,10 @@ literalvalue :
inlineasm : '%asm' INLINEASMBLOCK;
inline: 'inline';
subroutine :
'sub' identifier '(' sub_params? ')' sub_return_part? (statement_block EOL)
inline? 'sub' identifier '(' sub_params? ')' sub_return_part? (statement_block EOL)
;
sub_return_part : '->' sub_returns ;
@@ -263,7 +264,7 @@ sub_params : vardecl (',' EOL? vardecl)* ;
sub_returns : datatype (',' EOL? datatype)* ;
asmsubroutine :
'asmsub' asmsub_decl statement_block
inline? 'asmsub' asmsub_decl statement_block
;
romsubroutine :