Skip to content

[FEATURE] Add support for multiple compiler-metadata defines - #507

Open
nykwono wants to merge 7 commits into
FunkinCrew:developfrom
nykwono:compiler-metadata-impls
Open

nykwono wants to merge 7 commits into
FunkinCrew:developfrom
nykwono:compiler-metadata-impls

Conversation

@nykwono

@nykwono nykwono commented Sep 18, 2026

Copy link
Copy Markdown

This PR adds support for several compile defines including:

@:persistent - Stores the value of a static field even after scripts were cleared.
@:using - When used on any type (interfaces, classes, even enums), this'll work just like how the using keyword works where you can call given static using function from the instance field.
@:noUsing - Prevents the given static function from being used when a class uses the using keyword on its class
@:noPrivateAccess - Completely prevents private access support.
@:require - Can be used on a class or field to require that the user has the given preprocessor condition met.
@:deprecated - This metadata can be used for if you want to deprecate any fields, it'll give a warning for if the field is referenced, or imported as a class.

@nykwono
nykwono force-pushed the compiler-metadata-impls branch 2 times, most recently from 451f6db to 2d76d19 Compare September 21, 2026 07:35
@nykwono
nykwono marked this pull request as ready for review September 21, 2026 08:51
}
return expr(e);
case ':noPrivateAccess':
// Side note: I really do not see the point of this metadata field, I guess maybe for if you're inside a private access block, but still.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe for libraries when you don't want people fucking with things they (probably) shouldn't be fucking with

@nykwono
nykwono force-pushed the compiler-metadata-impls branch from 78402c9 to 3341c63 Compare September 24, 2026 02:32
@AbnormalPoof
AbnormalPoof marked this pull request as draft September 24, 2026 03:24
@nykwono
nykwono marked this pull request as ready for review September 24, 2026 03:36
@nykwono
nykwono force-pushed the compiler-metadata-impls branch from 24b3d35 to df90bdd Compare September 24, 2026 03:37
@nykwono

nykwono commented Sep 24, 2026

Copy link
Copy Markdown
Author

github merge conflicts after making me have to re-code @:using, @:persistent, & @:require are we fucking deadass

@nykwono
nykwono marked this pull request as draft September 24, 2026 03:41
@AbnormalPoof
AbnormalPoof force-pushed the compiler-metadata-impls branch from df90bdd to f05b1e3 Compare September 24, 2026 03:41
@nykwono
nykwono force-pushed the compiler-metadata-impls branch 2 times, most recently from b8b6b2c to c3e4b77 Compare September 24, 2026 05:03
@nykwono
nykwono marked this pull request as ready for review September 24, 2026 05:07
@nykwono
nykwono force-pushed the compiler-metadata-impls branch from 0f61e8a to 1fc17a6 Compare September 24, 2026 05:20

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants