Skip to content

Commit

Permalink
removed commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
prakashk committed Apr 23, 2013
1 parent 2aa1b95 commit c493e26
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/main/scala/org/moe/interpreter/Interpreter.scala
Expand Up @@ -147,7 +147,6 @@ class Interpreter {
}

case HashElementAccessNode(hashName: String, keys: List[AST]) => {
// val key_result = eval(runtime, env, key)
val hash_map = env.get(hashName) match {
case Some(h: MoeHashObject) => h
case _ => throw new MoeErrors.UnexpectedType("MoeHashObject expected")
Expand All @@ -158,32 +157,13 @@ class Interpreter {
val key = eval(runtime, env, k)
callMethod(h, "postcircumfix:<{}>", List(key), "Hash")
}
// hash_map.callMethod(
// hash_map.getAssociatedClass.getOrElse(
// throw new MoeErrors.ClassNotFound("Hash")
// ).getMethod("postcircumfix:<{}>").getOrElse(
// throw new MoeErrors.MethodNotFound("postcircumfix:<{}>")
// ),
// List(key_result)
// )
}

case HashElementLvalueNode(hashName: String, keys: List[AST], value: AST) => {
// val key_result = eval(runtime, env, key)
val hash_map = env.get(hashName) match {
case Some(h: MoeHashObject) => h
case _ => throw new MoeErrors.UnexpectedType("MoeHashObject expected")
}
// val value_result = eval(runtime, env, value)

// hash_map.callMethod(
// hash_map.getAssociatedClass.getOrElse(
// throw new MoeErrors.ClassNotFound("Hash")
// ).getMethod("postcircumfix:<{}>").getOrElse(
// throw new MoeErrors.MethodNotFound("postcircumfix:<{}>")
// ),
// List(key_result, value_result)
// )

// find the deepest hash and key that will be assigned
val last_key = eval(runtime, env, keys.last)
Expand Down

0 comments on commit c493e26

Please sign in to comment.