mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 13:41:06 +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
@@ -26,6 +26,7 @@ enum class ExpressionKind {
|
||||
TypeT,
|
||||
Variable,
|
||||
};
|
||||
|
||||
enum class Operator {
|
||||
Add,
|
||||
And,
|
||||
@@ -43,35 +44,44 @@ struct Expression {
|
||||
struct {
|
||||
std::string* name;
|
||||
} variable;
|
||||
|
||||
struct {
|
||||
Expression* aggregate;
|
||||
std::string* field;
|
||||
} get_field;
|
||||
|
||||
struct {
|
||||
Expression* aggregate;
|
||||
Expression* offset;
|
||||
} index;
|
||||
|
||||
struct {
|
||||
std::string* name;
|
||||
Expression* type;
|
||||
} pattern_variable;
|
||||
|
||||
int integer;
|
||||
bool boolean;
|
||||
|
||||
struct {
|
||||
std::vector<std::pair<std::string, Expression*>>* fields;
|
||||
} tuple;
|
||||
|
||||
struct {
|
||||
Operator op;
|
||||
std::vector<Expression*>* arguments;
|
||||
} primitive_op;
|
||||
|
||||
struct {
|
||||
Expression* function;
|
||||
Expression* argument;
|
||||
} call;
|
||||
|
||||
struct {
|
||||
Expression* parameter;
|
||||
Expression* return_type;
|
||||
} function_type;
|
||||
|
||||
} u;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user