@ -746,9 +746,9 @@ function generateJS(ast, options) {
parts . push ( [
"function peg$subclass(child, parent) {" ,
" function ctor () { this.constructor = child; }",
" ctor .prototype = parent.prototype;",
" child.prototype = new ctor ();",
" function C () { this.constructor = child; }",
" C .prototype = parent.prototype;",
" child.prototype = new C ();",
"}" ,
"" ,
"function peg$SyntaxError(message, expected, found, location) {" ,
@ -781,11 +781,11 @@ function generateJS(ast, options) {
" return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";" ,
" }," ,
"" ,
" any: function( expectation ) {",
" any: function( ) {",
" return \"any character\";" ,
" }," ,
"" ,
" end: function( expectation ) {",
" end: function( ) {",
" return \"end of input\";" ,
" }," ,
"" ,
@ -1039,7 +1039,9 @@ function generateJS(ast, options) {
" }" ,
"" ,
" function expected(description, location) {" ,
" location = location !== undefined ? location : peg$computeLocation(peg$savedPos, peg$currPos);" ,
" location = location !== undefined" ,
" ? location" ,
" : peg$computeLocation(peg$savedPos, peg$currPos);" ,
"" ,
" throw peg$buildStructuredError(" ,
" [peg$otherExpectation(description)]," ,
@ -1049,7 +1051,9 @@ function generateJS(ast, options) {
" }" ,
"" ,
" function error(message, location) {" ,
" location = location !== undefined ? location : peg$computeLocation(peg$savedPos, peg$currPos);" ,
" location = location !== undefined" ,
" ? location" ,
" : peg$computeLocation(peg$savedPos, peg$currPos);" ,
"" ,
" throw peg$buildSimpleError(message, location);" ,
" }" ,
@ -1104,6 +1108,7 @@ function generateJS(ast, options) {
" }" ,
"" ,
" peg$posDetailsCache[pos] = details;" ,
"" ,
" return details;" ,
" }" ,
" }" ,