Front end of the Slack clone application.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  6. /*
  7. Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
  8. Redistribution and use in source and binary forms, with or without
  9. modification, are permitted provided that the following conditions are met:
  10. * Redistributions of source code must retain the above copyright
  11. notice, this list of conditions and the following disclaimer.
  12. * Redistributions in binary form must reproduce the above copyright
  13. notice, this list of conditions and the following disclaimer in the
  14. documentation and/or other materials provided with the distribution.
  15. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  16. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  17. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  18. ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
  19. DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  20. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  21. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  22. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  23. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  24. THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  25. */
  26. /**
  27. * A Variable represents a locally scoped identifier. These include arguments to
  28. * functions.
  29. * @class Variable
  30. */
  31. var Variable = function Variable(name, scope) {
  32. _classCallCheck(this, Variable);
  33. /**
  34. * The variable name, as given in the source code.
  35. * @member {String} Variable#name
  36. */
  37. this.name = name;
  38. /**
  39. * List of defining occurrences of this variable (like in 'var ...'
  40. * statements or as parameter), as AST nodes.
  41. * @member {esprima.Identifier[]} Variable#identifiers
  42. */
  43. this.identifiers = [];
  44. /**
  45. * List of {@link Reference|references} of this variable (excluding parameter entries)
  46. * in its defining scope and all nested scopes. For defining
  47. * occurrences only see {@link Variable#defs}.
  48. * @member {Reference[]} Variable#references
  49. */
  50. this.references = [];
  51. /**
  52. * List of defining occurrences of this variable (like in 'var ...'
  53. * statements or as parameter), as custom objects.
  54. * @member {Definition[]} Variable#defs
  55. */
  56. this.defs = [];
  57. this.tainted = false;
  58. /**
  59. * Whether this is a stack variable.
  60. * @member {boolean} Variable#stack
  61. */
  62. this.stack = true;
  63. /**
  64. * Reference to the enclosing Scope.
  65. * @member {Scope} Variable#scope
  66. */
  67. this.scope = scope;
  68. };
  69. exports.default = Variable;
  70. Variable.CatchClause = 'CatchClause';
  71. Variable.Parameter = 'Parameter';
  72. Variable.FunctionName = 'FunctionName';
  73. Variable.ClassName = 'ClassName';
  74. Variable.Variable = 'Variable';
  75. Variable.ImportBinding = 'ImportBinding';
  76. Variable.TDZ = 'TDZ';
  77. Variable.ImplicitGlobalVariable = 'ImplicitGlobalVariable';
  78. /* vim: set sw=4 ts=4 et tw=80 : */
  79. //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInZhcmlhYmxlLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0lBNkJxQixXQUNqQixTQURpQixRQUNqQixDQUFZLElBQVosRUFBa0IsS0FBbEIsRUFBeUI7d0JBRFIsVUFDUTs7Ozs7O0FBS3JCLE9BQUssSUFBTCxHQUFZLElBQVo7Ozs7OztBQUxxQixNQVdyQixDQUFL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