mirror of
https://github.com/irmen/prog8.git
synced 2024-12-24 01:29:28 +00:00
comment about builtin function call ast node type
This commit is contained in:
parent
70a2b11271
commit
ea3871d0c4
@ -1,5 +1,4 @@
|
||||
%import syslib
|
||||
%import textio
|
||||
|
||||
; Bitmap pixel graphics module for the CommanderX16
|
||||
; Wraps the graphics functions that are in ROM.
|
||||
@ -35,7 +34,7 @@ graphics {
|
||||
sub disable_bitmap_mode() {
|
||||
; enables text mode, erase the text screen, color white
|
||||
void cx16.screen_mode(0, false)
|
||||
txt.clear_screen()
|
||||
cbm.CHROUT(147)
|
||||
}
|
||||
|
||||
|
||||
|
@ -1272,11 +1272,15 @@ internal class AstChecker(private val program: Program,
|
||||
}
|
||||
|
||||
override fun visit(bfc: BuiltinFunctionCall) {
|
||||
// most function calls, even to builtin functions, are still regular FunctionCall nodes here.
|
||||
// they get converted to the more specialized node type in BeforeAsmTypecastCleaner
|
||||
checkLongType(bfc)
|
||||
super.visit(bfc)
|
||||
}
|
||||
|
||||
override fun visit(functionCallStatement: FunctionCallStatement) {
|
||||
// most function calls, even to builtin functions, are still regular FunctionCall nodes here.
|
||||
// they get converted to the more specialized node type in BeforeAsmTypecastCleaner
|
||||
val targetStatement = functionCallStatement.target.checkFunctionOrLabelExists(program, functionCallStatement, errors)
|
||||
if(targetStatement!=null) {
|
||||
checkFunctionCall(targetStatement, functionCallStatement.args, functionCallStatement.position)
|
||||
|
@ -168,6 +168,7 @@ class TestCompilerOnExamplesBothC64andCx16: FunSpec({
|
||||
"cube3d-gfx",
|
||||
"dirlist",
|
||||
"fibonacci",
|
||||
"fractal-tree",
|
||||
"line-circle-gfx",
|
||||
"line-circle-txt",
|
||||
"maze",
|
||||
|
@ -14,7 +14,6 @@ Future Things and Ideas
|
||||
|
||||
- Add a new SublimeText syntax file for prog8, and also install this for bat: https://github.com/sharkdp/bat?tab=readme-ov-file#adding-new-syntaxes--language-definitions
|
||||
- callfar() should allow setting an argument in the X register as well?
|
||||
- AST weirdness: why is call(...) a normal FunctionCallStatement and not a BuiltinFunctionCall? What does ror() produce for instance?
|
||||
- Can we support signed % (remainder) somehow?
|
||||
- Don't add "random" rts to %asm blocks but instead give a warning about it? (but this breaks existing behavior that others already depend on... command line switch? block directive?)
|
||||
- IR: implement missing operators in AssignmentGen (array shifts etc)
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
main {
|
||||
sub start() {
|
||||
word x1 = -118
|
||||
word @shared x1 = -118
|
||||
floats.print(x1 as float)
|
||||
txt.nl()
|
||||
floats.print(x1 as float/1.9)
|
||||
|
Loading…
Reference in New Issue
Block a user