public void Visit(NodeRet ret) { throw new NotImplementedException(); }
public void Visit(NodeRet ret) { log.Error(ret.Span, "Return statement is not valid in this placement. Perhaps you meant to put it in a function?"); }
public void Visit(NodeRet ret) { if (ret.IsVoidRet) { if (!currentFn.ty.IsVoid) log.Error(ret.Span, "Cannot return void from a function that returns {0}.", currentFn.ty.returnTy); return; } else if (currentFn.ty.IsVoid) { log.Error(ret.Span, "Cannot return a value from a function that returns void."); return; } ret.value.Accept(this); var ty = Pop(); if (ty != currentFn.ty.returnTy.Raw) log.Error(ret.Span, "Type mismatch: Cannot convert from {0} to {1}.", ty, currentFn.ty.returnTy); }
public void Visit(NodeRet ret) { ret.value.Accept(this); var result = Pop().value; BuildRet(builder, result); }
public void Visit(NodeRet ret) { }
public void Visit(NodeRet ret) { ret.value.Accept(this); }
public void Visit(NodeRet ret) { Write("'ret'"); if (!ret.IsVoidRet) { Write(" "); ret.value.Accept(this); } }