struct type construction
This commit is contained in:
@@ -138,6 +138,47 @@ sum func(a, b i32) i32 ! Status {
|
||||
(enum_literal
|
||||
(identifier))))))))))))
|
||||
|
||||
==================
|
||||
Anonymous keyed records
|
||||
==================
|
||||
|
||||
inferred :: {
|
||||
x = 1,
|
||||
int = "bro",
|
||||
}
|
||||
|
||||
empty :: {}
|
||||
pair :: {1, 2}
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(global_constant_declaration
|
||||
(identifier)
|
||||
(expression
|
||||
(anonymous_record_literal
|
||||
(keyed_field_initializer
|
||||
(identifier)
|
||||
(expression
|
||||
(integer)))
|
||||
(keyed_field_initializer
|
||||
(identifier)
|
||||
(expression
|
||||
(string
|
||||
(string_content)))))))
|
||||
(global_constant_declaration
|
||||
(identifier)
|
||||
(expression
|
||||
(tuple_literal)))
|
||||
(global_constant_declaration
|
||||
(identifier)
|
||||
(expression
|
||||
(tuple_literal
|
||||
(expression
|
||||
(integer))
|
||||
(expression
|
||||
(integer))))))
|
||||
|
||||
==================
|
||||
Intrinsic calls
|
||||
==================
|
||||
@@ -166,6 +207,39 @@ main func() void {
|
||||
(expression
|
||||
(builtin_type))))))))))
|
||||
|
||||
==================
|
||||
Intrinsic type construction
|
||||
==================
|
||||
|
||||
Generated :: alias struct_type!(.auto, {"value"}, {i32}, {none})
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(type_declaration
|
||||
(identifier)
|
||||
(alias_type
|
||||
(type
|
||||
(intrinsic_type
|
||||
(identifier)
|
||||
(argument_list
|
||||
(expression
|
||||
(enum_literal
|
||||
(identifier)))
|
||||
(expression
|
||||
(tuple_literal
|
||||
(expression
|
||||
(string
|
||||
(string_content)))))
|
||||
(expression
|
||||
(tuple_literal
|
||||
(expression
|
||||
(builtin_type))))
|
||||
(expression
|
||||
(tuple_literal
|
||||
(expression
|
||||
(none))))))))))
|
||||
|
||||
==================
|
||||
Errdefer
|
||||
==================
|
||||
|
||||
Reference in New Issue
Block a user