ghewgill / neon-lang

Implementation of a simple programming language
MIT License
70 stars 3 forks source link

Function pointer needs to be able to point to predefined function #64

Open ghewgill opened 9 years ago

ghewgill commented 9 years ago

Implementation idea: For any predefined (or other special function) that does not have an address itself, create a thunk function that does have an address, that only calls the predefined function.

ghewgill commented 5 years ago

Test program:

TYPE Func IS FUNCTION(s: String)

LET f: Func := print
f("hello")
%= hello