瀏覽代碼

Remove an unused function (#380)

Dave Abrahams 5 年之前
父節點
當前提交
5ca6e21e11
共有 1 個文件被更改,包括 0 次插入22 次删除
  1. 0 22
      executable_semantics/interpreter/interpreter.cpp

+ 0 - 22
executable_semantics/interpreter/interpreter.cpp

@@ -390,28 +390,6 @@ void CreateTuple(Frame* frame, Action* act, Expression* /*exp*/) {
   frame->todo.Push(MakeValAct(tv));
   frame->todo.Push(MakeValAct(tv));
 }
 }
 
 
-auto ToValue(Expression* value) -> Value* {
-  switch (value->tag) {
-    case ExpressionKind::Integer:
-      return MakeIntVal(value->u.integer);
-    case ExpressionKind::Boolean:
-      return MakeBoolVal(value->u.boolean);
-    case ExpressionKind::IntT:
-      return MakeIntTypeVal();
-    case ExpressionKind::BoolT:
-      return MakeBoolTypeVal();
-    case ExpressionKind::TypeT:
-      return MakeTypeTypeVal();
-    case ExpressionKind::FunctionT:
-      // Instead add to patterns?
-    default:
-      std::cerr << "internal error in to_value, didn't expect ";
-      PrintExp(value);
-      std::cerr << std::endl;
-      exit(-1);
-  }
-}
-
 // Returns an updated environment that includes the bindings of
 // Returns an updated environment that includes the bindings of
 //    pattern variables to their matched values, if matching succeeds.
 //    pattern variables to their matched values, if matching succeeds.
 //
 //