Sign in to follow this  

how can i parse Script functions, variables, etc

This topic is 1273 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi all,

i'm developing a compiler for AngelScript using LLVM frontend

i have some questions:

how can i know what is the current line, it is a function? it is a variable, an expression, a statement, ETC!

and how can i know how many parameters does my function have, in order for LLVM to parse?

how can i know what is the return type?

how can i know the types of parameters?

how can i get a pointer to the script functions and objects?

thanks in advance

Share this post


Link to post
Share on other sites

thanks for your reply, but i want to know how can i parse these

for example, the library is compiled, how can i parse them? how can i know this line is a function, how many parameter does it have, what is the return type and anything else that may a compiler has

if you can, give a minimal example

thanks in advance

Share this post


Link to post
Share on other sites

I'm not quite sure what you're asking for, but perhaps you can use the asIScriptModule interface to enumerate the functions that were compiled, and then use the asIScriptFunction interface to get the information about the parameters and return types for each of the functions.

 

The manual gives an overview of how all the entities are enumerated and inspected.

Share this post


Link to post
Share on other sites

This topic is 1273 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this