From d35d67c2bd951e13e7cad715c3eb80ce57e3fb4b Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Mon, 25 Apr 2022 11:40:59 +0300 Subject: [PATCH] eval: enable `v interpret examples/hanoi.v` --- vlib/v/eval/expr.v | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vlib/v/eval/expr.v b/vlib/v/eval/expr.v index 07609f31ef..a30af29838 100644 --- a/vlib/v/eval/expr.v +++ b/vlib/v/eval/expr.v @@ -511,8 +511,13 @@ pub fn (mut e Eval) expr(expr ast.Expr, expecting ast.Type) Object { return res } - else { - e.error('unhandled expression $expr.type_name()') + ast.AnonFn, ast.ArrayDecompose, ast.AsCast, ast.Assoc, ast.AtExpr, ast.CTempVar, + ast.ChanInit, ast.Comment, ast.ComptimeCall, ast.ComptimeSelector, ast.ComptimeType, + ast.ConcatExpr, ast.DumpExpr, ast.EmptyExpr, ast.EnumVal, ast.GoExpr, ast.IfGuardExpr, + ast.IndexExpr, ast.IsRefType, ast.Likely, ast.LockExpr, ast.MapInit, ast.MatchExpr, + ast.NodeError, ast.None, ast.OffsetOf, ast.OrExpr, ast.RangeExpr, ast.SelectExpr, + ast.SqlExpr, ast.TypeNode, ast.TypeOf, ast.UnsafeExpr { + e.error('unhandled expression ${typeof(expr).name}') } } return empty