|
|
|
@ -1047,7 +1047,7 @@ function generateJS( ast, session, options ) {
|
|
|
|
|
"",
|
|
|
|
|
"peg$subclass(peg$SyntaxError, Error);",
|
|
|
|
|
"",
|
|
|
|
|
"peg$SyntaxError.buildMessage = function(expected, found) {",
|
|
|
|
|
"peg$SyntaxError.buildMessage = function(expected, found, location) {",
|
|
|
|
|
" var DESCRIBE_EXPECTATION_FNS = {",
|
|
|
|
|
" literal: function(expectation) {",
|
|
|
|
|
" return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";",
|
|
|
|
@ -1547,7 +1547,7 @@ function generateJS( ast, session, options ) {
|
|
|
|
|
"",
|
|
|
|
|
" function peg$buildStructuredError(expected, found, location) {",
|
|
|
|
|
" return new peg$SyntaxError(",
|
|
|
|
|
" peg$SyntaxError.buildMessage(expected, found),",
|
|
|
|
|
" peg$SyntaxError.buildMessage(expected, found, location),",
|
|
|
|
|
" expected,",
|
|
|
|
|
" found,",
|
|
|
|
|
" location",
|
|
|
|
|