Oh, you so sneaky ;)
I do my best
Actually, this would have to be part of the core library itself as it would be such an integral part of the language.
I'll try to list the things that need changes, though it will most likely not be trivial task to get this to work.
- asCParser::ParseClass(). This method needs to change the way it parses the members so the initialization can be informed. I would probably change it to call the ParseDeclaration() or ParseGlobalVar(), as the syntax is identical.
- asCBuilder::CompileFunctions(). This method needs to be changed so that the compiler receives the initialization statements for the class members when compiling the class constructors.
- asCCompiler::CompileDefaultConstructor(). This method would probably have to be completely rewritten to initialize the members according to the expressions given in the declaration.
- asCCompiler::CompileFunction(). This method will have to be modified to handle the compilation of manually defined constructors, where part of the initialization is informed in the member declaration and part of it in the constructor itself. This will likely be the most complicated part to get right. If a member is initialized both in the declaration and the constructor, then the constructor should possibly ignored the initialization from the declaration, or otherwise first do the initialization from the declaration and then do an assignment with the value from the constructor.
If you decide to take up the task I suggest you take it step by step. First make the parser understand the declarations, but then have the builder ignore it so it works either way. Then as the second step make the CompileDefaultConstructor() work by initializing each member correctly. Only when this is working should you work on the CompileFunction().