/// <summary> /// Declares a new top-level function. /// </summary> /// <param name="methodBase">The method to declare.</param> /// <returns>The declared top-level function.</returns> public Method DeclareFunction(MethodBase methodBase) { if (methodBase == null) { throw Location.GetArgumentNullException(nameof(methodBase)); } return(CodeGenerator.DeclareMethod(methodBase)); }
/// <summary> /// Declares a (potentially new) method. /// </summary> /// <param name="methodBase">The method to declare.</param> /// <returns>The declared method reference.</returns> public Method DeclareMethod(MethodBase methodBase) => methodBase != null ? CodeGenerator.DeclareMethod(methodBase) : throw Location.GetArgumentNullException(nameof(methodBase));