|
@@ -315,7 +315,7 @@ the semantic analysis and the specification of runtime behavior.
|
|
|
|
|
|
|
|
#### Abstract Syntax for Expressions
|
|
#### Abstract Syntax for Expressions
|
|
|
|
|
|
|
|
-```C++
|
|
|
|
|
|
|
+```c++
|
|
|
enum ExpressionKind { Variable, PatternVariable, Int, Bool,
|
|
enum ExpressionKind { Variable, PatternVariable, Int, Bool,
|
|
|
PrimitiveOp, Call, Tuple, Index, GetField,
|
|
PrimitiveOp, Call, Tuple, Index, GetField,
|
|
|
IntT, BoolT, TypeT, FunctionT, AutoT };
|
|
IntT, BoolT, TypeT, FunctionT, AutoT };
|
|
@@ -384,7 +384,7 @@ alternative: identifier tuple ';'
|
|
|
|
|
|
|
|
#### Abstract Syntax for Statements
|
|
#### Abstract Syntax for Statements
|
|
|
|
|
|
|
|
-```C++
|
|
|
|
|
|
|
+```c++
|
|
|
enum StatementKind { ExpressionStatement, Assign, VariableDefinition,
|
|
enum StatementKind { ExpressionStatement, Assign, VariableDefinition,
|
|
|
If, Return, Sequence, Block, While, Break, Continue,
|
|
If, Return, Sequence, Block, While, Break, Continue,
|
|
|
Match };
|
|
Match };
|
|
@@ -410,7 +410,7 @@ struct Statement {
|
|
|
|
|
|
|
|
#### Abstract Syntax for Declarations
|
|
#### Abstract Syntax for Declarations
|
|
|
|
|
|
|
|
-```C++
|
|
|
|
|
|
|
+```c++
|
|
|
struct FunctionDefinition {
|
|
struct FunctionDefinition {
|
|
|
string name;
|
|
string name;
|
|
|
Expression* param_pattern;
|
|
Expression* param_pattern;
|