Skip to content

Commit

Permalink
Small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
olabini committed May 6, 2011
1 parent 586bc62 commit 4825b4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions README
Expand Up @@ -2,3 +2,4 @@
Ioke is a strongly typed, dynamic, prototype based programming Ioke is a strongly typed, dynamic, prototype based programming
language. This documentation covers all the core objects of Ioke, language. This documentation covers all the core objects of Ioke,
including methods, macros and specs for these. including methods, macros and specs for these.

5 changes: 3 additions & 2 deletions src/ikj/main/ioke/lang/Interpreter.java
Expand Up @@ -20,10 +20,11 @@
*/ */
public class Interpreter { public class Interpreter {
public Object evaluate(IokeObject self, IokeObject ctx, Object ground, Object receiver) throws ControlFlow { public Object evaluate(IokeObject self, IokeObject ctx, Object ground, Object receiver) throws ControlFlow {
Runtime runtime = self.runtime;
Object current = receiver; Object current = receiver;
Object tmp = null; Object tmp = null;
String name = null; String name = null;
Object lastReal = self.runtime.getNil(); Object lastReal = runtime.getNil();
IokeObject m = self; IokeObject m = self;
Message msg; Message msg;
while(m != null) { while(m != null) {
Expand All @@ -34,7 +35,7 @@ public Object evaluate(IokeObject self, IokeObject ctx, Object ground, Object re
} else if((name = msg.name.intern()) == ".") { } else if((name = msg.name.intern()) == ".") {
current = ctx; current = ctx;
} else if(name.length() > 0 && msg.arguments.size() == 0 && name.charAt(0) == ':') { } else if(name.length() > 0 && msg.arguments.size() == 0 && name.charAt(0) == ':') {
lastReal = msg.cached = current = self.runtime.getSymbol(name.substring(1)); lastReal = msg.cached = current = runtime.getSymbol(name.substring(1));
} else { } else {
if((current instanceof IokeObject) || IokeRegistry.isWrapped(current, ctx)) { if((current instanceof IokeObject) || IokeRegistry.isWrapped(current, ctx)) {
IokeObject recv = IokeObject.as(current, ctx); IokeObject recv = IokeObject.as(current, ctx);
Expand Down

0 comments on commit 4825b4b

Please sign in to comment.