Skip to content

✅ test(lang): add CST parser tests for LeftShift and RightShift binary ops#1316

Merged
harehare merged 2 commits intofeat/shift-header-levelfrom
copilot/sub-pr-1315
Feb 21, 2026
Merged

✅ test(lang): add CST parser tests for LeftShift and RightShift binary ops#1316
harehare merged 2 commits intofeat/shift-header-levelfrom
copilot/sub-pr-1315

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 21, 2026

Adds CST parser test coverage for the << and >> binary operators introduced in the previous commit.

Changes

  • crates/mq-lang/src/cst/parser.rs: Two new #[rstest] cases covering:
    • left_shift: a << bNodeKind::BinaryOp(BinaryOp::LeftShift)
    • right_shift: a >> bNodeKind::BinaryOp(BinaryOp::RightShift)

Tests follow the existing binary op test pattern and run under the cst feature flag:

#[case::left_shift(
    vec![
        Shared::new(token(TokenKind::Ident("a".into()))),
        Shared::new(token(TokenKind::LeftShift)),
        Shared::new(token(TokenKind::Ident("b".into()))),
    ],
    (
        vec![Shared::new(Node {
            kind: NodeKind::BinaryOp(BinaryOp::LeftShift),
            token: Some(Shared::new(token(TokenKind::LeftShift))),
            ...
        })],
        ErrorReporter::default()
    )
)]

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Add tests for CST Parser with left and right shift operations ✅ test(lang): add CST parser tests for LeftShift and RightShift binary ops Feb 21, 2026
Copilot AI requested a review from harehare February 21, 2026 14:05
@harehare harehare marked this pull request as ready for review February 21, 2026 14:17
@harehare harehare merged commit 74bfaf7 into feat/shift-header-level Feb 21, 2026
@harehare harehare deleted the copilot/sub-pr-1315 branch February 21, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants