Function annotateScriptProgram

Same as annotateProgram but for script programs.