示例#1
0
        public MethodBuilder BuildEntryPoint(List <VarInfo> localVars)
        {
            if (entryPoint != null)
            {
                throw new Exception("Точка входа уже определена");
            }

            var methodInfo = new MethodInfo("main", TypeInfo.Void, true, null);

            foreach (var item in localVars)
            {
                methodInfo.AddLocalVar(item.Name, item.Type);
            }

            entryPoint = new EntryPointBuilder(methodInfo, nameConvertor);

            builders.Add(entryPoint);

            return(entryPoint);
        }