Example #1
0
        private TypeInfo Visit(ReturnNode node, MethodBuilder builder, CodegenContext context)
        {
            builder.ClearStack();

            var res = Visit(node.Expression, builder, context);

            builder.Ret();

            return(res);
        }
Example #2
0
        private void Visit(CodeBlockNode node, MethodBuilder builder, CodegenContext context)
        {
            foreach (dynamic item in node.Commands)
            {
                Visit(item, builder, context);

                if (!(item is ReturnNode))
                {
                    builder.ClearStack();
                }
            }
        }