Pre-Processor
Like C++, Koi has a pre-processor, that is shared across any possible implementations.
The pre-processor is mostly used for macros, that will be transpiled when the code is run. The compiler or interpreter will run the code through the pre-processor then run the output to the compiler or interpreter, if the language flag is turned on.
An example of something implemented through the pre-processor could be the range syntax, which would be written as so:
And could be implemented like so:
This would then, after being run through the pre-processor, would be transpiled to:
Last updated