ParseMore.js 932 B

123456789101112131415161718192021222324252627
  1. // Generated by CoffeeScript 1.12.4
  2. var ParseMore,
  3. extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
  4. hasProp = {}.hasOwnProperty;
  5. ParseMore = (function(superClass) {
  6. extend(ParseMore, superClass);
  7. function ParseMore(message, parsedLine, snippet) {
  8. this.message = message;
  9. this.parsedLine = parsedLine;
  10. this.snippet = snippet;
  11. }
  12. ParseMore.prototype.toString = function() {
  13. if ((this.parsedLine != null) && (this.snippet != null)) {
  14. return '<ParseMore> ' + this.message + ' (line ' + this.parsedLine + ': \'' + this.snippet + '\')';
  15. } else {
  16. return '<ParseMore> ' + this.message;
  17. }
  18. };
  19. return ParseMore;
  20. })(Error);
  21. module.exports = ParseMore;