You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Like many other language compilers, the Kipper compiler provides various config options, which can be enabled or disabled to modify the behaviour of the compiler. These configuration options are project/file-spanning though, meaning if something has been turned off it will be turned off everywhere.
As such it would be a good to add the ability to specify statement-specific compiler behaviour using a #pragma comment, where the next statements following the comment will have the specific configuration/behaviour applied.
For example:
#pragma no-optimisationsvarx: num=15*15*15;// -> Would not be optimised down to a constant number
Although the syntax #pragma can also be replaced by something else, like for example:
#kip no-optimisations
// @kip-no-optimisations
Exact behaviour / changes you want
Implement a special type of comment, which is recognised by the compiler and associated with a specific statement following it.
Add support for multiple different config options, like for example no-optimisations.
Add support for custom pragma recognisers, which can hook into the compiler and add custom behaviour.
The text was updated successfully, but these errors were encountered:
Is there an existing proposal for this?
This feature does not exist in the latest version
Proposal
Like many other language compilers, the Kipper compiler provides various config options, which can be enabled or disabled to modify the behaviour of the compiler. These configuration options are project/file-spanning though, meaning if something has been turned off it will be turned off everywhere.
As such it would be a good to add the ability to specify statement-specific compiler behaviour using a
#pragma
comment, where the next statements following the comment will have the specific configuration/behaviour applied.For example:
Although the syntax
#pragma
can also be replaced by something else, like for example:Exact behaviour / changes you want
no-optimisations
.The text was updated successfully, but these errors were encountered: