Skip to content

Add CST and AST parser tests for the @ (convert) operator#1329

Merged
harehare merged 2 commits intofeat/convert-operator-supportfrom
copilot/sub-pr-1320
Feb 24, 2026
Merged

Add CST and AST parser tests for the @ (convert) operator#1329
harehare merged 2 commits intofeat/convert-operator-supportfrom
copilot/sub-pr-1320

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 24, 2026

The @ (convert) operator was added without test coverage in the CST and AST parsers.

Changes

  • CST parser (cst/parser.rs): Added case_convert verifying a @ b produces a BinaryOp::Convert node with the correct token and Ident children. Runs under --features cst.
  • AST parser (ast/parser.rs): Added two cases:
    • convert_simple — verifies a @ b lowers to a convert(a, b) call node
    • convert_error_missing_rhs — verifies missing RHS yields UnexpectedEOFDetected
// CST: a @ b → BinaryOp::Convert node
// AST: a @ b → Expr::Call("convert", [a, b])
token(TokenKind::Ident("a")), token(TokenKind::Convert), token(TokenKind::Ident("b"))

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add tests for AST and CST parser based on feedback Add CST and AST parser tests for the @ (convert) operator Feb 24, 2026
Copilot AI requested a review from harehare February 24, 2026 00:43
@harehare harehare marked this pull request as ready for review February 24, 2026 03:22
@harehare harehare merged commit 83e3ee3 into feat/convert-operator-support Feb 24, 2026
@harehare harehare deleted the copilot/sub-pr-1320 branch February 24, 2026 03:22
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