Mercurial Hosting > luan
comparison src/luan/interp/OutputStmt.java @ 54:f5b27ef14d73
add OutputStmt
git-svn-id: https://luan-java.googlecode.com/svn/trunk@55 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Mon, 31 Dec 2012 19:45:06 +0000 |
parents | |
children | 6ca02b188dba |
comparison
equal
deleted
inserted
replaced
53:54a61d1dc070 | 54:f5b27ef14d73 |
---|---|
1 package luan.interp; | |
2 | |
3 import luan.Luan; | |
4 import luan.LuanSource; | |
5 import luan.LuanException; | |
6 | |
7 | |
8 final class OutputStmt extends CodeImpl implements Stmt { | |
9 private final Expressions expressions; | |
10 | |
11 OutputStmt(LuanSource.Element se,Expressions expressions) { | |
12 super(se); | |
13 this.expressions = expressions; | |
14 } | |
15 | |
16 @Override public void eval(LuanStateImpl luan) throws LuanException { | |
17 for( Object obj : expressions.eval(luan) ) { | |
18 luan.out.print( luan.toString(se,obj) ); | |
19 } | |
20 } | |
21 | |
22 } |