添加一些语法
This commit is contained in:
47
main.c
47
main.c
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user