coffee-script-source 1.9.2 → 1.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/coffee_script/coffee-script.js +25 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a79377583f1c486ceb0bba62b2477f38019ae50
|
4
|
+
data.tar.gz: 195dac2b3a86a04921d5d5767ee1c724b0fdacf8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f74370650cceadf65192c41765c981059428e9421aa95fa09191e1dad82a39458fe81a9bd1b34064fea14b4b02a52b92af32dc5a17af1dfa138c627986b8156f
|
7
|
+
data.tar.gz: 4addc62e8416505833fd1274405a2f2b0e551fb309e98f723db9d61530858b83d8ddd4a7d7a388555f5e3664d61474b87543187e99aeb042bf5723521aeb1441
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* CoffeeScript Compiler v1.9.
|
2
|
+
* CoffeeScript Compiler v1.9.3
|
3
3
|
* http://coffeescript.org
|
4
4
|
*
|
5
5
|
* Copyright 2011, Jeremy Ashkenas
|
@@ -10,7 +10,7 @@
|
|
10
10
|
function require(path){ return require[path]; }
|
11
11
|
require['./helpers'] = (function() {
|
12
12
|
var exports = {}, module = {exports: exports};
|
13
|
-
// Generated by CoffeeScript 1.9.
|
13
|
+
// Generated by CoffeeScript 1.9.3
|
14
14
|
(function() {
|
15
15
|
var buildLocationData, extend, flatten, ref, repeat, syntaxErrorToString;
|
16
16
|
|
@@ -262,7 +262,7 @@
|
|
262
262
|
return module.exports;
|
263
263
|
})();require['./rewriter'] = (function() {
|
264
264
|
var exports = {}, module = {exports: exports};
|
265
|
-
// Generated by CoffeeScript 1.9.
|
265
|
+
// Generated by CoffeeScript 1.9.3
|
266
266
|
(function() {
|
267
267
|
var BALANCED_PAIRS, CALL_CLOSERS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, generate, k, left, len, ref, rite,
|
268
268
|
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
|
@@ -548,7 +548,7 @@
|
|
548
548
|
startImplicitCall(i + 1);
|
549
549
|
return forward(2);
|
550
550
|
}
|
551
|
-
if (indexOf.call(IMPLICIT_FUNC, tag) >= 0 && this.indexOfTag(i + 1, 'INDENT'
|
551
|
+
if (indexOf.call(IMPLICIT_FUNC, tag) >= 0 && this.indexOfTag(i + 1, 'INDENT') > -1 && this.looksObjectish(i + 2) && !this.findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH', 'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])) {
|
552
552
|
startImplicitCall(i + 1);
|
553
553
|
stack.push(['INDENT', i + 2]);
|
554
554
|
return forward(3);
|
@@ -770,7 +770,7 @@
|
|
770
770
|
return module.exports;
|
771
771
|
})();require['./lexer'] = (function() {
|
772
772
|
var exports = {}, module = {exports: exports};
|
773
|
-
// Generated by CoffeeScript 1.9.
|
773
|
+
// Generated by CoffeeScript 1.9.3
|
774
774
|
(function() {
|
775
775
|
var BOM, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HERECOMMENT_ILLEGAL, HEREDOC_DOUBLE, HEREDOC_INDENT, HEREDOC_SINGLE, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDENTABLE_CLOSERS, INDEXABLE, INVALID_ESCAPE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LEADING_BLANK_LINE, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTI_DENT, NOT_REGEX, NUMBER, OPERATOR, POSSIBLY_DIVISION, REGEX, REGEX_FLAGS, REGEX_ILLEGAL, RELATION, RESERVED, Rewriter, SHIFT, SIMPLE_STRING_OMIT, STRICT_PROSCRIBED, STRING_DOUBLE, STRING_OMIT, STRING_SINGLE, STRING_START, TRAILING_BLANK_LINE, TRAILING_SPACES, UNARY, UNARY_MATH, VALID_FLAGS, WHITESPACE, compact, count, invertLiterate, key, locationDataToString, ref, ref1, repeat, starts, throwSyntaxError,
|
776
776
|
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
@@ -836,7 +836,7 @@
|
|
836
836
|
};
|
837
837
|
|
838
838
|
Lexer.prototype.identifierToken = function() {
|
839
|
-
var colon, colonOffset, forcedIdentifier, id, idLength, input, match, poppedToken, prev, ref2, ref3, ref4, ref5, tag, tagToken;
|
839
|
+
var alias, colon, colonOffset, forcedIdentifier, id, idLength, input, match, poppedToken, prev, ref2, ref3, ref4, ref5, tag, tagToken;
|
840
840
|
if (!(match = IDENTIFIER.exec(this.chunk))) {
|
841
841
|
return 0;
|
842
842
|
}
|
@@ -890,6 +890,7 @@
|
|
890
890
|
}
|
891
891
|
if (!forcedIdentifier) {
|
892
892
|
if (indexOf.call(COFFEE_ALIASES, id) >= 0) {
|
893
|
+
alias = id;
|
893
894
|
id = COFFEE_ALIAS_MAP[id];
|
894
895
|
}
|
895
896
|
tag = (function() {
|
@@ -914,6 +915,9 @@
|
|
914
915
|
})();
|
915
916
|
}
|
916
917
|
tagToken = this.token(tag, id, 0, idLength);
|
918
|
+
if (alias) {
|
919
|
+
tagToken.origin = [tag, alias, tagToken[2]];
|
920
|
+
}
|
917
921
|
tagToken.variable = !forcedIdentifier;
|
918
922
|
if (poppedToken) {
|
919
923
|
ref5 = [poppedToken[2].first_line, poppedToken[2].first_column], tagToken[2].first_line = ref5[0], tagToken[2].first_column = ref5[1];
|
@@ -1272,6 +1276,9 @@
|
|
1272
1276
|
ref2 = this.tokens, prev = ref2[ref2.length - 1];
|
1273
1277
|
if (value === '=' && prev) {
|
1274
1278
|
if (!prev[1].reserved && (ref3 = prev[1], indexOf.call(JS_FORBIDDEN, ref3) >= 0)) {
|
1279
|
+
if (prev.origin) {
|
1280
|
+
prev = prev.origin;
|
1281
|
+
}
|
1275
1282
|
this.error("reserved word '" + prev[1] + "' can't be assigned", prev[2]);
|
1276
1283
|
}
|
1277
1284
|
if ((ref4 = prev[1]) === '||' || ref4 === '&&') {
|
@@ -2501,7 +2508,7 @@ if (typeof module !== 'undefined' && require.main === module) {
|
|
2501
2508
|
return module.exports;
|
2502
2509
|
})();require['./scope'] = (function() {
|
2503
2510
|
var exports = {}, module = {exports: exports};
|
2504
|
-
// Generated by CoffeeScript 1.9.
|
2511
|
+
// Generated by CoffeeScript 1.9.3
|
2505
2512
|
(function() {
|
2506
2513
|
var Scope,
|
2507
2514
|
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
@@ -2660,7 +2667,7 @@ if (typeof module !== 'undefined' && require.main === module) {
|
|
2660
2667
|
return module.exports;
|
2661
2668
|
})();require['./nodes'] = (function() {
|
2662
2669
|
var exports = {}, module = {exports: exports};
|
2663
|
-
// Generated by CoffeeScript 1.9.
|
2670
|
+
// Generated by CoffeeScript 1.9.3
|
2664
2671
|
(function() {
|
2665
2672
|
var Access, Arr, Assign, Base, Block, Call, Class, Code, CodeFragment, Comment, Existence, Expansion, Extends, For, HEXNUM, IDENTIFIER, IS_REGEX, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, NEGATE, NO, NUMBER, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, STRICT_PROSCRIBED, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, addLocationDataFn, compact, del, ends, extend, flatten, fragmentsToText, isComplexOrAssignable, isLiteralArguments, isLiteralThis, locationDataToString, merge, multident, parseNum, ref1, ref2, some, starts, throwSyntaxError, unfoldSoak, utility,
|
2666
2673
|
extend1 = 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; },
|
@@ -3530,7 +3537,7 @@ if (typeof module !== 'undefined' && require.main === module) {
|
|
3530
3537
|
|
3531
3538
|
Comment.prototype.compileNode = function(o, level) {
|
3532
3539
|
var code, comment;
|
3533
|
-
comment = this.comment.replace(/^(\s*)#
|
3540
|
+
comment = this.comment.replace(/^(\s*)#(?=\s)/gm, "$1 *");
|
3534
3541
|
code = "/*" + (multident(comment, this.tab)) + (indexOf.call(comment, '\n') >= 0 ? "\n" + this.tab : '') + " */";
|
3535
3542
|
if ((level || o.level) === LEVEL_TOP) {
|
3536
3543
|
code = o.indent + code;
|
@@ -3973,7 +3980,7 @@ if (typeof module !== 'undefined' && require.main === module) {
|
|
3973
3980
|
indent += TAB;
|
3974
3981
|
}
|
3975
3982
|
if (prop instanceof Assign && prop.variable instanceof Value && prop.variable.hasProperties()) {
|
3976
|
-
prop.variable.error('
|
3983
|
+
prop.variable.error('invalid object key');
|
3977
3984
|
}
|
3978
3985
|
if (prop instanceof Value && prop["this"]) {
|
3979
3986
|
prop = new Assign(prop.properties[0].name, prop, 'object');
|
@@ -5937,7 +5944,7 @@ if (typeof module !== 'undefined' && require.main === module) {
|
|
5937
5944
|
return module.exports;
|
5938
5945
|
})();require['./sourcemap'] = (function() {
|
5939
5946
|
var exports = {}, module = {exports: exports};
|
5940
|
-
// Generated by CoffeeScript 1.9.
|
5947
|
+
// Generated by CoffeeScript 1.9.3
|
5941
5948
|
(function() {
|
5942
5949
|
var LineMap, SourceMap;
|
5943
5950
|
|
@@ -6102,7 +6109,7 @@ if (typeof module !== 'undefined' && require.main === module) {
|
|
6102
6109
|
return module.exports;
|
6103
6110
|
})();require['./coffee-script'] = (function() {
|
6104
6111
|
var exports = {}, module = {exports: exports};
|
6105
|
-
// Generated by CoffeeScript 1.9.
|
6112
|
+
// Generated by CoffeeScript 1.9.3
|
6106
6113
|
(function() {
|
6107
6114
|
var Lexer, SourceMap, base, compile, ext, formatSourcePosition, fs, getSourceMap, helpers, i, len, lexer, parser, path, ref, sourceMaps, vm, withPrettyErrors,
|
6108
6115
|
hasProp = {}.hasOwnProperty,
|
@@ -6122,7 +6129,7 @@ if (typeof module !== 'undefined' && require.main === module) {
|
|
6122
6129
|
|
6123
6130
|
SourceMap = require('./sourcemap');
|
6124
6131
|
|
6125
|
-
exports.VERSION = '1.9.
|
6132
|
+
exports.VERSION = '1.9.3';
|
6126
6133
|
|
6127
6134
|
exports.FILE_EXTENSIONS = ['.coffee', '.litcoffee', '.coffee.md'];
|
6128
6135
|
|
@@ -6138,6 +6145,9 @@ if (typeof module !== 'undefined' && require.main === module) {
|
|
6138
6145
|
return fn.call(this, code, options);
|
6139
6146
|
} catch (_error) {
|
6140
6147
|
err = _error;
|
6148
|
+
if (typeof code !== 'string') {
|
6149
|
+
throw err;
|
6150
|
+
}
|
6141
6151
|
throw helpers.updateSyntaxError(err, code, options.filename);
|
6142
6152
|
}
|
6143
6153
|
};
|
@@ -6175,7 +6185,7 @@ if (typeof module !== 'undefined' && require.main === module) {
|
|
6175
6185
|
for (i = 0, len = fragments.length; i < len; i++) {
|
6176
6186
|
fragment = fragments[i];
|
6177
6187
|
if (options.sourceMap) {
|
6178
|
-
if (fragment.locationData) {
|
6188
|
+
if (fragment.locationData && !/^[;\s]*$/.test(fragment.code)) {
|
6179
6189
|
map.add([fragment.locationData.first_line, fragment.locationData.first_column], [currentLine, currentColumn], {
|
6180
6190
|
noReplace: true
|
6181
6191
|
});
|
@@ -6479,7 +6489,7 @@ if (typeof module !== 'undefined' && require.main === module) {
|
|
6479
6489
|
return module.exports;
|
6480
6490
|
})();require['./browser'] = (function() {
|
6481
6491
|
var exports = {}, module = {exports: exports};
|
6482
|
-
// Generated by CoffeeScript 1.9.
|
6492
|
+
// Generated by CoffeeScript 1.9.3
|
6483
6493
|
(function() {
|
6484
6494
|
var CoffeeScript, compile, runScripts,
|
6485
6495
|
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coffee-script-source
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Ashkenas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |2
|
14
14
|
CoffeeScript is a little language that compiles into JavaScript.
|