Skip to content

F#: Implement comment nesting #93

@rdipardo

Description

@rdipardo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    fsharpCaused by the fsharp (F#) lexer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions