webit.script.core.ast.statements.BreakPointStatement Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of webit-script Show documentation
Show all versions of webit-script Show documentation
a template-like script and engine, all writen with Java.
The newest version!
// Copyright (c) 2013, Webit Team. All Rights Reserved.
package webit.script.core.ast.statements;
import webit.script.Context;
import webit.script.core.ast.Statement;
import webit.script.debug.BreakPointListener;
/**
*
* @author zqq
*/
public class BreakPointStatement extends Statement {
private final BreakPointListener listener;
private final String label;
private final Statement statement;
public BreakPointStatement(BreakPointListener listener, String label, Statement statement, int line, int column) {
super(line, column);
this.listener = listener;
this.label = label;
this.statement = statement;
}
public Object execute(Context context) {
if (statement != null) {
statement.execute(context);
}
listener.onBreak(label, context, this, null);
return null;
}
}