|
|
|
@@ -156,6 +156,7 @@ typedef enum { |
|
|
|
Built_In_Rest, |
|
|
|
Built_In_Subtraction, |
|
|
|
Built_In_Type, |
|
|
|
Built_In_While, |
|
|
|
} Built_In_Name; |
|
|
|
|
|
|
|
/** |
|
|
|
@@ -196,6 +197,7 @@ char* Built_In_Name_to_string(Built_In_Name name) { |
|
|
|
case Built_In_Rest: return "rest"; |
|
|
|
case Built_In_Subtraction: return "-"; |
|
|
|
case Built_In_Type: return "type"; |
|
|
|
case Built_In_While: return "while"; |
|
|
|
} |
|
|
|
|
|
|
|
return "Built in string missing in Built_In_Name_to_string"; |
|
|
|
@@ -311,6 +313,7 @@ Ast_Node* create_ast_node_built_in_function(char* name) { |
|
|
|
else if (string_equal(name, "read")) type = Built_In_Read; |
|
|
|
else if (string_equal(name, "rest")) type = Built_In_Rest; |
|
|
|
else if (string_equal(name, "type")) type = Built_In_Type; |
|
|
|
else if (string_equal(name, "while")) type = Built_In_While; |
|
|
|
else return nullptr; |
|
|
|
|
|
|
|
Ast_Node* node = new(Ast_Node); |
|
|
|
|