Пример #1
0
        public void Visit(DeclareList s)
        {
            if (s.ValueList == null)
            {
                throw new ArgumentException();
            }

            Allocation values = PushList(s.ValueList, s.Variables.Count);

            values.Release();

            // Declaring these variables on the top of the stack should give them all the
            // correct values.
            for (int local = 0; local < s.Variables.Count; ++local)
            {
                function.DeclareLocal(s.Variables[local]);
            }
        }
Пример #2
0
        public void Visit(DeclareList s)
        {
            Indent();
            o.Write("local ");
            bool bFirst = true;

            foreach (Variable variable in s.Variables)
            {
                if (!bFirst)
                {
                    o.Write(", ");
                }
                bFirst = false;
                o.Write(variable.Name);
            }
            o.Write(" = ");
            o.Write("values ");
            s.ValueList.Accept(this);
            o.WriteLine();
        }
Пример #3
0
        public virtual void Visit(DeclareList s)
        {
            Expression valueList = s.ValueList != null?Transform(s.ValueList) : null;

            result = new DeclareList(s.SourceSpan, s.Variables, valueList);
        }