mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 13:11:05 +01:00
adding comments and some newlines (#294)
* adding comments and some newlines * Update executable_semantics/interpreter/typecheck.cpp Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com> * Update executable_semantics/interpreter/typecheck.cpp Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com> * Update executable_semantics/interpreter/typecheck.cpp Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com> * Update executable_semantics/interpreter/typecheck.cpp Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com> * Update executable_semantics/interpreter/typecheck.cpp Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com> * changed comment style * Update executable_semantics/interpreter/typecheck.cpp Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com> * Update executable_semantics/interpreter/typecheck.cpp Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com> Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
co-authored by
Jon Meow
parent
23009d3b06
commit
a93ec369cb
@@ -28,37 +28,47 @@ enum class StatementKind {
|
||||
struct Statement {
|
||||
int line_num;
|
||||
StatementKind tag;
|
||||
|
||||
union {
|
||||
Expression* exp;
|
||||
|
||||
struct {
|
||||
Expression* lhs;
|
||||
Expression* rhs;
|
||||
} assign;
|
||||
|
||||
struct {
|
||||
Expression* pat;
|
||||
Expression* init;
|
||||
} variable_definition;
|
||||
|
||||
struct {
|
||||
Expression* cond;
|
||||
Statement* then_stmt;
|
||||
Statement* else_stmt;
|
||||
} if_stmt;
|
||||
|
||||
Expression* return_stmt;
|
||||
|
||||
struct {
|
||||
Statement* stmt;
|
||||
Statement* next;
|
||||
} sequence;
|
||||
|
||||
struct {
|
||||
Statement* stmt;
|
||||
} block;
|
||||
|
||||
struct {
|
||||
Expression* cond;
|
||||
Statement* body;
|
||||
} while_stmt;
|
||||
|
||||
struct {
|
||||
Expression* exp;
|
||||
std::list<std::pair<Expression*, Statement*>>* clauses;
|
||||
} match_stmt;
|
||||
|
||||
} u;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user