protected void checkRegexpSyntax(ByteList value, RegexpOptions options) {
RubyRegexp.newRegexp(getConfiguration().getRuntime(), value, options);
}
public Node newRegexpNode(ISourcePosition position, Node contents, RegexpNode end) {
RegexpOptions options = end.getOptions();
Encoding encoding = lexer.getEncoding();
if (contents == null) {
ByteList newValue = ByteList.create("");
if (encoding != null) {
newValue.setEncoding(encoding);
}
regexpFragmentCheck(end, newValue);
return new RegexpNode(position, newValue, options.withoutOnce());
} else if (contents instanceof StrNode) {
ByteList meat = (ByteList) ((StrNode) contents).getValue().clone();
regexpFragmentCheck(end, meat);
checkRegexpSyntax(meat, options.withoutOnce());
return new RegexpNode(contents.getPosition(), meat, options.withoutOnce());
} else if (contents instanceof DStrNode) {
DStrNode dStrNode = (DStrNode) contents;
for (int i = 0; i < dStrNode.size(); i++) {
Node fragment = dStrNode.get(i);