Hi
I have an issue when building my script. This piece here:
shared class iEdScriptDialog : iEdScriptObject
{
[nosave] iGuiDialogBase @mpDialogWidget;
...
}
gets me an “expecting method or property” error when the compiler finds the ‘[’ char.
Did some investigation and found that when the parser gets to the “shared” keyword it reaches the “I'm gonna skip this whole statement” branch of the CScriptBuilder::ProcessScriptSection function, due to “shared” being treated as an identifier, just as stated at the end of the as_tokendef.h file, so no metadata removal happens and compiler gets fed this block as is.
I was about to add some hackish solution but that feels like a rabbit hole waiting to happen. I'm using 2.36.1 wip and can't exactly update to latest version at the moment so unsure if this has been addressed already (although I can't see anything that relates in the changelog).
What's the simplest approach to get the builder to properly process this?
And while we're at it, the issue blocking me from updating the lib is due to some parts in our codebase invalidated by the “value types not being able to be LValues” restriction introduced recently. We have a data container that resorts to some value type object as helper proxy for using the index operator, which works on the C++ side and has worked in the script side until that latest update. I already managed to get it to work by changing the declaration to reference and all the affected methods to take references as well, but unsure if there's some other workaround that involves less changes as I am a bit paranoid this might inadvertedly break some other stuff (made tests and it seemed to work but paranoid is paranoid).
That would be it. Thanks for the awesome lib btw and thanks for the help in advance.