Skip to content

Comment newlines are preserved in CRLF files #133

@Wilfred

Description

@Wilfred

Given the file foo.elm:

-- stuff
x = 1

Convert to CRLF line endings:

$ unix2dos foo.elm

And dump the parse tree:

file (0, 0) - (2, 0)
  line_comment (0, 0) - (0, 9) "-- stuff\r"
  value_declaration (1, 0) - (1, 5)
    function_declaration_left (1, 0) - (1, 1)
      lower_case_identifier (1, 0) - (1, 1) "x"
    eq (1, 2) - (1, 3) "="
    number_constant_expr (1, 4) - (1, 5)
      number_literal (1, 4) - (1, 5) "1"

Note the unwanted "\r" in the line_comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions