This requires quite a bit more thorough cleanup. I got it to the point where the titlepic appears after restarting, but it still crashes when starting the game so there's more data that needs to be cleaned up...
- Member variables are now declared all in one place: InitThingdef(). They
are not partially defined in thingdef_expression.cpp and further refined
in actor.txt.
- This left ParseNativeVariable() parsing only functions, so it has been
renamed to ParseNativeFunction().
- Note that their declarations in InitThingdef() are expected to be
temporary.
- PType::FindConversion() can find a path to convert one type to another.
This is completely generic and can handle any number of conversion
functions.
- I can't believe I completely forgot to let the parser handle true and
false literals.
- Consolidate all the %include blocks in zcc-parse.lemon into a single
one, because Lemon all of a sudden decided it didn't like me having more
than one in the grammar file.
- Added a PBool type to represent boolean values with.
- Added TypeVoid for statements, which produce no type.
- Added TypeError for expressions whose arguments are incompatible.
- Pointers now derive from PBasicType instead of PInt. Since they have their own register sets in the VM, this seems to make more sense than treating them as integers.
- Constants can be strings, but the existing PSymbolConst couldn't handle
them. The old PSymbolConst is now PSymbolConstNumeric, and the new
PSymbolConst is a now a baseclass for it and PSymbolConstString.
- The type systems used by PField and FxExpression are completely
incompatible, but I think I got the differences taken care of as far
as ParseNativeVariable(), ParseUserVariable(), and FxClassMember are
concerned.
- Support for declaring native bool variables has been removed for the time
being. It wasn't used anyway.
- Removed PSymbolVariable.
- For Prototypes, Hash is passed the address of two TArrays. If we blindly
hash those without checking their contents, then we can forget about
ever finding any matching prototypes in the type table. (Not that I
remember why I wanted them to be unique, but I'm sure I must have had my
reasons.)
- This all became vestigial code after the relevant information was all
moved into FStateTempCall. Now that the MBF code pointer code has been
converted, I can be sure it wasn't still used anywhere.
me realize I would be better off creating a type-agnostic AST for the entire input instead
of trying to tentatively create types before they're seen.)
SVN r2354 (scripting)
instead of PClass::m_Types (now PClass::AllClasses).
- Removed ClassIndex from PClass. It was only needed by FArchive, and maps take care of the
problem just as well.
- Moved PClass into a larger type system (which is likely to change some/lots once I try and actually use it and have a better feel for what I need from it).
SVN r2281 (scripting)