Skip to content

[api] Support sequence expression parsing #1786#1789

Merged
agnesoft merged 2 commits intomainfrom
1786-api-support-sequence-expression-parsing
May 1, 2026
Merged

[api] Support sequence expression parsing #1786#1789
agnesoft merged 2 commits intomainfrom
1786-api-support-sequence-expression-parsing

Conversation

@michaelvlach
Copy link
Copy Markdown
Collaborator

No description provided.

@michaelvlach michaelvlach requested review from agnesoft and Copilot May 1, 2026 14:49
@michaelvlach michaelvlach linked an issue May 1, 2026 that may be closed by this pull request
@vercel
Copy link
Copy Markdown

vercel Bot commented May 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agdb Ready Ready Preview, Comment May 1, 2026 2:59pm

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for parsing Rust range (.. / ..=) expressions into AgDB’s type definition reflection AST so functions annotated with #[agdb::fn_def] can represent ranges in their captured expression bodies.

Changes:

  • Extend agdb_derive expression parsing to handle syn::Expr::Range and emit Expression::Range.
  • Add Expression::Range { start, end, inclusive } to the public Expression enum in agdb.
  • Add unit tests validating several range forms are reflected correctly.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
agdb_derive/src/type_def_parser/expression_parser.rs Parses syn::ExprRange and emits a new Expression::Range node with optional bounds and inclusivity.
agdb/src/type_def/expression_def.rs Adds the new Expression::Range variant and tests for range reflection output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread agdb/src/type_def/expression_def.rs
Comment thread agdb/src/type_def/expression_def.rs
Agent-Logs-Url: https://github.com/agnesoft/agdb/sessions/f919e44b-3d63-4bd6-b9c7-d751a0936833

Co-authored-by: michaelvlach <11575751+michaelvlach@users.noreply.github.com>
@agnesoft agnesoft merged commit aa6d888 into main May 1, 2026
11 checks passed
@agnesoft agnesoft deleted the 1786-api-support-sequence-expression-parsing branch May 1, 2026 15:04
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.

[api] Support sequence expression parsing

4 participants