-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
compiler/summoner.h
Outdated
typedef struct ForStatement | ||
{ | ||
|
||
} ForStatement; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for应该暂时不需要?
compiler/summoner.h
Outdated
typedef struct AssignStatement | ||
{ | ||
char *variable; | ||
Expression *operand; | ||
} AssignStatement; | ||
|
||
typedef struct ReturnStatement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReturnStatement好像没有用到,目前单个返回值,只用复用了union中的 expr_s,不过后面如果支持多个返回值,还是有必要单独定义一个的
compiler/summoner.h
Outdated
@@ -127,6 +152,9 @@ typedef struct Statement | |||
struct IfStatement *if_s; | |||
struct ReturnStatement *return_s; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个可以删掉,不知为何编译没报错
No description provided.