src.unread(c);
if ((buffer = src.readUntil(end)) == null) {
throw new SyntaxException(src.getPosition(), "unterminated string meets end of file");
}
*/
lexer.setValue(new StrNode(lexer.getPosition(), buffer));
return Tokens.tSTRING_CONTENT;
}
ByteList buffer = new ByteList();
if ((flags & RubyYaccLexer.STR_FUNC_EXPAND) != 0 && c == '#') {
c = src.read();
switch (c) {
case '$':
case '@':
src.unread(c);
lexer.setValue(new Token("#" + c, lexer.getPosition()));
return Tokens.tSTRING_DVAR;
case '{':
lexer.setValue(new Token("#" + c, lexer.getPosition()));
return Tokens.tSTRING_DBEG;
}
buffer.append((byte) '#');
}
src.unread(c);
if (parseStringIntoBuffer(lexer, src, buffer) == RubyYaccLexer.EOF) {
throw new SyntaxException(PID.STRING_HITS_EOF, src.getPosition(), "unterminated string meets end of file");
}
lexer.setValue(new StrNode(lexer.getPosition(), buffer));
return Tokens.tSTRING_CONTENT;
}