This commit is contained in:
Andrey Gubanov (his digital copy)
2016-09-25 15:55:43 +03:00
parent 39f5c3dc89
commit 1d18f80902
5 changed files with 815 additions and 8 deletions

View File

@@ -53,7 +53,7 @@
prototype, push, r, t, text
*/
module.exports = (function () {
var ___dougJSONParse = (function () {
"use strict";
// This is a function that can parse a JSON text, producing a JavaScript
@@ -354,3 +354,7 @@ module.exports = (function () {
: result;
};
}());
if(typeof module === 'object' && module.exports) {
module.exports = ___dougJSONParse;
}

View File

@@ -1,7 +1,7 @@
/* Jison generated parser */
var jsonlint = (function(){
var dougJSONParse = require('./doug-json-parse');
var dougJSONParse = typeof ___dougJSONParse === 'undefined' ? require('./doug-json-parse') : ___dougJSONParse;
var parser = {trace: function trace() { },
yy: {},
symbols_: {"error":2,"JSONString":3,"STRING":4,"JSONNumber":5,"NUMBER":6,"JSONNullLiteral":7,"NULL":8,"JSONBooleanLiteral":9,"TRUE":10,"FALSE":11,"JSONText":12,"JSONValue":13,"EOF":14,"JSONObject":15,"JSONArray":16,"{":17,"}":18,"JSONMemberList":19,"JSONMember":20,":":21,",":22,"[":23,"]":24,"JSONElementList":25,"$accept":0,"$end":1},
@@ -256,7 +256,6 @@ parseError:function parseError(str, hash) {
if (this.yy.parseError) {
this.yy.parseError(str, hash);
} else {
console.log(hash)
throw new Error(str);
}
},