📄 struct.h
字号:
#define MAXNUM 100
#define MAX 10
typedef struct
{
int line;
char type[10];
char string[20];
}word;
word words[MAXNUM];
word curentword;
typedef struct treenode
{
int treeline;
char nodetype[20];
char nodestring[20];
char rettype[10];
char vartype[10];
int isarray;
char modifier[10];
struct treenode *child[MAX];
}tree;
typedef struct leaf
{
char leaftype[10];
char ral[20];
}leaf;
leaf *makeleaf(char leaftype[10],char ral[20])
{
leaf *p;
p=(leaf *)malloc(sizeof(leaf));
strcpy(p->ral,ral);
strcpy(p->leaftype,leaftype);
return p;
}
tree *makenode(int treeline,char nodetype[20],char nodestring[20],char rettype[10],char vartype[10],int isarray,char modifier[10])
{
tree *p;
int i;
p=(tree *)malloc(sizeof(tree));
p->treeline=treeline;
strcpy(p->nodetype,nodetype);
strcpy(p->nodestring,nodestring);
strcpy(p->rettype,rettype);
strcpy(p->vartype,vartype);
strcpy(p->modifier,modifier);
p->isarray=isarray;
for(i=0;i<=MAX;i++)p->child[i]=NULL;
return p;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -