coffee-script-source 1.11.0 → 1.11.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1da8d62444ecf11c1b6b44aa74ee74751cf7039
4
- data.tar.gz: f5d5387f251ce9ef15d6cbd1473b4a147f85064f
3
+ metadata.gz: a3fb13071c2b094c0da53578cf1cb2f1651ac2df
4
+ data.tar.gz: de5d1aa7a661a43a480544d8549a3d7a900dd856
5
5
  SHA512:
6
- metadata.gz: b592ec6581ec74d420d8b3fcccd522701d449a0a68ef9c7020ea37afb595f4bc73f96734e32f0dd02a7aa2a61bda68ef132a5456b244dfd9653ecab74ee1c34f
7
- data.tar.gz: f260e270234499e200656007eb640a3f74e22b14809eea9adffe575b11ef500c9b143af1ce5fc6ad56d90dda67cbb89c2a7234610eab2c319472df3ff55fbcec
6
+ metadata.gz: 96d1395eb58253548e5412e430a04a7276f7527f0a7fec65510d9e25e96ab8fb1055897ad0371ca3cac23f0c3d991fe2f027a4df22493c0bd49243d631729bb6
7
+ data.tar.gz: 14843db4986a31272d722f06968e3dc3f67d32090e109f4d101b5943de6e15cb8b2b47a0a07899bb7fb7f903f70eff34b854a7b3d56bab449ff3012e8149d53e
@@ -1,5 +1,5 @@
1
1
  /**
2
- * CoffeeScript Compiler v1.11.0
2
+ * CoffeeScript Compiler v1.11.1
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.11.0
13
+ // Generated by CoffeeScript 1.11.1
14
14
  (function() {
15
15
  var buildLocationData, extend, flatten, ref, repeat, syntaxErrorToString;
16
16
 
@@ -263,7 +263,7 @@
263
263
  return module.exports;
264
264
  })();require['./rewriter'] = (function() {
265
265
  var exports = {}, module = {exports: exports};
266
- // Generated by CoffeeScript 1.11.0
266
+ // Generated by CoffeeScript 1.11.1
267
267
  (function() {
268
268
  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,
269
269
  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; },
@@ -771,7 +771,7 @@
771
771
  return module.exports;
772
772
  })();require['./lexer'] = (function() {
773
773
  var exports = {}, module = {exports: exports};
774
- // Generated by CoffeeScript 1.11.0
774
+ // Generated by CoffeeScript 1.11.1
775
775
  (function() {
776
776
  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_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, isUnassignable, key, locationDataToString, ref, ref1, repeat, starts, throwSyntaxError,
777
777
  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; },
@@ -947,37 +947,48 @@
947
947
  };
948
948
 
949
949
  Lexer.prototype.numberToken = function() {
950
- var binaryLiteral, lexedLength, match, number, numberValue, octalLiteral, tag;
950
+ var base, lexedLength, match, number, numberValue, ref2, tag;
951
951
  if (!(match = NUMBER.exec(this.chunk))) {
952
952
  return 0;
953
953
  }
954
954
  number = match[0];
955
955
  lexedLength = number.length;
956
- if (/^0[BOX]/.test(number)) {
957
- this.error("radix prefix in '" + number + "' must be lowercase", {
958
- offset: 1
959
- });
960
- } else if (/E/.test(number) && !/^0x/.test(number)) {
961
- this.error("exponential notation in '" + number + "' must be indicated with a lowercase 'e'", {
962
- offset: number.indexOf('E')
963
- });
964
- } else if (/^0\d*[89]/.test(number)) {
965
- this.error("decimal literal '" + number + "' must not be prefixed with '0'", {
966
- length: lexedLength
967
- });
968
- } else if (/^0\d+/.test(number)) {
969
- this.error("octal literal '" + number + "' must be prefixed with '0o'", {
970
- length: lexedLength
971
- });
956
+ switch (false) {
957
+ case !/^0[BOX]/.test(number):
958
+ this.error("radix prefix in '" + number + "' must be lowercase", {
959
+ offset: 1
960
+ });
961
+ break;
962
+ case !/^(?!0x).*E/.test(number):
963
+ this.error("exponential notation in '" + number + "' must be indicated with a lowercase 'e'", {
964
+ offset: number.indexOf('E')
965
+ });
966
+ break;
967
+ case !/^0\d*[89]/.test(number):
968
+ this.error("decimal literal '" + number + "' must not be prefixed with '0'", {
969
+ length: lexedLength
970
+ });
971
+ break;
972
+ case !/^0\d+/.test(number):
973
+ this.error("octal literal '" + number + "' must be prefixed with '0o'", {
974
+ length: lexedLength
975
+ });
972
976
  }
973
- if (octalLiteral = /^0o([0-7]+)/.exec(number)) {
974
- numberValue = parseInt(octalLiteral[1], 8);
975
- number = "0x" + (numberValue.toString(16));
976
- } else if (binaryLiteral = /^0b([01]+)/.exec(number)) {
977
- numberValue = parseInt(binaryLiteral[1], 2);
977
+ base = (function() {
978
+ switch (number.charAt(1)) {
979
+ case 'b':
980
+ return 2;
981
+ case 'o':
982
+ return 8;
983
+ case 'x':
984
+ return 16;
985
+ default:
986
+ return null;
987
+ }
988
+ })();
989
+ numberValue = base != null ? parseInt(number.slice(2), base) : parseFloat(number);
990
+ if ((ref2 = number.charAt(1)) === 'b' || ref2 === 'o') {
978
991
  number = "0x" + (numberValue.toString(16));
979
- } else {
980
- numberValue = parseFloat(number);
981
992
  }
982
993
  tag = numberValue === 2e308 ? 'INFINITY' : 'NUMBER';
983
994
  this.token(tag, number, 0, lexedLength);
@@ -1029,22 +1040,22 @@
1029
1040
  }
1030
1041
  }
1031
1042
  if (indent) {
1032
- indentRegex = RegExp("^" + indent, "gm");
1043
+ indentRegex = RegExp("\\n" + indent, "g");
1033
1044
  }
1034
1045
  this.mergeInterpolationTokens(tokens, {
1035
1046
  delimiter: delimiter
1036
1047
  }, (function(_this) {
1037
1048
  return function(value, i) {
1038
1049
  value = _this.formatString(value);
1050
+ if (indentRegex) {
1051
+ value = value.replace(indentRegex, '\n');
1052
+ }
1039
1053
  if (i === 0) {
1040
1054
  value = value.replace(LEADING_BLANK_LINE, '');
1041
1055
  }
1042
1056
  if (i === $) {
1043
1057
  value = value.replace(TRAILING_BLANK_LINE, '');
1044
1058
  }
1045
- if (indentRegex) {
1046
- value = value.replace(indentRegex, '');
1047
- }
1048
1059
  return value;
1049
1060
  };
1050
1061
  })(this));
@@ -2688,7 +2699,7 @@ if (typeof module !== 'undefined' && require.main === module) {
2688
2699
  return module.exports;
2689
2700
  })();require['./scope'] = (function() {
2690
2701
  var exports = {}, module = {exports: exports};
2691
- // Generated by CoffeeScript 1.11.0
2702
+ // Generated by CoffeeScript 1.11.1
2692
2703
  (function() {
2693
2704
  var Scope,
2694
2705
  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; };
@@ -2854,7 +2865,7 @@ if (typeof module !== 'undefined' && require.main === module) {
2854
2865
  return module.exports;
2855
2866
  })();require['./nodes'] = (function() {
2856
2867
  var exports = {}, module = {exports: exports};
2857
- // Generated by CoffeeScript 1.11.0
2868
+ // Generated by CoffeeScript 1.11.1
2858
2869
  (function() {
2859
2870
  var Access, Arr, Assign, Base, Block, BooleanLiteral, Call, Class, Code, CodeFragment, Comment, Existence, Expansion, ExportAllDeclaration, ExportDeclaration, ExportDefaultDeclaration, ExportNamedDeclaration, ExportSpecifier, ExportSpecifierList, Extends, For, IdentifierLiteral, If, ImportClause, ImportDeclaration, ImportDefaultSpecifier, ImportNamespaceSpecifier, ImportSpecifier, ImportSpecifierList, In, Index, InfinityLiteral, JS_FORBIDDEN, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, ModuleDeclaration, ModuleSpecifier, ModuleSpecifierList, NEGATE, NO, NaNLiteral, NullLiteral, NumberLiteral, Obj, Op, Param, Parens, PassthroughLiteral, PropertyName, Range, RegexLiteral, RegexWithInterpolations, Return, SIMPLENUM, Scope, Slice, Splat, StatementLiteral, StringLiteral, StringWithInterpolations, SuperCall, Switch, TAB, THIS, ThisLiteral, Throw, Try, UTILITIES, UndefinedLiteral, Value, While, YES, YieldReturn, addLocationDataFn, compact, del, ends, extend, flatten, fragmentsToText, isComplexOrAssignable, isLiteralArguments, isLiteralThis, isUnassignable, locationDataToString, merge, multident, ref1, ref2, some, starts, throwSyntaxError, unfoldSoak, utility,
2860
2871
  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; },
@@ -4097,7 +4108,6 @@ if (typeof module !== 'undefined' && require.main === module) {
4097
4108
 
4098
4109
  function Access(name1, tag) {
4099
4110
  this.name = name1;
4100
- this.name.asKey = true;
4101
4111
  this.soak = tag === 'soak';
4102
4112
  }
4103
4113
 
@@ -4339,13 +4349,15 @@ if (typeof module !== 'undefined' && require.main === module) {
4339
4349
  if (!(prop instanceof Assign)) {
4340
4350
  prop = new Assign(prop, prop, 'object');
4341
4351
  }
4342
- (prop.variable.base || prop.variable).asKey = true;
4343
4352
  } else {
4344
4353
  if (prop instanceof Assign) {
4345
4354
  key = prop.variable;
4346
4355
  value = prop.value;
4347
4356
  } else {
4348
4357
  ref3 = prop.base.cache(o), key = ref3[0], value = ref3[1];
4358
+ if (key instanceof IdentifierLiteral) {
4359
+ key = new PropertyName(key.value);
4360
+ }
4349
4361
  }
4350
4362
  prop = new Assign(new Value(new IdentifierLiteral(oref), [new Access(key)]), value);
4351
4363
  }
@@ -6635,11 +6647,11 @@ if (typeof module !== 'undefined' && require.main === module) {
6635
6647
  };
6636
6648
 
6637
6649
  isLiteralArguments = function(node) {
6638
- return node instanceof Literal && node.value === 'arguments' && !node.asKey;
6650
+ return node instanceof IdentifierLiteral && node.value === 'arguments';
6639
6651
  };
6640
6652
 
6641
6653
  isLiteralThis = function(node) {
6642
- return (node instanceof ThisLiteral && !node.asKey) || (node instanceof Code && node.bound) || node instanceof SuperCall;
6654
+ return node instanceof ThisLiteral || (node instanceof Code && node.bound) || node instanceof SuperCall;
6643
6655
  };
6644
6656
 
6645
6657
  isComplexOrAssignable = function(node) {
@@ -6661,7 +6673,7 @@ if (typeof module !== 'undefined' && require.main === module) {
6661
6673
  return module.exports;
6662
6674
  })();require['./sourcemap'] = (function() {
6663
6675
  var exports = {}, module = {exports: exports};
6664
- // Generated by CoffeeScript 1.11.0
6676
+ // Generated by CoffeeScript 1.11.1
6665
6677
  (function() {
6666
6678
  var LineMap, SourceMap;
6667
6679
 
@@ -6826,7 +6838,7 @@ if (typeof module !== 'undefined' && require.main === module) {
6826
6838
  return module.exports;
6827
6839
  })();require['./coffee-script'] = (function() {
6828
6840
  var exports = {}, module = {exports: exports};
6829
- // Generated by CoffeeScript 1.11.0
6841
+ // Generated by CoffeeScript 1.11.1
6830
6842
  (function() {
6831
6843
  var Lexer, SourceMap, base64encode, compile, ext, fn1, formatSourcePosition, fs, getSourceMap, helpers, i, len, lexer, parser, path, ref, sourceMaps, vm, withPrettyErrors,
6832
6844
  hasProp = {}.hasOwnProperty;
@@ -6845,7 +6857,7 @@ if (typeof module !== 'undefined' && require.main === module) {
6845
6857
 
6846
6858
  SourceMap = require('./sourcemap');
6847
6859
 
6848
- exports.VERSION = '1.11.0';
6860
+ exports.VERSION = '1.11.1';
6849
6861
 
6850
6862
  exports.FILE_EXTENSIONS = ['.coffee', '.litcoffee', '.coffee.md'];
6851
6863
 
@@ -7245,7 +7257,7 @@ if (typeof module !== 'undefined' && require.main === module) {
7245
7257
  return module.exports;
7246
7258
  })();require['./browser'] = (function() {
7247
7259
  var exports = {}, module = {exports: exports};
7248
- // Generated by CoffeeScript 1.11.0
7260
+ // Generated by CoffeeScript 1.11.1
7249
7261
  (function() {
7250
7262
  var CoffeeScript, compile, runScripts,
7251
7263
  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.11.0
4
+ version: 1.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Ashkenas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-24 00:00:00.000000000 Z
11
+ date: 2016-10-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  CoffeeScript is a little language that compiles into JavaScript.