Ejemplo n.º 1
0
        private IVariable Parse(string item, bool isEnd = false)
        {
            int     a;
            dynamic V;

            item = item.Trim();
            tt.Value.Logger.Debug("Parse : " + item);
            if (item.StartsWith("@"))
            {
                string name = item.Substring(1);
                V = (name == "Terraria") ?
                    MLMod.GetVanilla() : new MLMod(name);
            }
            else if (item.StartsWith("[") || item.StartsWith("("))
            {
                V = new MLArray();
                V.Add(Parse(item.Substring(1)));
            }
            else if (item.EndsWith("]") || item.EndsWith(")"))
            {
                V = Parse(item.Substring(0, item.Length - 1), true);
            }
            else if (int.TryParse(item, out a))
            {
                V = new MLInteger(a);
            }
            else
            {
                V = new MLRaw(item);
            }
            V.isEnded = (isEnd || V.isEnded);
            tt.Value.Logger.Debug("Parsed to " + V.ToString());
            return(V);
        }
Ejemplo n.º 2
0
 public void Multiply(MLInteger input)
 {
 }
Ejemplo n.º 3
0
 public void Multiply(MLInteger input)
 {
     this.Value  *= input.Value;
     this.isEnded = input.isEnded;
 }