Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add runtime test to see if a native function is defined #52

Open
velipso opened this issue Nov 9, 2018 · 1 comment
Open

Add runtime test to see if a native function is defined #52

velipso opened this issue Nov 9, 2018 · 1 comment

Comments

@velipso
Copy link
Owner

velipso commented Nov 9, 2018

Should be able to write code like:

if isnative drawcircle
  drawcircle 100, 100, 20
end

Not exactly sure how this should work syntactically though. If isnative foo is parsed like normal, then foo will run, so it would need to hack around that. But then isnative <expr> wouldn't work -- which is probably fine..?

Then you couldn't do dynamic function checks, but that's probably fine.

Also, I'd have to look to see if validating a program ensures that all native functions exist... because that would be wrong if isnative exists, since program code could contain native functions that are never executed.

velipso pushed a commit that referenced this issue Nov 11, 2018
@velipso
Copy link
Owner Author

velipso commented Nov 11, 2018

This is now implemented on master, but the beta binaries don't have it... I will close the ticket once I get around to building a new beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant