Skip to content

feat: properly parse and resolve tuples#3018

Open
JairusSW wants to merge 13 commits intoAssemblyScript:mainfrom
JairusSW:main
Open

feat: properly parse and resolve tuples#3018
JairusSW wants to merge 13 commits intoAssemblyScript:mainfrom
JairusSW:main

Conversation

@JairusSW
Copy link
Copy Markdown
Contributor

@JairusSW JairusSW commented Apr 22, 2026

This PR adds basic support for the Tuples. Roadmap wise, this, along with a few more PRs, will pave the way for the Multi Value Proposal to be properly implemented.

The goal of this PR is not to add full-fledged support for Tuples. Instead, it supports the basic functionality for parsing and resolving them since optimal Tuple implementation relies on Multi Value support.

The order of the PRs to implement are:

  1. Parse and resolve tuples
  2. Hook up Multi Value support to binaryen
  3. Clean up, test, and enable multi-value by default

Speaking of that, all the features here hide behind --enable multi-value

So far, this implements:

  • Parser

    • Parameters: function foo(x: [i32, i32]) {}
    • Return types: function foo(): [i32, i32] {}
    • Return values syntax: return [0, 1]
    • Type aliases: type Foo = [i32, i32]
    • Type names: [x: f64, y: f64]
  • Compiler

    • Tuple usages error with not implemented (for now)
  • I've read the contributing guidelines

  • I've added my name and email to the NOTICE file

@JairusSW JairusSW marked this pull request as ready for review April 23, 2026 03:52
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.

1 participant