Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support @inline inside single line comment #2717

Open
jacob-ebey opened this issue Jul 18, 2023 · 1 comment
Open

Support @inline inside single line comment #2717

jacob-ebey opened this issue Jul 18, 2023 · 1 comment

Comments

@jacob-ebey
Copy link

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 {}
@HerrCai0907
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants