Ejemplo n.º 1
0
        public LiteValue Visit(SyntaxBlockStatementNode Node, LiteEnv Env)
        {
            var Val = LiteValue.Nil;

            foreach (var Child in Node.GetChildren())
            {
                Val = Child.Accept(this, Env);
                //Logger.DInfo($"{Child} => {Val}");
                if (Child.GetType() == SyntaxNodeType.ReturnStatement)
                {
                    return(Val);
                }
                if (Val.IsError())
                {
                    break;
                }
            }
            return(Val);
        }