assemblyscript
assemblyscript copied to clipboard
Support @inline inside single line comment
Feature suggestion
The @inline annotation breaks the ability to have a single codebase that can be compiled via AssemblyScript and also ran natively in a JS engine that supports typescript.
I suggest adding the ability to inline functions behind a single line comment
// @inline
function criticalFunc(): void {}
or a tripple slash single line comment
/// @inline
function criticalFunc(): void {}
I have tried to implement it, but found it needs lots of refactor in parser module. At current time, comment is handled by tokenizer and skip it directly. @dcodeIO WDYT? Should we introduce a new preprocess to handle comment or refactor tokenizer and parser module.