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

F#: Implement comment nesting #93

Closed
rdipardo opened this issue Jul 3, 2022 · 2 comments
Closed

F#: Implement comment nesting #93

rdipardo opened this issue Jul 3, 2022 · 2 comments
Labels
committed Issue fixed in repository but not in release fsharp Caused by the fsharp (F#) lexer

Comments

@rdipardo
Copy link
Contributor

rdipardo commented Jul 3, 2022

F# inherits nested comments from OCaml. Unlike other ancestral constructs purged from the recent standard, this is a core syntactic feature.

While LexFSharp drew most of its patterns from LexCaml, I wasn't skilled enough then or now to adapt the latter's implementation of nested comments with enumerated styles, and adding more lexical classes now would unjustifiably clutter the interface.

This patch implements lexing and folding of nested stream comments using line state:

0001-LexFSharp-Implement-Comment-Nesting.diff.txt

@rdipardo
Copy link
Contributor Author

rdipardo commented Jul 3, 2022

Test files are in this patch:

Issue93-Test-Comment-Nesting.diff.txt

@nyamatongwe nyamatongwe added fsharp Caused by the fsharp (F#) lexer committed Issue fixed in repository but not in release labels Jul 4, 2022
@nyamatongwe
Copy link
Member

Committed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
committed Issue fixed in repository but not in release fsharp Caused by the fsharp (F#) lexer
Projects
None yet
Development

No branches or pull requests

2 participants