scratch – Diff between revs 75 and 125
?pathlinks?
Rev 75 | Rev 125 | |||
---|---|---|---|---|
1 | // Generated by CoffeeScript 1.10.0 |
1 | // Generated by CoffeeScript 1.12.4 |
|
2 | var ParseException, |
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; }, |
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; |
4 | hasProp = {}.hasOwnProperty; |
|
5 | |
5 | |
|
6 | ParseException = (function(superClass) { |
6 | ParseException = (function(superClass) { |
|
7 | extend(ParseException, superClass); |
7 | extend(ParseException, superClass); |
|
8 | |
8 | |
|
9 | function ParseException(message, parsedLine, snippet) { |
9 | function ParseException(message, parsedLine, snippet) { |
|
10 | this.message = message; |
10 | this.message = message; |
|
11 | this.parsedLine = parsedLine; |
11 | this.parsedLine = parsedLine; |
|
12 | this.snippet = snippet; |
12 | this.snippet = snippet; |
|
13 | } |
13 | } |
|
14 | |
14 | |
|
15 | ParseException.prototype.toString = function() { |
15 | ParseException.prototype.toString = function() { |
|
16 | if ((this.parsedLine != null) && (this.snippet != null)) { |
16 | if ((this.parsedLine != null) && (this.snippet != null)) { |
|
17 | return '<ParseException> ' + this.message + ' (line ' + this.parsedLine + ': \'' + this.snippet + '\')'; |
17 | return '<ParseException> ' + this.message + ' (line ' + this.parsedLine + ': \'' + this.snippet + '\')'; |
|
18 | } else { |
18 | } else { |
|
19 | return '<ParseException> ' + this.message; |
19 | return '<ParseException> ' + this.message; |
|
20 | } |
20 | } |
|
21 | }; |
21 | }; |
|
22 | |
22 | |
|
23 | return ParseException; |
23 | return ParseException; |
|
24 | |
24 | |
|
25 | })(Error); |
25 | })(Error); |
|
26 | |
26 | |
|
27 | module.exports = ParseException; |
27 | module.exports = ParseException; |
|
28 | |
28 | |