lexer.setValue(lexer.createStrNode(lexer.getPosition(), buffer, flags));
return Tokens.tSTRING_CONTENT;
}
private RegexpOptions parseRegexpFlags(LexerSource src) throws IOException {
RegexpOptions options = new RegexpOptions();
int c;
StringBuilder unknownFlags = new StringBuilder(10);
for (c = src.read(); c != RubyYaccLexer.EOF
&& Character.isLetter(c); c = src.read()) {
switch (c) {
case 'i':
options.setIgnorecase(true);
break;
case 'x':
options.setExtended(true);
break;
case 'm':
options.setMultiline(true);
break;
case 'o':
options.setOnce(true);
break;
case 'n':
options.setExplicitKCode(KCode.NONE);
break;
case 'e':
options.setExplicitKCode(KCode.EUC);
break;
case 's':
options.setExplicitKCode(KCode.SJIS);
break;
case 'u':
options.setExplicitKCode(KCode.UTF8);
break;
case 'j':
options.setJava(true);
break;
default:
unknownFlags.append((char) c);
break;
}