| 1 | pub const Id = enum(c_int) { |
| 2 | c_keyword_variable = 12, |
| 3 | non_c_keyword_variable = 34, |
| 4 | c_keyword_constant = 56, |
| 5 | non_c_keyword_constant = 78, |
| 6 | c_keyword_function = 910, |
| 7 | non_c_keyword_function = 1112, |
| 8 | }; |
| 9 | |
| 10 | export var int: Id = .c_keyword_variable; |
| 11 | |
| 12 | export var some_non_c_keyword_variable: Id = .non_c_keyword_variable; |
| 13 | |
| 14 | export const @"if": Id = .c_keyword_constant; |
| 15 | |
| 16 | export const some_non_c_keyword_constant: Id = .non_c_keyword_constant; |
| 17 | |
| 18 | export fn float() Id { |
| 19 | return .c_keyword_function; |
| 20 | } |
| 21 | |
| 22 | export fn some_non_c_keyword_function() Id { |
| 23 | return .non_c_keyword_function; |
| 24 | } |
| 25 | |
| 26 | comptime { |
| 27 | @export(&int, .{ .name = "long" }); |
| 28 | @export(&int, .{ .name = "an_alias_of_int" }); |
| 29 | |
| 30 | @export(&some_non_c_keyword_variable, .{ .name = "void" }); |
| 31 | @export(&some_non_c_keyword_variable, .{ .name = "an_alias_of_some_non_c_keyword_variable" }); |
| 32 | |
| 33 | @export(&@"if", .{ .name = "else" }); |
| 34 | @export(&@"if", .{ .name = "an_alias_of_if" }); |
| 35 | |
| 36 | @export(&some_non_c_keyword_constant, .{ .name = "switch" }); |
| 37 | @export(&some_non_c_keyword_constant, .{ .name = "an_alias_of_some_non_c_keyword_constant" }); |
| 38 | |
| 39 | @export(&float, .{ .name = "double" }); |
| 40 | @export(&float, .{ .name = "an_alias_of_float" }); |
| 41 | |
| 42 | @export(&some_non_c_keyword_function, .{ .name = "break" }); |
| 43 | @export(&some_non_c_keyword_function, .{ .name = "an_alias_of_some_non_c_keyword_function" }); |
| 44 | } |