package com.drawbridge.jsengine.ast;
import java.util.LinkedList;
import java.util.List;
import com.drawbridge.jsengine.Scope;
import com.drawbridge.jsengine.jsobjects.ExecutionException;
import com.drawbridge.jsengine.jsobjects.JSType;
import com.google.caja.parser.js.Expression;
import com.google.caja.parser.js.ObjProperty;
public class ObjectPropertyEvaluator extends Evaluator
{
String propertyName;
List<? extends Expression> children;
public ObjectPropertyEvaluator(Evaluator parent, Scope scope, ObjProperty objectProperty) {
super(parent,scope, objectProperty.getFilePosition());
propertyName = objectProperty.getPropertyName();
children = objectProperty.children();
}
@Override
public JSType evaluate() throws EvaluatorException, ExecutionException
{
for(int i = 0; i < children.size(); i++){
Evaluator tempEval = Evaluator.getEvaluator(this, mScope, children.get(i));
tempEval.evaluate();
mChildren.add(tempEval);
}
return null;
}
@Override
public LinkedList<com.drawbridge.vl.blocks.Block> getBlocks()
{
return new LinkedList<com.drawbridge.vl.blocks.Block>();
}
}