Sign in to follow this  
dxj19831029

ParseToken usage

Recommended Posts

ParseToken would only be a minor part of an IntelliSense solution.

In order to implement IntelliSense you need to scan the script to search for declarations that can be used for the auto-suggestions that IntelliSense provides for the user. The ParseToken comes into the picture during the scanning of the script.

If you're interested in implementing your own IntelliSense solution, you may get a basis for how to scan the script from the CScriptBuilder add-on. The way the builder add-on scans for meta-data and stores the class, functions, and variable declarations is very similar to what an IntelliSense solution would need to do.

Regards,
Andreas

Share this post


Link to post
Share on other sites
Andreas, have you ever looked into Microsoft's DLR (Dynamic Language Runtime) for .NET? It is what IronPython and IronRuby is based upon. The idea is running dynamic languages (scripting) in .NET

What's interesting is the Microsoft.Scripting interface, which is how one interfaces with IronPython, etc. The interface is a little similar to AngelScript's interface. One of the things that exists is, through their "ParseToken" is a way to get, what they call, "Token Triggers" which would be:
* "Member select" for the "."
* "Function parameter start" for the "("
* "Function parameter next" for the "," (within function parameter list)
* "Function parameter end" for the ")"
* etc.

I bring this up for two reasons:
1) Microsoft did pretty well with their interface, generalized across "any" dynamic language. It may give you ideas for functions and interface.
2) You can write Angelscript.NET if you wanted ;)

Share this post


Link to post
Share on other sites
I've yet to look into Microsoft's DLR, however now that you mentioned it I'll definitely take a look at it.

I'm not very interested in writing AngelScript.NET, at least not until the C++ version is more complete. Besides, AngelScript can already be used in .NET applications by writing a simple .NET layer on the library and compiling it with managed C++. SiCrane actually sent me a project for this, I may add this as an add-on in the SDK.

Share this post


Link to post
Share on other sites
:)

Are you going to implement this into angelscript? If yeah, wat's the plan time to do it? I am considering to implement this as well, but I am also very busy to start this until I can finish my current job on hand, I don't want to start to implement something that you are going to introduce in the angelscript.

By the way, I already got a structure in my head, but I need to look at your source code for the tokenparsor and related parts of code to plug them into my design, that will take some time. It is really good if you can put some basic thing into angelscript.


:)

Cheers



Quote:
Original post by WitchLord
I've yet to look into Microsoft's DLR, however now that you mentioned it I'll definitely take a look at it.

I'm not very interested in writing AngelScript.NET, at least not until the C++ version is more complete. Besides, AngelScript can already be used in .NET applications by writing a simple .NET layer on the library and compiling it with managed C++. SiCrane actually sent me a project for this, I may add this as an add-on in the SDK.


Share this post


Link to post
Share on other sites
Quote:
Original post by WitchLord
SiCrane actually sent me a project for this, I may add this as an add-on in the SDK.

It's been updated for AS 2.15 since the last time I mentioned it. I've reuploaded an archive in the same place. It contains both my .NET AngelScript bindings and my primitive AngelScript IDE.

Share this post


Link to post
Share on other sites
Quote:
Original post by dxj19831029
Are you going to implement this into angelscript? If yeah, wat's the plan time to do it? I am considering to implement this as well, but I am also very busy to start this until I can finish my current job on hand, I don't want to start to implement something that you are going to introduce in the angelscript.


I have no immediate intention of implementing this support. There are many other features with more importance than built-in support for intellisense.

I will however accept contributions, if you decide to implement it yourself. If you can keep the intellisense support separated from the core engine (similar to how I did it with the CScriptBuilder) the better.

Share this post


Link to post
Share on other sites

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