Skip to content

Function definition blocks #37

@WilliamRagstad

Description

@WilliamRagstad

Add support for this kind of syntax as well, omitting the =. Unlike #21 .

u8 add(u8 x, u8 y, u8 z) { x + y + z }
u8 add u8 x, u8 y, u8 z { x + y + z }
add u8 x, u8 y, u8 z { x + y + z }
add(x, y, z) { x + y + z }
add x, y, z { x + y + z }
u8 add x, y, (z), a, (b), (c) { x + y + z + a + b + c }
int add(int x, int y) { x + y }
int add int x, int y { x + y }
int add(int x, int y) {
	z = x + y
    z
}
int f(int x, int y) {
	x + y
}
int f int x, int y {
	x + y
}
int outer(int x) {
    int inner(int y) = x + y;
    inner(x)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions