Sign in to follow this  

Change '' '' statements

This topic is 4226 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

I want to change the sintax of angelscript from: function() { ... } to something like function() if( ... ) ... end if ( ... ) .. else .. end end But I dont know where to start. Its posible? [Edited by - Dokam on May 21, 2006 2:03:46 PM]

Share this post


Link to post
Share on other sites
You'll want to change the as_parser.cpp file, so that it parses the statement blocks correctly.

Take a look at the method asCParser::ParseStatementBlock() and how it is used. Your first change would be for it to not require the start token '{', and then you can rename the end token '}' to 'end' in the as_tokendef.h. Another change is to always require a statement block after if statements, as currently a statement block or a single statement is allowed.

Share this post


Link to post
Share on other sites
Thanks for the info, im on the right way now.

Another question, could I configure the language not case sensitive? I dont like scripters go with case sensitive problems when naming and using variables and function names.

Share this post


Link to post
Share on other sites
You'll have to see if WL has done all the string comparisons through one function, or just used strcmp all over the place. If the latter, do a 'find in files' for whatever function he is using, and change it to your own.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by gilad_novik
This is not a bad idea. Maybe there should be an option for the engine to use case insensitive syntax (when parsing)?

maybe via some sort of optional #pragma-like statement at the beginning of each script?

Share this post


Link to post
Share on other sites

This topic is 4226 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