Advertisement

Preprocessor

Started by December 25, 2004 02:59 PM
2 comments, last by WitchLord 19 years, 11 months ago
It now supports #ifdef, #ifndef, and #endif. There have been changes to how it works. It is no longer tied to angelscript at all: it is it's own seperate entity. It makes no effort to preserve line numbering or file names for error reporting from angelscript. It will preprocess a correct file correctly, but there is no guarantee that an incorrect file won't pass right through it. It proved quicker to write it again from scratch than to refactor it, so I did. The interface is somewhat different. You call the function 'preprocess' with two arguments: A source file and a destination file. The preprocessed file is saved to the destination file, which you can then load and send to angelscript on your own. http://www.omnisu.com/preprocessor.zip Enjoy. Er. Christmas present? :D
I'm just wondering... why don't you just use the C preprocessor?
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Advertisement
I suppose right now it's equivilant to calling another exe and keeping the intermediate file; with the exception that it can be changed to behave differently.

Also, this is just a general subset of a much more specific preprocessor I needed to write to convert lots of old scripts to a more angelscript friendly structure. It has to do things like pull global variables out and change a funky message-label syntax to function declarations.
Great, I'll upload the new preprocessor to the site as soon as possible.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement