Mark |parse| and |SyntaxError| as internal identifiers

The |parse| function and the |SyntaxError| exception were meant as
internal, so let's mark them as such.
redux
David Majda 10 years ago
parent 7e3b4ec4f8
commit c7521fb868

@ -677,7 +677,7 @@ module.exports = function(ast, options) {
' child.prototype = new ctor();', ' child.prototype = new ctor();',
' }', ' }',
'', '',
' function SyntaxError(message, expected, found, offset, line, column) {', ' function peg$SyntaxError(message, expected, found, offset, line, column) {',
' this.message = message;', ' this.message = message;',
' this.expected = expected;', ' this.expected = expected;',
' this.found = found;', ' this.found = found;',
@ -688,9 +688,9 @@ module.exports = function(ast, options) {
' this.name = "SyntaxError";', ' this.name = "SyntaxError";',
' }', ' }',
'', '',
' peg$subclass(SyntaxError, Error);', ' peg$subclass(peg$SyntaxError, Error);',
'', '',
' function parse(input) {', ' function peg$parse(input) {',
' var options = arguments.length > 1 ? arguments[1] : {},', ' var options = arguments.length > 1 ? arguments[1] : {},',
'', '',
' peg$FAILED = {},', ' peg$FAILED = {},',
@ -927,7 +927,7 @@ module.exports = function(ast, options) {
' cleanupExpected(expected);', ' cleanupExpected(expected);',
' }', ' }',
'', '',
' return new SyntaxError(', ' return new peg$SyntaxError(',
' message !== null ? message : buildMessage(expected, found),', ' message !== null ? message : buildMessage(expected, found),',
' expected,', ' expected,',
' found,', ' found,',
@ -974,8 +974,8 @@ module.exports = function(ast, options) {
' }', ' }',
'', '',
' return {', ' return {',
' SyntaxError: SyntaxError,', ' SyntaxError: peg$SyntaxError,',
' parse: parse', ' parse: peg$parse',
' };', ' };',
'})()' '})()'
].join('\n')); ].join('\n'));

@ -11,7 +11,7 @@ module.exports = (function() {
child.prototype = new ctor(); child.prototype = new ctor();
} }
function SyntaxError(message, expected, found, offset, line, column) { function peg$SyntaxError(message, expected, found, offset, line, column) {
this.message = message; this.message = message;
this.expected = expected; this.expected = expected;
this.found = found; this.found = found;
@ -22,9 +22,9 @@ module.exports = (function() {
this.name = "SyntaxError"; this.name = "SyntaxError";
} }
peg$subclass(SyntaxError, Error); peg$subclass(peg$SyntaxError, Error);
function parse(input) { function peg$parse(input) {
var options = arguments.length > 1 ? arguments[1] : {}, var options = arguments.length > 1 ? arguments[1] : {},
peg$FAILED = {}, peg$FAILED = {},
@ -493,7 +493,7 @@ module.exports = (function() {
cleanupExpected(expected); cleanupExpected(expected);
} }
return new SyntaxError( return new peg$SyntaxError(
message !== null ? message : buildMessage(expected, found), message !== null ? message : buildMessage(expected, found),
expected, expected,
found, found,
@ -4898,7 +4898,7 @@ module.exports = (function() {
} }
return { return {
SyntaxError: SyntaxError, SyntaxError: peg$SyntaxError,
parse: parse parse: peg$parse
}; };
})(); })();

Loading…
Cancel
Save