/* Cycript - Optimizing JavaScript Compiler/Runtime
- * Copyright (C) 2009-2010 Jay Freeman (saurik)
+ * Copyright (C) 2009-2012 Jay Freeman (saurik)
*/
/* GNU Lesser General Public License, Version 3 {{{ */
return;
data[size] = '\0';
- CYDriver driver;
- cy::parser parser(driver);
+ CYStream stream(data, data + size);
+ CYDriver driver(stream);
- driver.data_ = data;
- driver.size_ = size;
+ cy::parser parser(driver);
const char *json;
if (parser.parse() != 0 || !driver.errors_.empty()) {