"use strict";

var parse = require('json-to-ast');

exports._parse = function (result) {
    return function (s) {
        try {
            var ast = parse(s, { verbose: false });
            return result.success(ast);
        } catch (e) {
            return result.fail(e.toString());
        }
    };
};

"use strict";

var parse = require('json-to-ast');

exports._parse = function (result) {
    return function (s) {
        try {
            // https://github.com/vtrushin/json-to-ast/issues/15
            var ast = parse(s, { verbose: true });
            return result.success(ast);
        } catch (e) {
            return result.fail(e.toString());
        }
    };
};

Work around for bug in json-to-ast
Work around for bug in json-to-ast


Original commit d6c4c264be7788f30e2a52c91e6dc02690ec1080
