context.createNewRange(beginEndCallback, dotNode.isExclusive());
}
}
public void compileDRegexp(Node node, BodyCompiler context, boolean expr) {
final DRegexpNode dregexpNode = (DRegexpNode) node;
CompilerCallback createStringCallback = new CompilerCallback() {
public void call(BodyCompiler context) {
ArrayCallback dstrCallback = new ArrayCallback() {
public void nextValue(BodyCompiler context, Object sourceArray,
int index) {
compile(dregexpNode.get(index), context, true);
}
};
context.createNewString(dstrCallback, dregexpNode.size());
}
};
if (expr) {
context.createNewRegexp(createStringCallback, dregexpNode.getOptions().toEmbeddedOptions());
} else {
// not an expression, only compile the elements
for (Node nextNode : dregexpNode.childNodes()) {
compile(nextNode, context, false);
}
}
}