scratch – Blame information for rev 125

Subversion Repositories:
Rev:
Rev Author Line No. Line
125 office 1 // Generated by CoffeeScript 1.12.4
75 office 2 var ParseException,
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  
6 ParseException = (function(superClass) {
7 extend(ParseException, superClass);
8  
9 function ParseException(message, parsedLine, snippet) {
10 this.message = message;
11 this.parsedLine = parsedLine;
12 this.snippet = snippet;
13 }
14  
15 ParseException.prototype.toString = function() {
16 if ((this.parsedLine != null) && (this.snippet != null)) {
17 return '<ParseException> ' + this.message + ' (line ' + this.parsedLine + ': \'' + this.snippet + '\')';
18 } else {
19 return '<ParseException> ' + this.message;
20 }
21 };
22  
23 return ParseException;
24  
25 })(Error);
26  
27 module.exports = ParseException;