We currently use macros (via OMeta) to implement rendering extensions. However, these are written and run outside the FTL language. We should expose a language construct for writing macros within the FTL language, which are expanded at compilation time.
This would, for example, allow us to implement 'local' variables (variables which exist just for semantic sugar reasons, such as to break up long expressions, or reuse expressions in multiple places.) Rather than creating an attribute just for these, we can create a macro, and then every usage of this variable is expanded by the macro into its expression.
We currently use macros (via OMeta) to implement rendering extensions. However, these are written and run outside the FTL language. We should expose a language construct for writing macros within the FTL language, which are expanded at compilation time.
This would, for example, allow us to implement 'local' variables (variables which exist just for semantic sugar reasons, such as to break up long expressions, or reuse expressions in multiple places.) Rather than creating an attribute just for these, we can create a macro, and then every usage of this variable is expanded by the macro into its expression.