Пример #1
0
        public override void Visit(FunctionBodyAST functionBody)
        {
            Visit(functionBody.Prototype);

            var block = LLVM.AppendBasicBlock(_currentFunction, "entry");

            LLVM.PositionBuilderAtEnd(_builder, block);

            Visit(functionBody.Scope);

            if (functionBody.Prototype.ReturnType.ToString() == Enum.GetName(typeof(Keyword), Keyword.VOID).ToLower())
            {
                LLVM.BuildRetVoid(_builder);
            }
        }
Пример #2
0
 public override void Visit(FunctionBodyAST functionBody)
 {
     Visit(functionBody.Prototype);
     Visit(functionBody.Scope);
 }
Пример #3
0
 public virtual void Visit(FunctionBodyAST functionBody)
 {
 }
Пример #4
0
 public override void Visit(FunctionBodyAST functionBody)
 {
     Visit(functionBody.Prototype);
     Visit(functionBody.Scope);
     _returnType = null;
 }