Skip to content

Test nested block comments and lexer line tracking #391

Closed

Description

@LunaStev

Why

Wave supports nested /* ... */ comments and updates line state while skipping comments. This behavior is currently untested in the lexer crate and affects every later diagnostic.

Scope

  • Test line comments, block comments, and nested block comments.
  • Verify the line number of the token immediately after single- and multi-line comments.
  • Verify whitespace and CRLF handling.
  • Add an unterminated block comment case and assert its structured E1002 diagnostic.
  • Do not change the comment syntax.

Likely files

  • front/lexer/src/trivia.rs
  • A new lexer integration test

Completion criteria

  • Nested comments of at least two levels are covered.
  • Line tracking after comments and CRLF input is asserted.
  • Unterminated comments retain E1002 and useful help text.
  • cargo test -p lexer --locked passes.

Activity

  1. added
    good first issue
    needs testing
    on Aug 28, 2026
  2. self-assigned this
    on Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

good first issueneeds testing

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions