{"action":"created","comment":{"url":"https://api.github.com/repos/scalameta/interpreter/pulls/comments/26111108","id":26111108,"diff_hunk":"@@ -0,0 +1,288 @@\n+package scala.meta.internal\n+package interpreter\n+\n+import scala.util.matching._\n+import scala.meta._\n+import scala.meta.semantic._\n+import scala.meta.internal.{ ast => i }\n+import scala.meta.dialects.Scala211\n+\n+import scala.collection.immutable.ListMap\n+import scala.meta.internal.interpreter.environment._\n+\n+object Interpreter {\n+\n+  def evalFunc(metaprogram: i.Tree, argss: Seq[Any]*)(implicit c: Context): Any =\n+    evalFunc(metaprogram, argss, Env(List(ListMap[i.Term.Name, Object]()), ListMap[i.Term.Name, Object]()))._1\n+\n+  def eval(term: Term)(implicit c: Context): Any = {\n+    val (Object(v, tpe, fields), env) =\n+      eval(term, Env(List(ListMap[i.Term.Name, Object]()), ListMap[i.Term.Name, Object]()))\n+    v\n+  }\n+\n+  private def evalFunc(metaprogram: i.Tree, argss: Seq[Seq[Any]], env: Env)(implicit c: Context): (Object, Env) = {\n+    val defn @ i.Defn.Def(mods, nme, _, paramss, _, body) = metaprogram\n+    val newEnv = (argss zip paramss).foldLeft(env) { (agg, p) =>\n+      (p._1 zip p._2).foldLeft(agg) { (agg1, pv) =>\n+        agg1.push(pv._2.name.asInstanceOf[i.Term.Name], Object(pv._1, pv._2.tpe))\n+      }\n+    }\n+    eval(body, newEnv)\n+  }\n+\n+  def eval(term: Tree, env: Env)(implicit c: Context): (Object, Env) = {\n+    term match {\n+      case i.Term.Block(stats) =>\n+        stats.foldLeft((Object((), t\"Unit\"), env))((res, stat) => eval(stat, res._2))\n+\n+      case nme @ i.Term.Name(_) =>\n+        (env.lookup(nme), env)\n+\n+      // TODO dispatch to pattern matching in an elegant way\n+      case i.Defn.Val(mods, List(i.Pat.Var.Term(name)), tpe, body) =>\n+        val (res, newEnv) = eval(body, env)\n+        // TODO depends of the context (method body or template)\n+        (Object((), t\"Unit\"), newEnv.push(name, res))\n+\n+      // ASK Eugene if we can replace them with one!\n+      case i.Lit.Int(v) =>\n+        (Object(v, t\"Int\"), env)\n+      case i.Lit.String(v) =>\n+        (Object(v, t\"String\"), env)\n+      case i.Lit.Bool(v) =>\n+        (Object(v, t\"Boolean\"), env)\n+      case i.Lit.Unit() =>\n+        (Object((), t\"Unit\"), env)\n+\n+      case i.Term.Tuple(terms) =>\n+        val (res, env1) = evalSeq(terms, env)\n+        (Object((res.head.ref, res.tail.head.ref), t\"(AnyRef, AnyRef)\"), env1) // TODO other cases\n+\n+      case i.Term.Select(lhs, op) =>\n+        val (lhsV, env1) = eval(lhs, env)\n+        val method = lhs.tpe.members.filter(_.name == op).head\n+        methodCall(method, lhsV, Seq(), env1)\n+      case i.Term.ApplyUnary(nme, lhs) =>\n+        val method = lhs.tpe.members.filter(_.name == nme).head\n+        val (lhsV, newEnv) = eval(lhs, env)\n+        methodCall(method, lhsV, Seq(), newEnv)\n+      case i.Term.ApplyInfix(lhs, op, _, args) =>\n+        val method = lhs.tpe.members.filter(_.name == op).head\n+        val (lhsV, newEnv) = eval(lhs, env)\n+        val (rhsVs, callEnv) = evalSeq(args, env)\n+        methodCall(method, lhsV, rhsVs, callEnv)\n+      case i.Term.Apply(i.Term.Select(lhs, rhs), args) =>\n+        val (lhsV, newEnv) = eval(lhs, env)\n+        val method = lhs.tpe.members.filter(_.name.toString == rhs.name.toString).head\n+        val (rhsVs, callEnv) = evalSeq(args, env)\n+        methodCall(method, lhsV, rhsVs, callEnv)\n+      case i.Term.Apply(lhs, args) =>\n+        val method = lhs.tpe.members.filter(_.name.toString == \"apply\").head\n+        val (lhsV, newEnv) = eval(lhs, env)\n+        val (rhsVs, callEnv) = evalSeq(args, env)\n+        methodCall(method, lhsV, rhsVs, callEnv)\n+\n+      case i.Term.If(cond, thn, elze) =>\n+        val (Object(cV: Boolean, _, _), cEnv: Env) = eval(cond, env)\n+        if (cV) eval(thn, cEnv)\n+        else eval(elze, cEnv)\n+\n+      case func @ i.Defn.Def(mods, nme, _, paramss, retTp, body) =>\n+        val funcObj = Object(new Function1[Any, Any] {\n+          var resultEnv: Env = env // TODO fix\n+          def apply(x: Any) = {\n+            val (res, env1) = evalFunc(func, Seq(Seq(x)), resultEnv)\n+            resultEnv = env1\n+            res.ref\n+          }\n+        }, t\"Any => Any\")\n+\n+        (funcObj, env.push(nme, funcObj))\n+\n+      // TODO specialization\n+      case i.Term.Function(params, bodyTerm) =>\n+        // TODO all functions!\n+        // TODO store the returning env!\n+        // TODO proper type.\n+\n+        (Object(new Function1[Any, Any] {\n+          var resultEnv: Env = _\n+          def apply(x: Any) = {\n+            val newEnv = params.foldLeft(env) { (aggEnv, param) =>\n+              aggEnv.push(param.name.asInstanceOf[i.Term.Name], Object(x, param.tpe))\n+            }\n+            val (res, resEnv) = eval(bodyTerm, newEnv)\n+            resultEnv = resEnv\n+            res.ref\n+          }\n+        }, t\"Any => Any\"), env)\n+\n+      // String interpolators\n+      case i.Term.Interpolate(i.Term.Name(\"s\"), strings, terms) =>\n+        val (evalTerms, env1) = evalSeq(terms, env)\n+        val (evalStrings, env2) = evalSeq(strings, env1)\n+        val res = evalStrings.map(_.ref).zipAll(evalTerms.map(_.ref.toString), \"\", \"\").foldLeft(\"\")((res, s) => res + s._1 + s._2)\n+        (Object(res, t\"String\"), env2)\n+\n+      // Pattern matching\n+      case i.Term.Match(lhs, cases) =>\n+        val (lhsV, env1) = eval(lhs, env)\n+        var env2 = env1\n+        cases.collectFirst({\n+          case i.Case(pattern, guard, block) if ({\n+            { val (res, env3) = evalPattern(lhsV, pattern, env2); env2 = env3; res.as[Boolean] } &&\n+              (guard.isEmpty || { val (res, env3) = evalGuard(lhsV, guard.get, env2); env2 = env3; res.as[Boolean] })\n+          }) =>\n+            eval(block, env2)\n+        }).getOrElse(throw new MatchError(lhsV.ref, lhsV.tpe)) // TODO this needs to be an evaluated exception\n+\n+      case _ => Utils.unsupported(term, \"term\")\n+    }\n+  }\n+\n+  def evalPattern(lhs: Object, pattern: i.Pat, env: Env)(implicit c: Context): (Object, Env) = pattern match {\n+    case i.Pat.Typed(x, tp) =>\n+      (Object(tp.tpe <:< lhs.tpe, t\"Boolean\"), extendEnv(x, lhs, env))\n+    case i.Pat.Wildcard() =>\n+      (Object(true, t\"Boolean\"), env)\n+    case _ => Utils.unsupported(pattern, \"pattern\")\n+  }\n+\n+  def extendEnv(v: i.Tree, lhs: Object, env: Env)(implicit c: Context): Env = v match {\n+    case i.Pat.Var.Term(name) => env.push(name, lhs)\n+    case _ => Utils.unsupported(v, \"variable\")\n+  }\n+\n+  def evalGuard(lhs: Object, guard: i.Term, env: Env)(implicit x: Context): (Object, Env) = ???\n+\n+  def evalSeq[T <: Tree](terms: Seq[T], env: Env)(implicit c: Context): (Seq[Object], Env) =\n+    terms.foldLeft((Seq[Object](), env)) { (acc, arg) =>\n+      val (res, newEnv) = eval(arg, acc._2)\n+      (acc._1 :+ res, newEnv)\n+    }\n+\n+  def methodCall(member: Member, lhs: Object, rhs: Seq[Object], env: Env)(implicit c: Context): (Object, Env) = {\n+    member match {\n+      // abstract method\n+      case m @ i.Decl.Def(mods, _, _, paramss, _) => // interface\n+        methodCallByMods(mods, paramss, lhs, rhs, env)\n+      case i.Defn.Def(mods, _, _, paramss, _, i.Term.Name(\"???\")) =>\n+        methodCallByMods(mods, paramss, lhs, rhs, env)\n+      case m @ i.Pat.Var.Term(nme) =>\n+        methodCallByMods(member.mods.asInstanceOf[scala.collection.Seq[scala.meta.internal.ast.Mod]], Nil, lhs, rhs, env)\n+      case _ => Utils.unsupported(member, \"member\")\n+    }\n+  }\n+\n+  def methodCallByMods(mods: Seq[i.Mod], params: Seq[Seq[i.Term.Param]], lhs: Object, rhs: Seq[Object], env: Env)(implicit c: Context) = {\n+    val jvmMethod: String = mods.collect({ case i.Mod.Ffi(s) => s }).head\n+    val rgx = \"\"\"(.*)\\((.*), (.*), (.*)\"\"\".r\n+    jvmMethod.substring(0, jvmMethod.length - 1) match {\n+      case rgx(\"scalaIntrinsic\", lhsJTp, nme, argsRetJTp) =>\n+        ScalaEmulator.emulate(List(lhsJTp, nme, argsRetJTp), lhs +: rhs, env)\n+      case rgx(\"jvmMethod\", lhsJTp, nme, argsRetJTp) =>\n+        methodCallByJavaSignature(params, lhs, rhs, lhsJTp, nme, argsRetJTp, env)\n+      case _ => // call method in the interpreter\n+        ???\n+    }\n+  }\n+\n+  def methodCallByJavaSignature(\n+    params: Seq[Seq[i.Term.Param]], lhs: Object, rhs: Seq[Object],\n+    lhsJTp: String, nme: String, argsRetJTp: String, env: Env)(implicit c: Context) = {\n+\n+    val paramsRegex = \"\"\"\\((.*)\\).*\"\"\".r\n+    val paramsRegex(jvmParams) = argsRetJTp\n+    val types = jvmParams.replaceAll(\"(L.*?;|I|B)\", \"$1,\").split(\",\").toList.filterNot(_.trim.isEmpty).map(Utils.jvmTypeToClass)\n+    println(\"Expected class is: \" + Utils.jvmTypeToClass(lhsJTp))\n+    val jMethod = Utils.jvmTypeToClass(lhsJTp).getMethod(nme, types: _*)\n+\n+    val repeated = params.exists(_.exists {\n+      case i.Term.Param(_, _, Some(i.Type.Arg.Repeated(_)), _) => true\n+      case _ => false\n+    })\n+\n+    val (vLHS, vRHS) = (lhs.ref, rhs.map(_.ref))\n+    val args = if (repeated) // pack trailing arguments into a seq\n+      (vRHS.take(types.length - 1) :+ Seq(vRHS.drop(types.length - 1): _*)).toSeq\n+    else vRHS\n+    val jvmArgs = args.toSeq.asInstanceOf[Seq[AnyRef]]\n+    try {\n+      // FIX[Desugar]: Hardcode the implicit arguments\n+      val hardWiredArgs = jvmArgs ++ ((lhsJTp, nme, argsRetJTp) match {\n+        case (\"Lscala/collection/immutable/List;\", \"map\", \"(Lscala/Function1;Lscala/collection/generic/CanBuildFrom;)Ljava/lang/Object;\") =>\n+          Seq(List.canBuildFrom[AnyRef])\n+        case (\"Lscala/meta/semantic/Api/XtensionSemanticTypeRefDefn;\", \"defn\", \"(Lscala/meta/semantic/Context;)Lscala/meta/Member;\") =>\n+          val context = env.stack.flatten.find(_._1.toString == \"c\").head._2.ref\n+          Seq(context.asInstanceOf[AnyRef])\n+        case (\"Lscala/meta/semantic/Api/XtensionSemanticMemberLike;\", \"isClass\", \"(Lscala/meta/semantic/Context;)Z\") =>\n+          val context = env.stack.flatten.find(_._1.toString == \"c\").head._2.ref\n+          Seq(context.asInstanceOf[AnyRef])\n+        case (\"Lscala/meta/semantic/Api/XtensionSemanticMemberLike;\", \"isObject\", \"(Lscala/meta/semantic/Context;)Z\") =>\n+          val context = env.stack.flatten.find(_._1.toString == \"c\").head._2.ref\n+          Seq(context.asInstanceOf[AnyRef])\n+        case (\"Lscala/meta/semantic/Api/XtensionSemanticMemberLike;\", \"isTrait\", \"(Lscala/meta/semantic/Context;)Z\") =>\n+          val context = env.stack.flatten.find(_._1.toString == \"c\").head._2.ref\n+          Seq(context.asInstanceOf[AnyRef])\n+        case (\"Lscala/meta/semantic/Api/XtensionSemanticMemberLike;\", \"name\", \"(Lscala/meta/semantic/Context;)Lscala/meta/Name;\") =>\n+          val context = env.stack.flatten.find(_._1.toString == \"c\").head._2.ref\n+          Seq(context.asInstanceOf[AnyRef])\n+        case (\"Lscala/meta/semantic/Api/XtensionSemanticMemberLike;\", \"isSealed\", \"(Lscala/meta/semantic/Context;)Z\") =>\n+          val context = env.stack.flatten.find(_._1.toString == \"c\").head._2.ref\n+          Seq(context.asInstanceOf[AnyRef])\n+        case (\"Lscala/meta/semantic/Api/XtensionSemanticMemberLike;\", \"children\", \"(Lscala/meta/semantic/Context;)Lscala/collection/immutable/Seq;\") =>\n+          val context = env.stack.flatten.find(_._1.toString == \"c\").head._2.ref\n+          Seq(context.asInstanceOf[AnyRef])\n+        case (\"Lscala/meta/semantic/Api/XtensionSemanticMemberLike;\", \"isFinal\", \"(Lscala/meta/semantic/Context;)Z\") =>\n+          val context = env.stack.flatten.find(_._1.toString == \"c\").head._2.ref\n+          Seq(context.asInstanceOf[AnyRef])\n+        case (\"Lscala/meta/semantic/Api/XtensionSemanticMemberLike;\", \"isCase\", \"(Lscala/meta/semantic/Context;)Z\") =>\n+          val context = env.stack.flatten.find(_._1.toString == \"c\").head._2.ref\n+          Seq(context.asInstanceOf[AnyRef])\n+\n+        case _ =>\n+          println(lhsJTp, nme, argsRetJTp)\n+          Seq()\n+      })\n+\n+      // FIX[Desugar]: This part is for extension methods!\n+      val extendedLHS = (vLHS, jMethod.getName()) match {\n+        case (lhs: i.Type.Name, \"defn\") =>\n+          XtensionSemanticTypeRefDefn(lhs)\n+        case (lhs: i.Defn.Type, _) =>\n+          XtensionSemanticMember(lhs)\n+        case (lhs: i.Defn.Trait, _) =>\n+          XtensionSemanticMember(lhs)\n+        case (lhs: i.Defn.Class, _) =>\n+          XtensionSemanticMember(lhs)\n+        case _ =>\n+          vLHS\n+      }\n+      println(\"Class is:\" + extendedLHS.getClass)\n+      println(jMethod.getName(), extendedLHS, hardWiredArgs)\n+      (Object(jMethod.invoke(extendedLHS, hardWiredArgs: _*), t\"List[Int]\"), env)\n+    } catch {\n+      case e: java.lang.reflect.InvocationTargetException =>\n+        throw e.getCause()\n+    }\n+  }\n+}\n+\n+object Utils {\n+  def jvmTypeToClass(s: String): Class[_] = s match {\n+    case \"I\" => classOf[Int]\n+    case \"Lscala/meta/semantic/Api/XtensionSemanticTypeRefDefn;\" => // TODO URGH!      \n+      Class.forName(\"scala.meta.semantic.Api$XtensionSemanticTypeRefDefn\")\n+    case \"Lscala/meta/semantic/Api/XtensionSemanticMemberLike;\" => // TODO URGH!\n+      Class.forName(\"scala.meta.semantic.Api$XtensionSemanticMemberLike\")","path":"core/src/main/scala/scala/meta/internal/interpreter/Engine.scala","position":278,"original_position":278,"commit_id":"1c0ebee9406bfc723938a5d44f8ed29997b35d46","original_commit_id":"1c0ebee9406bfc723938a5d44f8ed29997b35d46","user":{"login":"xeno-by","id":609152,"avatar_url":"https://avatars.githubusercontent.com/u/609152?v=3","gravatar_id":"","url":"https://api.github.com/users/xeno-by","html_url":"https://github.com/xeno-by","followers_url":"https://api.github.com/users/xeno-by/followers","following_url":"https://api.github.com/users/xeno-by/following{/other_user}","gists_url":"https://api.github.com/users/xeno-by/gists{/gist_id}","starred_url":"https://api.github.com/users/xeno-by/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xeno-by/subscriptions","organizations_url":"https://api.github.com/users/xeno-by/orgs","repos_url":"https://api.github.com/users/xeno-by/repos","events_url":"https://api.github.com/users/xeno-by/events{/privacy}","received_events_url":"https://api.github.com/users/xeno-by/received_events","type":"User","site_admin":false},"body":"Looks like a bug in `jvmsig`. I'll look into this right now.","created_at":"2015-03-10T10:36:25Z","updated_at":"2015-03-10T10:36:25Z","html_url":"https://github.com/scalameta/interpreter/pull/11#discussion_r26111108","pull_request_url":"https://api.github.com/repos/scalameta/interpreter/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/scalameta/interpreter/pulls/comments/26111108"},"html":{"href":"https://github.com/scalameta/interpreter/pull/11#discussion_r26111108"},"pull_request":{"href":"https://api.github.com/repos/scalameta/interpreter/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/scalameta/interpreter/pulls/11","id":30772974,"html_url":"https://github.com/scalameta/interpreter/pull/11","diff_url":"https://github.com/scalameta/interpreter/pull/11.diff","patch_url":"https://github.com/scalameta/interpreter/pull/11.patch","issue_url":"https://api.github.com/repos/scalameta/interpreter/issues/11","number":11,"state":"open","locked":false,"title":"Topic/first real example","user":{"login":"vjovanov","id":352820,"avatar_url":"https://avatars.githubusercontent.com/u/352820?v=3","gravatar_id":"","url":"https://api.github.com/users/vjovanov","html_url":"https://github.com/vjovanov","followers_url":"https://api.github.com/users/vjovanov/followers","following_url":"https://api.github.com/users/vjovanov/following{/other_user}","gists_url":"https://api.github.com/users/vjovanov/gists{/gist_id}","starred_url":"https://api.github.com/users/vjovanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vjovanov/subscriptions","organizations_url":"https://api.github.com/users/vjovanov/orgs","repos_url":"https://api.github.com/users/vjovanov/repos","events_url":"https://api.github.com/users/vjovanov/events{/privacy}","received_events_url":"https://api.github.com/users/vjovanov/received_events","type":"User","site_admin":false},"body":"This pull request rounds up on running one branch of the first example with reflection.","created_at":"2015-03-09T15:54:35Z","updated_at":"2015-03-10T10:36:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"011e8e68c185ef6e8489b6711a264cf3c3ac0124","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scalameta/interpreter/pulls/11/commits","review_comments_url":"https://api.github.com/repos/scalameta/interpreter/pulls/11/comments","review_comment_url":"https://api.github.com/repos/scalameta/interpreter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scalameta/interpreter/issues/11/comments","statuses_url":"https://api.github.com/repos/scalameta/interpreter/statuses/1c0ebee9406bfc723938a5d44f8ed29997b35d46","head":{"label":"vjovanov:topic/first-real-example","ref":"topic/first-real-example","sha":"1c0ebee9406bfc723938a5d44f8ed29997b35d46","user":{"login":"vjovanov","id":352820,"avatar_url":"https://avatars.githubusercontent.com/u/352820?v=3","gravatar_id":"","url":"https://api.github.com/users/vjovanov","html_url":"https://github.com/vjovanov","followers_url":"https://api.github.com/users/vjovanov/followers","following_url":"https://api.github.com/users/vjovanov/following{/other_user}","gists_url":"https://api.github.com/users/vjovanov/gists{/gist_id}","starred_url":"https://api.github.com/users/vjovanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vjovanov/subscriptions","organizations_url":"https://api.github.com/users/vjovanov/orgs","repos_url":"https://api.github.com/users/vjovanov/repos","events_url":"https://api.github.com/users/vjovanov/events{/privacy}","received_events_url":"https://api.github.com/users/vjovanov/received_events","type":"User","site_admin":false},"repo":{"id":30251335,"name":"interpreter","full_name":"vjovanov/interpreter","owner":{"login":"vjovanov","id":352820,"avatar_url":"https://avatars.githubusercontent.com/u/352820?v=3","gravatar_id":"","url":"https://api.github.com/users/vjovanov","html_url":"https://github.com/vjovanov","followers_url":"https://api.github.com/users/vjovanov/followers","following_url":"https://api.github.com/users/vjovanov/following{/other_user}","gists_url":"https://api.github.com/users/vjovanov/gists{/gist_id}","starred_url":"https://api.github.com/users/vjovanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vjovanov/subscriptions","organizations_url":"https://api.github.com/users/vjovanov/orgs","repos_url":"https://api.github.com/users/vjovanov/repos","events_url":"https://api.github.com/users/vjovanov/events{/privacy}","received_events_url":"https://api.github.com/users/vjovanov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vjovanov/interpreter","description":"AST interpreter for scala.meta","fork":true,"url":"https://api.github.com/repos/vjovanov/interpreter","forks_url":"https://api.github.com/repos/vjovanov/interpreter/forks","keys_url":"https://api.github.com/repos/vjovanov/interpreter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vjovanov/interpreter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vjovanov/interpreter/teams","hooks_url":"https://api.github.com/repos/vjovanov/interpreter/hooks","issue_events_url":"https://api.github.com/repos/vjovanov/interpreter/issues/events{/number}","events_url":"https://api.github.com/repos/vjovanov/interpreter/events","assignees_url":"https://api.github.com/repos/vjovanov/interpreter/assignees{/user}","branches_url":"https://api.github.com/repos/vjovanov/interpreter/branches{/branch}","tags_url":"https://api.github.com/repos/vjovanov/interpreter/tags","blobs_url":"https://api.github.com/repos/vjovanov/interpreter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vjovanov/interpreter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vjovanov/interpreter/git/refs{/sha}","trees_url":"https://api.github.com/repos/vjovanov/interpreter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vjovanov/interpreter/statuses/{sha}","languages_url":"https://api.github.com/repos/vjovanov/interpreter/languages","stargazers_url":"https://api.github.com/repos/vjovanov/interpreter/stargazers","contributors_url":"https://api.github.com/repos/vjovanov/interpreter/contributors","subscribers_url":"https://api.github.com/repos/vjovanov/interpreter/subscribers","subscription_url":"https://api.github.com/repos/vjovanov/interpreter/subscription","commits_url":"https://api.github.com/repos/vjovanov/interpreter/commits{/sha}","git_commits_url":"https://api.github.com/repos/vjovanov/interpreter/git/commits{/sha}","comments_url":"https://api.github.com/repos/vjovanov/interpreter/comments{/number}","issue_comment_url":"https://api.github.com/repos/vjovanov/interpreter/issues/comments{/number}","contents_url":"https://api.github.com/repos/vjovanov/interpreter/contents/{+path}","compare_url":"https://api.github.com/repos/vjovanov/interpreter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vjovanov/interpreter/merges","archive_url":"https://api.github.com/repos/vjovanov/interpreter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vjovanov/interpreter/downloads","issues_url":"https://api.github.com/repos/vjovanov/interpreter/issues{/number}","pulls_url":"https://api.github.com/repos/vjovanov/interpreter/pulls{/number}","milestones_url":"https://api.github.com/repos/vjovanov/interpreter/milestones{/number}","notifications_url":"https://api.github.com/repos/vjovanov/interpreter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vjovanov/interpreter/labels{/name}","releases_url":"https://api.github.com/repos/vjovanov/interpreter/releases{/id}","created_at":"2015-02-03T16:06:54Z","updated_at":"2015-02-03T16:11:23Z","pushed_at":"2015-03-09T19:04:28Z","git_url":"git://github.com/vjovanov/interpreter.git","ssh_url":"git@github.com:vjovanov/interpreter.git","clone_url":"https://github.com/vjovanov/interpreter.git","svn_url":"https://github.com/vjovanov/interpreter","homepage":null,"size":143,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"scalameta:master","ref":"master","sha":"88a98e481489f27be4962f444bbf28ff29f58b77","user":{"login":"scalameta","id":7526438,"avatar_url":"https://avatars.githubusercontent.com/u/7526438?v=3","gravatar_id":"","url":"https://api.github.com/users/scalameta","html_url":"https://github.com/scalameta","followers_url":"https://api.github.com/users/scalameta/followers","following_url":"https://api.github.com/users/scalameta/following{/other_user}","gists_url":"https://api.github.com/users/scalameta/gists{/gist_id}","starred_url":"https://api.github.com/users/scalameta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scalameta/subscriptions","organizations_url":"https://api.github.com/users/scalameta/orgs","repos_url":"https://api.github.com/users/scalameta/repos","events_url":"https://api.github.com/users/scalameta/events{/privacy}","received_events_url":"https://api.github.com/users/scalameta/received_events","type":"Organization","site_admin":false},"repo":{"id":20905154,"name":"interpreter","full_name":"scalameta/interpreter","owner":{"login":"scalameta","id":7526438,"avatar_url":"https://avatars.githubusercontent.com/u/7526438?v=3","gravatar_id":"","url":"https://api.github.com/users/scalameta","html_url":"https://github.com/scalameta","followers_url":"https://api.github.com/users/scalameta/followers","following_url":"https://api.github.com/users/scalameta/following{/other_user}","gists_url":"https://api.github.com/users/scalameta/gists{/gist_id}","starred_url":"https://api.github.com/users/scalameta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scalameta/subscriptions","organizations_url":"https://api.github.com/users/scalameta/orgs","repos_url":"https://api.github.com/users/scalameta/repos","events_url":"https://api.github.com/users/scalameta/events{/privacy}","received_events_url":"https://api.github.com/users/scalameta/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scalameta/interpreter","description":"AST interpreter for scala.meta","fork":false,"url":"https://api.github.com/repos/scalameta/interpreter","forks_url":"https://api.github.com/repos/scalameta/interpreter/forks","keys_url":"https://api.github.com/repos/scalameta/interpreter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scalameta/interpreter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scalameta/interpreter/teams","hooks_url":"https://api.github.com/repos/scalameta/interpreter/hooks","issue_events_url":"https://api.github.com/repos/scalameta/interpreter/issues/events{/number}","events_url":"https://api.github.com/repos/scalameta/interpreter/events","assignees_url":"https://api.github.com/repos/scalameta/interpreter/assignees{/user}","branches_url":"https://api.github.com/repos/scalameta/interpreter/branches{/branch}","tags_url":"https://api.github.com/repos/scalameta/interpreter/tags","blobs_url":"https://api.github.com/repos/scalameta/interpreter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scalameta/interpreter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scalameta/interpreter/git/refs{/sha}","trees_url":"https://api.github.com/repos/scalameta/interpreter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scalameta/interpreter/statuses/{sha}","languages_url":"https://api.github.com/repos/scalameta/interpreter/languages","stargazers_url":"https://api.github.com/repos/scalameta/interpreter/stargazers","contributors_url":"https://api.github.com/repos/scalameta/interpreter/contributors","subscribers_url":"https://api.github.com/repos/scalameta/interpreter/subscribers","subscription_url":"https://api.github.com/repos/scalameta/interpreter/subscription","commits_url":"https://api.github.com/repos/scalameta/interpreter/commits{/sha}","git_commits_url":"https://api.github.com/repos/scalameta/interpreter/git/commits{/sha}","comments_url":"https://api.github.com/repos/scalameta/interpreter/comments{/number}","issue_comment_url":"https://api.github.com/repos/scalameta/interpreter/issues/comments{/number}","contents_url":"https://api.github.com/repos/scalameta/interpreter/contents/{+path}","compare_url":"https://api.github.com/repos/scalameta/interpreter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scalameta/interpreter/merges","archive_url":"https://api.github.com/repos/scalameta/interpreter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scalameta/interpreter/downloads","issues_url":"https://api.github.com/repos/scalameta/interpreter/issues{/number}","pulls_url":"https://api.github.com/repos/scalameta/interpreter/pulls{/number}","milestones_url":"https://api.github.com/repos/scalameta/interpreter/milestones{/number}","notifications_url":"https://api.github.com/repos/scalameta/interpreter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scalameta/interpreter/labels{/name}","releases_url":"https://api.github.com/repos/scalameta/interpreter/releases{/id}","created_at":"2014-06-17T00:36:20Z","updated_at":"2015-02-21T18:11:09Z","pushed_at":"2015-02-21T18:11:08Z","git_url":"git://github.com/scalameta/interpreter.git","ssh_url":"git@github.com:scalameta/interpreter.git","clone_url":"https://github.com/scalameta/interpreter.git","svn_url":"https://github.com/scalameta/interpreter","homepage":null,"size":264,"stargazers_count":1,"watchers_count":1,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scalameta/interpreter/pulls/11"},"html":{"href":"https://github.com/scalameta/interpreter/pull/11"},"issue":{"href":"https://api.github.com/repos/scalameta/interpreter/issues/11"},"comments":{"href":"https://api.github.com/repos/scalameta/interpreter/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/scalameta/interpreter/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/scalameta/interpreter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scalameta/interpreter/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/scalameta/interpreter/statuses/1c0ebee9406bfc723938a5d44f8ed29997b35d46"}}}}