protected static LpObject define_method(LpObject self, LpObject[] args, LpObject block = null) { var name = args[0].stringValue; //self.methods[name] = LpMethod.initialize( block.arguments, block.statements.ToList() ); return(LpSymbol.initialize(name)); }
protected static LpObject alias(LpObject self, LpObject[] args, LpObject block = null) { string src = args[0].stringValue; string dst = args[1].stringValue; self.methods[dst] = (LpMethod)self.methods[src]; return(LpSymbol.initialize(dst)); }