예제 #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;
 }