Committed the other changes done during a failed attempt of else

Fixed mark positioning - multiple if statements should work properly now

Added if() support

Added mark/reference system to be able to refer to positions in the buffered bytecode. Labels and go-to support.

Parser can now read expressions 100% properly and can perform variable assignment. I'd call this a milestone!

Negative literal integers work properly now..

Expression parser mostly up and running!! Still work to do on it though.

Added a preprocessor with proper #include support. Macro support via #define is planned too. God, was it a B-I-T-C-H to get working right, though..

- The output cmd-line argument is now optional - one is generated from the input file if not given.

Lifted the ';'-after-events rule, though it can still be present. C++ allows it for functions, so this feels like the best solution regarding consistency.. I'm not even sure am I going overboard with this kind of stuff

Negative numbers are now considered numbers too...

Moved CharByte inside DataBuffer since that's where it belongs anyway.

Added comment support

Rid the qbyte type as I just use long everywhere anyway

Mainloop and onenter definitions are now written into separate buffers first and only written to file after state ends. Why? Zandronum seems to demand that mainloop definitions MUST be written right after any onenter one. This way, mainloop and onenter definitions can be written without this restriction in the script. Also now I have a cool uchar-buffer class :)

Fixed unary operators..

Variables can now be assigned values, unfortunately not at top level.

Forgot the actual new code files out of previous commit

Added rudimentary global var support

Added -l command line parameter, if given, botc will list all available commands and exit.

Added string table and support for string parameters in commands.

Commands w/ arguments are now written correctly.

New rule: a semicolon is now required after events, mainloop, onexit and onenter definitions.

Events and commands are now treated properly case-insensitively.

Added mainloop/onenter/onexit support, fixed state writing.. this thing can compile the script for the `jumping arghbot` now!

Moved command parser to a new function.

If any optional parameters are skipped, default values are now filled in.

Parser now can read optional arguments properly.

MustString now behaves more like its siblings - sets token to result rather than returning it

Removed extdelimeters member, said delimeters are always enabled now.

(0) -30 +30 +50 +100 tip

mercurial