Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@lukaszcz
Copy link
Collaborator

@lukaszcz lukaszcz commented Sep 5, 2025

  • Implements if-then-else, if-then and match syntax in Applib Programs.

@lukaszcz lukaszcz self-assigned this Sep 5, 2025
@lukaszcz lukaszcz marked this pull request as ready for review September 6, 2025 08:44
Copy link
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

This PR implements conditional and pattern matching syntax for Applib Programs, adding if-then-else, if-then, and match constructs to the domain-specific language.

  • Adds syntax definitions for conditional statements (if-then-else, if-then) and pattern matching (match)
  • Implements macro rules to translate the new syntax into underlying Program operations
  • Provides comprehensive test cases demonstrating the new conditional and pattern matching capabilities

Reviewed Changes

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

File Description
Applib/Surface/Program/Syntax.lean Core implementation adding syntax rules and macro expansions for conditionals and pattern matching
Tests/Applib/Surface/Program/Syntax.lean Test examples demonstrating the new if-then-else and match syntax functionality
Comments suppressed due to low confidence (1)

Applib/Surface/Program/Syntax.lean:1

  • The macro rule expects three arguments but the corresponding syntax definition on line 23 only captures 'ident term'. Similar to the call syntax, this expects method, object, and arguments but only two are provided in the syntax.
import Applib.Surface.Program

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@janmasrovira janmasrovira merged commit 811abc2 into main Sep 6, 2025
2 checks passed
@janmasrovira janmasrovira deleted the if-then-else branch September 6, 2025 08:51
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.

3 participants