'Initialize the function
@param funcname {unicode} The name of the function
@param parent {JSObject} The parent scope
@param args {JSArgs} The arguments to the function
@param lineo {int} The line the function starts at
@param depth {int}
@param doc {list of unicode} Documentation comment for the function
@param isLocal {bool} Whether this function is local
@param isHidden {bool} Whether this function should be hidden (not
output into the cix file)
@param path {list of unicode} The path to the function'

def __init__(self, funcname, parent, args, lineno, depth=0, doc=None, isLocal=False, isHidden=False, path=None):

    JSObject.__init__(self, funcname, parent, lineno, depth, doc=doc, isLocal=isLocal, isHidden=isHidden, path=path)
    if isinstance(parent, JSClass):
        self._class = parent
    self._parent_assigned_vars = []
    self._callers = set()
    self.args = list((args or []))
    for (pos, arg) in enumerate(self.args):
        self.addVariable(arg, JSArgument(name=arg, parent=self, line=lineno, depth=depth, pos=pos))
