test: add generated line-mode lexer Markdown fixture#705
Conversation
|
Warning Review limit reached
Next review available in: 50 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds an end-to-end fixture for generated line-mode lexers, including lexer contracts, generated and handwritten runtime code, regeneration tooling, package metadata, and tests for Markdown markers, token positions, EOF, and CRLF handling. ChangesLine lexer regression fixture
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Test
participant lex
participant lex_line_start
participant lex_inline
Test->>lex: tokenize source with LineStart mode
lex->>lex_line_start: dispatch current position
lex_line_start->>lex_inline: process non-marker line content
lex_line_start-->>Test: return marker LexStep and LineStart
lex_inline-->>Test: return Text or BlankLine LexStep and next mode
Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@fixtures/line_lexer_regression/moon.mod`:
- Line 9: Resolve the broken fixture reference in moon.mod by either adding the
missing README.md file under the same fixture directory or removing the readme
field. Ensure the fixture passes validation without referencing an absent file.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 343cbd56-eb54-42fa-92a3-61694192f3e2
⛔ Files ignored due to path filters (1)
moon.workis excluded by!**/*.work
📒 Files selected for processing (10)
fixtures/line_lexer_regression/lexmode_def.mbtfixtures/line_lexer_regression/line_lexer.g.mbtfixtures/line_lexer_regression/line_lexer_support.mbtfixtures/line_lexer_regression/line_lexer_wbtest.mbtfixtures/line_lexer_regression/moon.modfixtures/line_lexer_regression/moon.pkgfixtures/line_lexer_regression/pkg.generated.mbtifixtures/line_lexer_regression/regenerate.shfixtures/line_lexer_regression/src/line_lexer_src.mbtfixtures/line_lexer_regression/token_def.mbt
| "dowdiness/loom@0.1.0", | ||
| } | ||
|
|
||
| readme = "README.md" |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check if README.md exists alongside moon.mod
fd -t f "README.md" fixtures/line_lexer_regression/Repository: dowdiness/loom
Length of output: 152
Add the missing README.md fixture or remove the readme field
fixtures/line_lexer_regression/moon.mod references README.md, but that file is absent from fixtures/line_lexer_regression/, so validation can fail.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@fixtures/line_lexer_regression/moon.mod` at line 9, Resolve the broken
fixture reference in moon.mod by either adding the missing README.md file under
the same fixture directory or removing the readme field. Ensure the fixture
passes validation without referencing an absent file.
Closes #701
Adds the compile-and-run acceptance fixture for the #561 line-mode lexer work stream:
fixtures/line_lexer_regressionto the MoonBit workspace.line_lexer.g.mbtfrom annotated token/term source withloomgen --target native.regenerate.sh.#561 is already closed by the implementation PRs; this closes its #701 end-to-end follow-up. #699 skeleton replacement remains separate.
Verification:
moon check --target nativemoon test --target native loomgen(173/173)moon test --target native(3427/3427)moon test --target native fixtures/line_lexer_regression(2/2)Bounded pre-PR reviewers: moonbit-reviewer PASS; reviewer PASS.
Summary by CodeRabbit
New Features
Tests
Chores