添加一些语法

This commit is contained in:
2024-12-03 08:53:09 +08:00
parent c736ef5b1b
commit dac9dad45d
5 changed files with 399 additions and 12 deletions

47
main.c
View File

@@ -2,6 +2,49 @@
// 行注释
struct _struct_a;
typedef const struct _struct_a _typedef_struct_a;
struct _struct_a /* 块注释 */ {
int a;
int b;
};
enum _enum_a;
enum _enum_a {
Enum0=0,
Enum1,
Enum2,
};
// 暂不支持匿名枚举类型
// enum {
// Enumb0=0,
// Enumb1,
// Enumb2,
// };
union _union_a {
int a;
float b;
double c;
short d;
};
typedef int _typedef_int;
const char* get_type(int s) {
const char* ret;
switch (s)
@@ -23,3 +66,7 @@ const char* get_type(int s) {
return ret;
}
int main(){
return 0;
}