view src/luan/interp/OutputStmt.java @ 88:6ca02b188dba

add LuanBit to clean up code; add repr(); git-svn-id: https://luan-java.googlecode.com/svn/trunk@89 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Wed, 27 Feb 2013 23:50:32 +0000
parents f5b27ef14d73
children
line wrap: on
line source

package luan.interp;

import luan.Luan;
import luan.LuanSource;
import luan.LuanException;
import luan.LuanBit;


final class OutputStmt extends CodeImpl implements Stmt {
	private final Expressions expressions;

	OutputStmt(LuanSource.Element se,Expressions expressions) {
		super(se);
		this.expressions = expressions;
	}

	@Override public void eval(LuanStateImpl luan) throws LuanException {
		LuanBit bit = luan.bit(se);
		for( Object obj : expressions.eval(luan) ) {
			luan.out.print( bit.toString(obj) );
		}
	}

}