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();',
' }',
'',
' function SyntaxError(message, expected, found, offset, line, column) {',
' function peg$SyntaxError(message, expected, found, offset, line, column) {',
' this.message = message;',
' this.expected = expected;',
' this.found = found;',
@ -688,9 +688,9 @@ module.exports = function(ast, options) {
' 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] : {},',
'',
' peg$FAILED = {},',
@ -927,7 +927,7 @@ module.exports = function(ast, options) {
' cleanupExpected(expected);',
' }',
'',
' return new SyntaxError(',
' return new peg$SyntaxError(',
' message !== null ? message : buildMessage(expected, found),',
' expected,',
' found,',
@ -974,8 +974,8 @@ module.exports = function(ast, options) {
' }',
'',
' return {',
' SyntaxError: SyntaxError,',
' parse: parse',
' SyntaxError: peg$SyntaxError,',
' parse: peg$parse',
' };',
'})()'
].join('\n'));

@ -11,7 +11,7 @@ module.exports = (function() {
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.expected = expected;
this.found = found;
@ -22,9 +22,9 @@ module.exports = (function() {
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] : {},
peg$FAILED = {},
@ -493,7 +493,7 @@ module.exports = (function() {
cleanupExpected(expected);
}
return new SyntaxError(
return new peg$SyntaxError(
message !== null ? message : buildMessage(expected, found),
expected,
found,
@ -4898,7 +4898,7 @@ module.exports = (function() {
}
return {
SyntaxError: SyntaxError,
parse: parse
SyntaxError: peg$SyntaxError,
parse: peg$parse
};
})();

Loading…
Cancel
Save