You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Features
Add support for struct, enum and union datatypes
Solutions
The syntax of these datatypes should be something like this:
struct Test {
var number: i64;
var text: string;
var character: char;
}
enum Test {
ENUM_VAR_1,
ENUM_VAR_2,
ENUM_VAR_3;
}
The syntax of Unions should be very similar to Structs but they should behave differently
union Test {
var number: i64;
var text: string;
var character: char;
}
Unions and Structs should work like the Structs and Unions in C whereas Enums should work differently.
The variables of an enum should not be globally accessible but accessible with an access expression like Test.ENUM_VAR_1
Additional context
The first version of this could just allocate the memory on the stack.
The text was updated successfully, but these errors were encountered:
Features
Add support for
struct
,enum
andunion
datatypesSolutions
The syntax of these datatypes should be something like this:
The syntax of Unions should be very similar to Structs but they should behave differently
Unions and Structs should work like the Structs and Unions in C whereas Enums should work differently.
The variables of an enum should not be globally accessible but accessible with an access expression like
Test.ENUM_VAR_1
Additional context
The first version of this could just allocate the memory on the stack.
The text was updated successfully, but these errors were encountered: