docs: function (bindingDef, targetScope, attrKey, context) {
              var path = bindingDef.path;
              var pathElement = path[0];
  
              var scope;
              var searchScope = targetScope;
              if (pathElement.type != Binding.TYPE_FNC && attrKey == pathElement.name) {
                  searchScope = searchScope.$parentScope;
              }
  
              if (pathElement.type == Binding.TYPE_FNC) {
                  scope = searchScope.getScopeForFncName(pathElement.name);
              } else {
                  scope = searchScope.getScopeForKey(pathElement.name);
              }
  
              if (scope) {
                  if (bindingDef.type !== "static") {
                      var cb;
                      if (_.isFunction(attrKey)) {
                          cb = attrKey;
                      }
  
                      var twoWay = (bindingDef.type == Binding.TYPE_TWOWAY);
  
                      var options = {
                          scope: scope,
                          path: path,
                          parent: bindingDef.parent,
                          target: targetScope,
                          twoWay: twoWay,
                          context: context,
                          bindingCreator: this
                      };
  
                      if (twoWay) {
                          var fncName,
                              fncScope;
                          if (bindingDef.transform && bindingDef.transform.length) {
                              fncName = bindingDef.transform[0].name;
                              fncScope = searchScope.getScopeForFncName(fncName);
                              if (fncScope && fncScope[fncName] instanceof Function) {
                                  options.transform = fncScope[fncName];
                                  options.transformScope = fncScope;
                              }
                          }
  
                          if (bindingDef.transformBack && bindingDef.transformBack.length) {
                              fncName = bindingDef.transformBack[0].name;
                              fncScope = searchScope.getScopeForFncName(fncName);
                              if (fncScope && fncScope[fncName] instanceof Function) {
                                  options.transformBack = fncScope[fncName];
                                  options.transformBackScope = fncScope;
                              }
                          }
                      }
  
                      if (cb) {
                          options.callback = cb;
                      } else {
                          options.targetKey = attrKey;
                      }
  
                      return new Binding(options);
                  } else {
                      var par,
                          newPath = [];
  
                      function resolvePath(scope, path) {
                          return scope.get(resolveParameter(path));
                      }
  
                      function resolveParameter(path) {
                          var pathElement,
                              first,
                              scope,
                              newPath = [],
                              parameter = [];
                          for (var i = 0; i < path.length; i++) {
                              pathElement = path[i];
                              if (_.isObject(pathElement)) {
                                  if (pathElement.type === "fnc") {
                                      parameter = [];
                                      for (var j = 0; j < pathElement.parameter.length; j++) {
                                          par = pathElement.parameter[j];
                                          // if it's a path
                                          if (_.isArray(par)) {
                                              first = par[0];
                                              // TODO: check targetscope first
                                              if (first.type === "var") {
                                                  scope = searchScope.getScopeForKey(first.name);
                                              } else if (first.type === "fnc") {
                                                  scope = searchScope.getScopeForKey(first.name);
                                              }
                                              if (scope) {
                                                  par = resolvePath(scope, par);
                                              }
                                          }
                                          parameter.push(par);
                                      }
  
                                  }
                                  newPath.push({
                                      index: pathElement.index,
                                      type: pathElement.type,
                                      name: pathElement.name,
                                      parameter: parameter
                                  })
                              }
                          }
  
                          return newPath;
                      }
  
                      return scope.get(resolveParameter(bindingDef.path));
                  }
              } else {
                  throw new Error("Couldn't find scope for " + pathElement.name);
              }
  
          }