Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add code gen outer1: generate stmt case #11

Merged
merged 3 commits into from
Jul 29, 2021
Merged

add code gen outer1: generate stmt case #11

merged 3 commits into from
Jul 29, 2021

Conversation

boomyl
Copy link
Contributor

@boomyl boomyl commented Jul 29, 2021

No description provided.

typedef struct ForStatement
{

} ForStatement;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for应该暂时不需要?

typedef struct AssignStatement
{
char *variable;
Expression *operand;
} AssignStatement;

typedef struct ReturnStatement
Copy link
Contributor

@shenao78 shenao78 Jul 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReturnStatement好像没有用到,目前单个返回值,只用复用了union中的 expr_s,不过后面如果支持多个返回值,还是有必要单独定义一个的

@@ -127,6 +152,9 @@ typedef struct Statement
struct IfStatement *if_s;
struct ReturnStatement *return_s;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个可以删掉,不知为何编译没报错

@shenao78 shenao78 merged commit 941164a into main Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants