Skip to content
This repository has been archived by the owner on Feb 3, 2020. It is now read-only.

Tuples and Tuple Structs #40

Open
1 task
sunjay opened this issue Feb 26, 2017 · 0 comments
Open
1 task

Tuples and Tuple Structs #40

sunjay opened this issue Feb 26, 2017 · 0 comments

Comments

@sunjay
Copy link
Owner

sunjay commented Feb 26, 2017

Extension of #39 with support for arbitrary tuples.

Tuples can have heterogeneous types.

Tuples:

let foo: (u8, u16, u32) = (1, 10000, 1000000);

Tuple struct:

struct Foo(u8);

struct Foo(u8, u16);

Accessing tuple fields will use special number syntax like Rust.

// get
foo.0;
// set
foo.0 = 2;
  • Add numeric field access to grammar
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant