Esempio n. 1
0
 public MethodModel(string name, string type, Block block = null)
 {
     Name = name;
     Type = type;
     Arguments = new List<ArgumentModel>();
     Locals = new List<LocalModel>();
     Instructions = new List<InstructionModel>();
     Block = block;
 }
Esempio n. 2
0
        public Method(Identifier identifier, Sequence<Argument> arguments, Type type, Block block)
        {
            Name = identifier.Value;
            Arguments = arguments;
            Type = type;
            Block = block;

            foreach (var argument in arguments)
            {
                argument.Parent = this;
            }

            Type.Parent = this;
            Block.Parent = this;

            FullName = string.Format("{0}:{1}", Name, String.Join(":", Arguments.Select(a => a.Type)));
        }