-
Notifications
You must be signed in to change notification settings - Fork 23
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
Multi-line comments cannot be nested #525
Comments
Is there a practical use-case for nested comments to justify the implied lexer complexity by supporting it? Otherwise, I would just not support it and add a lexer error upon encountering a |
TL;DR: No, not really. The only use case I have is when my code looks like this: def foo() = 42
def bar() = 100
/*
def baz() = 400
*/
def quux() = 1000 (with way larger, multiline functions) and I want to comment out the rest of the file except for def foo() = 42
/*
def bar() = 100
/*
def baz() = 400
*/
def quux() = 1000
*/ which then doesn't work. |
But a few months ago, we were discussing that we might remove multiline comments anyways and instead add better support for singleline ones (see effekt-lang/effekt-vscode#19). In fact, I was thinking about simplifying the language to remove all multiline tokens (we can hack around multiline strings, Zig-style), since that would make the lexer simpler and it would be super simple to do incremental compilation (since only the changed lines need to be re-lexed, re-parsed, ...). |
returns:
which implies that multi-line comments cannot be nested.
The text was updated successfully, but these errors were encountered: