static CYExpression *ParseExpression(CYPool &pool, CYUTF8String code) {
std::stringstream stream;
stream << '(' << code << ')';
- CYDriver driver(pool, stream);
+ CYDriver driver(pool, *stream.rdbuf());
if (driver.Parse() || !driver.errors_.empty())
return NULL;
_visible char **CYComplete(const char *word, const std::string &line, CYUTF8String (*run)(CYPool &pool, const std::string &)) {
CYLocalPool pool;
- std::istringstream stream(line);
+ std::stringbuf stream(line);
CYDriver driver(pool, stream);
driver.auto_ = true;
" if (name.substring(0, entire) == prefix)\n"
" names.push(name.substr(before));\n"
" } else do {\n"
+ " if (object.hasOwnProperty(\"cy$complete\")) {\n"
+ " names = names.concat(object.cy$complete(prefix));\n"
+ " continue;\n"
+ " }\n"
" try {\n"
" var local = Object.getOwnPropertyNames(object);\n"
" } catch (e) {\n"