Summary
Modern Enforce Script features through source generation: async/await, generators, lambdas, extension methods, static classes, properties, overloads, delegates, and interfaces.
Description
Enforce Extended is a source generator and runtime library for Arma Reforger mod developers. It extends Enforce Script with modern language features while producing ordinary .c files compatible with the game.
Write extended code in .ec files and run the generator from the Workbench Script Editor using Ctrl+Shift+G.
Current features include:
Async methods and await using TaskSlim<T>
Generators and yield
Expression-bodied and block-bodied lambdas
Read-only variable captures
Func and Action delegate types
Method-group assignment with overload resolution
Static classes
Extension methods
Properties
Method overloads
Constructor lowering
Cancellation tokens
Interfaces
Symbol manifests for generated APIs across addon dependencies
Enforce Extended is a developer dependency, not a gameplay mod. Add it as a dependency of your project, place extended source in .ec files, and generate standard Enforce Script before running your addon.
The project is under active development. Some transformed language constructs intentionally support a focused subset of Enforce Script; consult the documentation for current limitations.
Project repository: https://gitlab.com/petr.vejchoda/enforce-code-generator
Code was mainly generated by Codex 5.6 Sol
License
Arma Public License (APL)