code: function extend(from, to, path, overrideLoc) {
    for (var prop in from) {
      if (!(prop in to) || (prop == "loc" && overrideLoc)) {
        to[prop] = from[prop]
      } else if (prop == "properties" || prop == "staticProperties") {
        extend(from[prop], to[prop], path.concat(prop))
      } else {
        var msg = "Conflicting information for " + path.join(".") + "." + prop
        if (to.loc) msg += " at " + to.loc.file + ":" + to.loc.line
        if (from.loc) msg += (to.loc ? " and " : " at ") + from.loc.file + ":" + from.loc.line
        throw new SyntaxError(msg)
      }
    }
    return to
  }
docs: Deriving context from ancestor nodes