package org.jruby.ast;
import org.jcodings.Encoding;
import org.jcodings.specific.ASCIIEncoding;
import org.jruby.lexer.yacc.ISourcePosition;
public abstract class DNode extends ListNode {
protected Encoding encoding;
public DNode(ISourcePosition position) {
this(position, ASCIIEncoding.INSTANCE);
}
public DNode(ISourcePosition position, Encoding encoding) {
super(position);
assert encoding != null: getClass().getName() + " passed in a null encoding";
this.encoding = encoding;
}
public Encoding getEncoding() {
return encoding;
}
}