public override string VisitFunctionTypeExpr(AstFunctionTypeExpr type, int data = 0) { string fn = type.IsFatFunction ? "Fn" : "fn"; var args = string.Join(", ", type.ParameterTypes.Select(p => p.Accept(this))); if (type.ReturnType != null) { return($"{fn}({args}) -> {type.ReturnType.Accept(this)}"); } else { return($"{fn}({args})"); } }
public virtual ReturnType VisitFunctionTypeExpr(AstFunctionTypeExpr type, DataType data = default) => default;