Skip to content
This repository was archived by the owner on Jun 29, 2026. It is now read-only.
This repository was archived by the owner on Jun 29, 2026. It is now read-only.

Incorrect parsing of trailing comments #2

Description

@alexaandru

Given:

a := 1 // foo

The generated parse tree is:

(source_file (short_var_declaration left: (expression_list (identifier)) right: (binary_expression left: (int_literal) (ERROR) right: (identifier))))

and the captures are:

[{variable identifier 0 1} {operator := 2 4} {number int_literal 5 6} {operator / 7 8} {operator / 8 9} {variable identifier 10 13}]
(in the captures slice, the 1st one is the capture, the 2nd one is the node type). So it looks like it interprets // as two division operators instead of a start of a comment.

From what I can tell, trailing comments are accepted, as I see them in the Risor examples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions