-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conditional compilation fails inside property value array #254
Comments
Please post the code directly rather than as images. |
This is a commercial game which is not yet released, so I am not able to provide the full source that would allow an easy reproduction of the bug (I strongly assume this is a compiler bug). The screenshots were rather meant to give the maintainers of the compiler a general idea about the issue. However, here is the code for the first room, where the screenshots are taken from. This uses PunyInform as a library with Puny's cheap_scenery extension.
|
This is confirmed but it is a "functioning as (currently) designed" situation.
(This is true both of object property arrays and top-level It's a reasonable feature to ask about! I think it would be a matter of calling get_next_token_with_directives() instead of get_next_token() in key spots. But it would require a lot of testing to get nailed down. |
In the meantime, this is legal:
|
Ah yes, that is a good workaround. I'd love to see the feature make its way into the compiler. If you need someone for testing, please let me know. I am happy to help! |
I am setting up my next game to conditionally compile as a standard edition and an extended cut. To maintain a single codebase, I've set up a constant which flags code I want to trigger via conditional compilation. This does not work when I want to adapt it to an value array of a property. This is the code I have (note the code in-between
#ifdef
and#endif
).And this is what I get when compiling.
Here is a bigger portion of the code with line numbers for context.
The text was updated successfully, but these errors were encountered: