1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-08-03 01:29:04 +00:00

Removed support for inline kickasm in the global scope. Now only kickasm inside functions (code) or kickasm as initializer for arrays are supported.

This commit is contained in:
jespergravgaard 2020-06-22 23:53:34 +02:00
parent f027b58a16
commit 3781096d01
5 changed files with 923 additions and 935 deletions

View File

@ -34,7 +34,6 @@ decl
| structDef ';'
| enumDef ';'
| declFunction
| declKasm
| globalDirective
| typeDef ';'
;

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -13,16 +13,16 @@ void main() {
} else {
f = &fn2;
}
kickasm(uses f) {{
kickasm(uses f, uses ff) {{
jsr ff
}}
}
}
kickasm {{
ff:
// Inline KickAsm function
char ff[] = kickasm {{
jmp (main.f)
}}
}};
void fn1() {
byte* const BORDER_COLOR = $d020;

View File

@ -12,4 +12,4 @@ void main() {
// KickAsm data initializer
export char A[] = kickasm {{
.byte 1, 2, 3
}}
}};