sprockets-browserify 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1278) hide show
  1. checksums.yaml +14 -6
  2. data/lib/sprockets/browserify.rb +7 -3
  3. data/node_modules/browserify/README.markdown +366 -107
  4. data/node_modules/browserify/{node_modules/resolve/test/resolver/baz/doom.js → _empty.js} +0 -0
  5. data/node_modules/browserify/bin/advanced.txt +36 -0
  6. data/node_modules/browserify/bin/args.js +116 -0
  7. data/node_modules/browserify/bin/cmd.js +56 -145
  8. data/node_modules/browserify/bin/usage.txt +32 -0
  9. data/node_modules/browserify/example/api/browser/bar.js +1 -0
  10. data/node_modules/browserify/example/api/browser/foo.js +5 -0
  11. data/node_modules/browserify/example/api/browser/main.js +2 -0
  12. data/node_modules/browserify/example/api/build.js +4 -0
  13. data/node_modules/browserify/example/multiple_bundles/beep.js +2 -0
  14. data/node_modules/browserify/example/multiple_bundles/boop.js +2 -0
  15. data/node_modules/browserify/example/multiple_bundles/build.sh +4 -0
  16. data/node_modules/browserify/example/multiple_bundles/robot.js +1 -0
  17. data/node_modules/browserify/example/multiple_bundles/static/beep.html +2 -0
  18. data/node_modules/browserify/example/multiple_bundles/static/beep.js +6 -0
  19. data/node_modules/browserify/example/multiple_bundles/static/boop.html +2 -0
  20. data/node_modules/browserify/example/multiple_bundles/static/boop.js +6 -0
  21. data/node_modules/browserify/example/multiple_bundles/static/common.js +3 -0
  22. data/node_modules/browserify/example/source_maps/build.js +10 -0
  23. data/node_modules/browserify/example/source_maps/build.sh +4 -0
  24. data/node_modules/browserify/example/source_maps/index.html +11 -0
  25. data/node_modules/browserify/example/source_maps/js/foo.js +7 -0
  26. data/node_modules/browserify/example/source_maps/js/main.js +4 -0
  27. data/node_modules/browserify/example/source_maps/js/wunder/bar.js +8 -0
  28. data/node_modules/browserify/index.js +319 -156
  29. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/LICENSE.APACHE2 +0 -0
  30. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/LICENSE.MIT +0 -0
  31. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/examples/all_docs.js +0 -0
  32. data/node_modules/browserify/node_modules/JSONStream/index.js +191 -0
  33. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/node_modules/jsonparse/LICENSE +0 -0
  34. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/node_modules/jsonparse/README.markdown +0 -0
  35. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/node_modules/jsonparse/bench.js +0 -0
  36. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/node_modules/jsonparse/examples/twitterfeed.js +0 -0
  37. data/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js +401 -0
  38. data/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/package.json +34 -0
  39. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/node_modules/jsonparse/samplejson/basic.json +0 -0
  40. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/node_modules/jsonparse/samplejson/basic2.json +0 -0
  41. data/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/boundary.js +110 -0
  42. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/node_modules/jsonparse/test/primitives.js +0 -0
  43. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/node_modules/jsonparse/test/utf8.js +0 -0
  44. data/node_modules/browserify/node_modules/JSONStream/package.json +36 -0
  45. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/readme.markdown +0 -0
  46. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/bool.js +0 -0
  47. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/destroy_missing.js +0 -0
  48. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/empty.js +0 -0
  49. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/fixtures/all_npm.json +0 -0
  50. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/fn.js +0 -0
  51. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/multiple_objects.js +0 -0
  52. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/multiple_objects_error.js +0 -0
  53. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/parsejson.js +0 -0
  54. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/stringify.js +0 -0
  55. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/stringify_object.js +0 -0
  56. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/test.js +0 -0
  57. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/test2.js +0 -0
  58. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/two-ways.js +0 -0
  59. data/node_modules/browserify/node_modules/{resolve → browser-pack}/LICENSE +0 -0
  60. data/node_modules/browserify/node_modules/browser-pack/cmd.js +4 -0
  61. data/node_modules/browserify/node_modules/browser-pack/example/input.json +13 -0
  62. data/node_modules/browserify/node_modules/browser-pack/example/output.js +1 -0
  63. data/node_modules/browserify/node_modules/browser-pack/example/sourcemap/input.json +15 -0
  64. data/node_modules/browserify/node_modules/browser-pack/example/sourcemap/output.js +6 -0
  65. data/node_modules/browserify/node_modules/browser-pack/index.js +79 -0
  66. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/LICENSE +23 -0
  67. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/README.md +111 -0
  68. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/example/two-files-short.js +26 -0
  69. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/example/two-files.js +47 -0
  70. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/index.js +97 -0
  71. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/LICENSE +23 -0
  72. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/README.md +85 -0
  73. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/example/comment-to-json.js +15 -0
  74. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/index.js +89 -0
  75. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/package.json +33 -0
  76. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/comment-regex.js +25 -0
  77. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/convert-source-map.js +129 -0
  78. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/LICENSE +23 -0
  79. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/README.md +88 -0
  80. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/example/foo-bar.js +8 -0
  81. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/index.js +127 -0
  82. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/CHANGELOG.md +58 -0
  83. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/LICENSE +0 -0
  84. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/Makefile.dryice.js +166 -0
  85. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/README.md +347 -0
  86. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/build/assert-shim.js +0 -0
  87. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/build/mini-require.js +0 -0
  88. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/prefix-source-map.jsm +20 -0
  89. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/prefix-utils.jsm +18 -0
  90. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/build/suffix-browser.js +0 -0
  91. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/suffix-source-map.jsm +6 -0
  92. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/suffix-utils.jsm +21 -0
  93. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/build/test-prefix.js +0 -0
  94. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/build/test-suffix.js +0 -0
  95. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/array-set.js +96 -0
  96. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/lib/source-map/base64-vlq.js +0 -0
  97. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/lib/source-map/base64.js +0 -0
  98. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/lib/source-map/binary-search.js +0 -0
  99. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/source-map-consumer.js +426 -0
  100. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/source-map-generator.js +381 -0
  101. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/source-node.js +353 -0
  102. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/util.js +91 -0
  103. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/lib/source-map.js +0 -0
  104. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/node_modules/amdefine/LICENSE +0 -0
  105. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/node_modules/amdefine/README.md +119 -0
  106. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
  107. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/node_modules/amdefine/package.json +33 -0
  108. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/package.json +74 -0
  109. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/run-tests.js +73 -0
  110. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/test/source-map/test-api.js +0 -0
  111. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/test/source-map/test-array-set.js +0 -0
  112. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/test/source-map/test-base64-vlq.js +0 -0
  113. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/test/source-map/test-base64.js +0 -0
  114. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/test/source-map/test-binary-search.js +0 -0
  115. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/test/source-map/test-dog-fooding.js +0 -0
  116. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-source-map-consumer.js +291 -0
  117. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-source-map-generator.js +391 -0
  118. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-source-node.js +282 -0
  119. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/util.js +152 -0
  120. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/package.json +42 -0
  121. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/test/inline-source-map.js +247 -0
  122. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/test/source-content.js +129 -0
  123. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/LICENSE +23 -0
  124. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/MOZILLA_LICENSE +28 -0
  125. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/README.md +35 -0
  126. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/base64-vlq.js +108 -0
  127. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/base64.js +35 -0
  128. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/example/one-to-one-mappings.js +5 -0
  129. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/index.js +82 -0
  130. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/package.json +39 -0
  131. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/test/parse-base64vlq-mappings.js +72 -0
  132. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/package.json +45 -0
  133. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/test/combine-source-map.js +143 -0
  134. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/README.html +1012 -0
  135. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/README.org +593 -0
  136. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/bin/uglifyjs +334 -0
  137. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/docstyle.css +75 -0
  138. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/lib/consolidator.js +1220 -0
  139. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/lib/parse-js.js +1369 -0
  140. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/lib/process.js +2117 -0
  141. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/lib/squeeze-more.js +78 -0
  142. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/package.json +28 -0
  143. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/beautify.js +28 -0
  144. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/testconsolidator.js +1391 -0
  145. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/testparser.js +409 -0
  146. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/1e21.js +1 -0
  147. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/array1.js +1 -0
  148. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/array2.js +1 -0
  149. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/array3.js +1 -0
  150. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/array4.js +1 -0
  151. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/assignment.js +1 -0
  152. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/concatstring.js +1 -0
  153. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/const.js +1 -0
  154. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/div-with-regexp.js +1 -0
  155. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/empty-blocks.js +1 -0
  156. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/forstatement.js +1 -0
  157. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/if-not.js +1 -0
  158. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/if.js +1 -0
  159. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/ifreturn.js +1 -0
  160. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/ifreturn2.js +1 -0
  161. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/infinite.js +1 -0
  162. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue10.js +1 -0
  163. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue11.js +1 -0
  164. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue13.js +1 -0
  165. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue14.js +1 -0
  166. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue16.js +1 -0
  167. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue17.js +1 -0
  168. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue20.js +1 -0
  169. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue21.js +1 -0
  170. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue25.js +1 -0
  171. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue27.js +1 -0
  172. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue278.js +1 -0
  173. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue28.js +1 -0
  174. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue29.js +1 -0
  175. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue30.js +1 -0
  176. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue34.js +1 -0
  177. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue349.js +1 -0
  178. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue353.js +1 -0
  179. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue372.js +1 -0
  180. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue4.js +1 -0
  181. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue48.js +1 -0
  182. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue50.js +1 -0
  183. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue53.js +1 -0
  184. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue54.1.js +1 -0
  185. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue68.js +1 -0
  186. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue69.js +1 -0
  187. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue9.js +1 -0
  188. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issues222_324.js +1 -0
  189. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/mangle.js +1 -0
  190. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/null_string.js +1 -0
  191. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/strict-equals.js +1 -0
  192. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/var.js +1 -0
  193. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/whitespace.js +1 -0
  194. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/with.js +1 -0
  195. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/1e21.js +1 -0
  196. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/array1.js +3 -0
  197. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/array2.js +4 -0
  198. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/array3.js +4 -0
  199. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/array4.js +6 -0
  200. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/assignment.js +20 -0
  201. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/concatstring.js +3 -0
  202. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/const.js +5 -0
  203. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/div-with-regexp.js +1 -0
  204. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/empty-blocks.js +4 -0
  205. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/forstatement.js +10 -0
  206. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/if-not.js +1 -0
  207. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/if.js +6 -0
  208. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/ifreturn.js +9 -0
  209. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/ifreturn2.js +16 -0
  210. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/infinite.js +1 -0
  211. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue10.js +1 -0
  212. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue11.js +3 -0
  213. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue13.js +1 -0
  214. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue14.js +1 -0
  215. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue16.js +1 -0
  216. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue17.js +4 -0
  217. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue20.js +1 -0
  218. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue21.js +6 -0
  219. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue25.js +7 -0
  220. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue27.js +1 -0
  221. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue278.js +1 -0
  222. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue28.js +3 -0
  223. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue29.js +1 -0
  224. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue30.js +3 -0
  225. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue34.js +3 -0
  226. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue349.js +25 -0
  227. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue353.js +4 -0
  228. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue372.js +32 -0
  229. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue4.js +3 -0
  230. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue48.js +1 -0
  231. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue50.js +9 -0
  232. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue53.js +1 -0
  233. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue54.1.js +3 -0
  234. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue68.js +5 -0
  235. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue69.js +1 -0
  236. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue9.js +4 -0
  237. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issues222_324.js +82 -0
  238. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/mangle.js +5 -0
  239. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/null_string.js +1 -0
  240. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/strict-equals.js +3 -0
  241. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/var.js +3 -0
  242. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/whitespace.js +21 -0
  243. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/with.js +2 -0
  244. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/scripts.js +57 -0
  245. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/tmp/hoist.js +33 -0
  246. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/tmp/instrument.js +97 -0
  247. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/tmp/test.js +30 -0
  248. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/uglify-js.js +18 -0
  249. data/node_modules/browserify/node_modules/browser-pack/package.json +63 -0
  250. data/node_modules/browserify/node_modules/browser-pack/prelude.js +42 -0
  251. data/node_modules/browserify/node_modules/browser-pack/readme.markdown +85 -0
  252. data/node_modules/browserify/node_modules/browser-pack/test/comment.js +33 -0
  253. data/node_modules/browserify/node_modules/browser-pack/test/only_execute_entries.js +26 -0
  254. data/node_modules/browserify/node_modules/browser-pack/test/order.js +38 -0
  255. data/node_modules/browserify/node_modules/browser-pack/test/pack.js +28 -0
  256. data/node_modules/browserify/node_modules/browser-pack/test/raw.js +32 -0
  257. data/node_modules/browserify/node_modules/browser-pack/test/source-maps-existing.js +56 -0
  258. data/node_modules/browserify/node_modules/browser-pack/test/source-maps.js +113 -0
  259. data/node_modules/browserify/node_modules/browser-pack/test/this.js +24 -0
  260. data/node_modules/browserify/node_modules/browser-resolve/README.md +115 -0
  261. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/assert.js +0 -0
  262. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/child_process.js +0 -0
  263. data/node_modules/browserify/node_modules/{resolve/test/resolver/mug.coffee → browser-resolve/builtin/dgram.js} +0 -0
  264. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/builtin/events.js +0 -0
  265. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/fs.js +0 -0
  266. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/builtin/https.js +0 -0
  267. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/net.js +0 -0
  268. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/path.js +0 -0
  269. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/builtin/process.js +0 -0
  270. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/querystring.js +0 -0
  271. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/stream.js +0 -0
  272. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/string_decoder.js +0 -0
  273. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/sys.js +0 -0
  274. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/timers.js +0 -0
  275. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/tls.js +0 -0
  276. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/tty.js +0 -0
  277. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/url.js +0 -0
  278. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/util.js +0 -0
  279. data/node_modules/browserify/node_modules/{resolve/test/resolver/mug.js → browser-resolve/empty.js} +0 -0
  280. data/node_modules/browserify/node_modules/browser-resolve/example/builtin.js +4 -0
  281. data/node_modules/browserify/node_modules/browser-resolve/example/custom/custom.js +1 -0
  282. data/node_modules/browserify/node_modules/browser-resolve/example/custom/main.js +1 -0
  283. data/node_modules/browserify/node_modules/browser-resolve/example/custom/package.json +7 -0
  284. data/node_modules/browserify/node_modules/browser-resolve/example/custom.js +5 -0
  285. data/node_modules/browserify/node_modules/browser-resolve/example/resolve.js +4 -0
  286. data/node_modules/browserify/node_modules/browser-resolve/example/skip/main.js +9 -0
  287. data/node_modules/browserify/node_modules/browser-resolve/example/skip/package.json +7 -0
  288. data/node_modules/browserify/node_modules/browser-resolve/example/skip.js +5 -0
  289. data/node_modules/browserify/node_modules/browser-resolve/index.js +170 -0
  290. data/node_modules/browserify/node_modules/{buffer-browserify → browser-resolve/node_modules/buffer-browserify}/README.md +0 -0
  291. data/node_modules/browserify/node_modules/{buffer-browserify → browser-resolve/node_modules/buffer-browserify}/buffer_ieee754.js +0 -0
  292. data/node_modules/browserify/node_modules/{buffer-browserify → browser-resolve/node_modules/buffer-browserify}/index.js +0 -0
  293. data/node_modules/browserify/node_modules/{buffer-browserify → browser-resolve/node_modules/buffer-browserify}/node_modules/base64-js/README.md +0 -0
  294. data/node_modules/browserify/node_modules/{buffer-browserify → browser-resolve/node_modules/buffer-browserify}/node_modules/base64-js/lib/b64.js +0 -0
  295. data/node_modules/browserify/node_modules/{buffer-browserify → browser-resolve/node_modules/buffer-browserify}/node_modules/base64-js/package.json +0 -0
  296. data/node_modules/browserify/node_modules/{buffer-browserify → browser-resolve/node_modules/buffer-browserify}/node_modules/base64-js/test/runner.js +0 -0
  297. data/node_modules/browserify/node_modules/browser-resolve/node_modules/buffer-browserify/package.json +42 -0
  298. data/node_modules/browserify/node_modules/{buffer-browserify → browser-resolve/node_modules/buffer-browserify}/test/buffer.js +0 -0
  299. data/node_modules/browserify/node_modules/{console-browserify → browser-resolve/node_modules/console-browserify}/LICENCE +0 -0
  300. data/node_modules/browserify/node_modules/{console-browserify → browser-resolve/node_modules/console-browserify}/README.md +0 -0
  301. data/node_modules/browserify/node_modules/{console-browserify → browser-resolve/node_modules/console-browserify}/index.js +0 -0
  302. data/node_modules/browserify/node_modules/browser-resolve/node_modules/console-browserify/package.json +76 -0
  303. data/node_modules/browserify/node_modules/{console-browserify → browser-resolve/node_modules/console-browserify}/test/index.js +0 -0
  304. data/node_modules/browserify/node_modules/{console-browserify → browser-resolve/node_modules/console-browserify}/test/static/index.html +0 -0
  305. data/node_modules/browserify/node_modules/{console-browserify → browser-resolve/node_modules/console-browserify}/test/static/test-adapter.js +0 -0
  306. data/node_modules/browserify/node_modules/{crypto-browserify → browser-resolve/node_modules/crypto-browserify}/example/bundle.js +0 -0
  307. data/node_modules/browserify/node_modules/{crypto-browserify → browser-resolve/node_modules/crypto-browserify}/example/index.html +0 -0
  308. data/node_modules/browserify/node_modules/{crypto-browserify → browser-resolve/node_modules/crypto-browserify}/example/test.js +0 -0
  309. data/node_modules/browserify/node_modules/{crypto-browserify → browser-resolve/node_modules/crypto-browserify}/index.js +0 -0
  310. data/node_modules/browserify/node_modules/{crypto-browserify → browser-resolve/node_modules/crypto-browserify}/md5.js +0 -0
  311. data/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/package.json +30 -0
  312. data/node_modules/browserify/node_modules/{crypto-browserify → browser-resolve/node_modules/crypto-browserify}/readme.markdown +0 -0
  313. data/node_modules/browserify/node_modules/{crypto-browserify → browser-resolve/node_modules/crypto-browserify}/rng.js +0 -0
  314. data/node_modules/browserify/node_modules/{crypto-browserify → browser-resolve/node_modules/crypto-browserify}/sha.js +0 -0
  315. data/node_modules/browserify/node_modules/{crypto-browserify → browser-resolve/node_modules/crypto-browserify}/test/simple.js +0 -0
  316. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/get/index.html +0 -0
  317. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/get/main.js +0 -0
  318. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/get/server.js +0 -0
  319. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/headers/index.html +0 -0
  320. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/headers/main.js +0 -0
  321. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/headers/server.js +0 -0
  322. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/data.json +0 -0
  323. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/index.html +0 -0
  324. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/main.js +0 -0
  325. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/LICENSE.APACHE2 +0 -0
  326. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/LICENSE.MIT +0 -0
  327. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/examples/all_docs.js +0 -0
  328. data/node_modules/{JSONStream → browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream}/index.js +0 -0
  329. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/LICENSE +0 -0
  330. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/README.markdown +0 -0
  331. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/bench.js +0 -0
  332. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js +0 -0
  333. data/node_modules/{JSONStream → browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream}/node_modules/jsonparse/jsonparse.js +0 -0
  334. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/package.json +0 -0
  335. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json +0 -0
  336. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json +0 -0
  337. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js +0 -0
  338. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js +0 -0
  339. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/package.json +0 -0
  340. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/readme.markdown +0 -0
  341. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/bool.js +0 -0
  342. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/destroy_missing.js +0 -0
  343. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/empty.js +0 -0
  344. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/fixtures/all_npm.json +0 -0
  345. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/fn.js +0 -0
  346. data/node_modules/{JSONStream → browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream}/test/memory.js +0 -0
  347. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/multiple_objects.js +0 -0
  348. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/multiple_objects_error.js +0 -0
  349. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/parsejson.js +0 -0
  350. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/stringify.js +0 -0
  351. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/stringify_object.js +0 -0
  352. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/test.js +0 -0
  353. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/test2.js +0 -0
  354. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/two-ways.js +0 -0
  355. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/server.js +0 -0
  356. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/post/index.html +0 -0
  357. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/post/main.js +0 -0
  358. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/post/server.js +0 -0
  359. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/streaming/index.html +0 -0
  360. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/streaming/main.js +0 -0
  361. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/streaming/server.js +0 -0
  362. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/index.js +0 -0
  363. data/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/lib/request.js +131 -0
  364. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/lib/response.js +0 -0
  365. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/node_modules/concat-stream/index.js +0 -0
  366. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/node_modules/concat-stream/package.json +0 -0
  367. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/node_modules/concat-stream/readme.md +0 -0
  368. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/node_modules/concat-stream/test.js +0 -0
  369. data/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/package.json +42 -0
  370. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/readme.markdown +0 -0
  371. data/node_modules/{module-deps → browserify/node_modules/browser-resolve/node_modules/resolve}/LICENSE +0 -0
  372. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/example/async.js +0 -0
  373. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/example/sync.js +0 -0
  374. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/index.js +0 -0
  375. data/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js +131 -0
  376. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/lib/core.js +0 -0
  377. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/lib/core.json +0 -0
  378. data/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/sync.js +99 -0
  379. data/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/package.json +32 -0
  380. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/readme.markdown +0 -0
  381. data/node_modules/browserify/node_modules/{resolve → browser-resolve/node_modules/resolve}/test/core.js +0 -0
  382. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/test/filter.js +0 -0
  383. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/test/filter_sync.js +0 -0
  384. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/test/mock.js +0 -0
  385. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/test/mock_sync.js +0 -0
  386. data/node_modules/browserify/node_modules/{resolve → browser-resolve/node_modules/resolve}/test/resolver/bar/node_modules/foo/index.js +0 -0
  387. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/test/resolver/baz/doom.js +0 -0
  388. data/node_modules/browserify/node_modules/{resolve → browser-resolve/node_modules/resolve}/test/resolver/baz/package.json +0 -0
  389. data/node_modules/browserify/node_modules/{resolve → browser-resolve/node_modules/resolve}/test/resolver/baz/quux.js +0 -0
  390. data/node_modules/browserify/node_modules/{resolve → browser-resolve/node_modules/resolve}/test/resolver/biz/node_modules/grux/index.js +0 -0
  391. data/node_modules/browserify/node_modules/{resolve → browser-resolve/node_modules/resolve}/test/resolver/biz/node_modules/tiv/index.js +0 -0
  392. data/node_modules/browserify/node_modules/{resolve → browser-resolve/node_modules/resolve}/test/resolver/cup.coffee +0 -0
  393. data/node_modules/browserify/node_modules/{resolve → browser-resolve/node_modules/resolve}/test/resolver/foo.js +0 -0
  394. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/test/resolver/mug.coffee +0 -0
  395. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/test/resolver/mug.js +0 -0
  396. data/node_modules/browserify/node_modules/{resolve → browser-resolve/node_modules/resolve}/test/resolver/other_path/lib/other-lib.js +0 -0
  397. data/node_modules/browserify/node_modules/{resolve → browser-resolve/node_modules/resolve}/test/resolver/other_path/root.js +0 -0
  398. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/test/resolver.js +0 -0
  399. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/test/resolver_sync.js +0 -0
  400. data/node_modules/browserify/node_modules/{vm-browserify → browser-resolve/node_modules/vm-browserify}/README.markdown +0 -0
  401. data/node_modules/browserify/node_modules/{vm-browserify → browser-resolve/node_modules/vm-browserify}/example/run/bundle.js +0 -0
  402. data/node_modules/browserify/node_modules/{vm-browserify → browser-resolve/node_modules/vm-browserify}/example/run/entry.js +0 -0
  403. data/node_modules/browserify/node_modules/{vm-browserify → browser-resolve/node_modules/vm-browserify}/example/run/index.html +0 -0
  404. data/node_modules/browserify/node_modules/{vm-browserify → browser-resolve/node_modules/vm-browserify}/example/run/server.js +0 -0
  405. data/node_modules/browserify/node_modules/{vm-browserify → browser-resolve/node_modules/vm-browserify}/index.js +0 -0
  406. data/node_modules/browserify/node_modules/browser-resolve/node_modules/vm-browserify/package.json +39 -0
  407. data/node_modules/browserify/node_modules/{vm-browserify → browser-resolve/node_modules/vm-browserify}/testling/run.js +0 -0
  408. data/node_modules/browserify/node_modules/{vm-browserify → browser-resolve/node_modules/vm-browserify}/testling/test.sh +0 -0
  409. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/node_modules/zlib-browserify/index.js +0 -0
  410. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/node_modules/zlib-browserify/package.json +0 -0
  411. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/node_modules/zlib-browserify/readme.md +0 -0
  412. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/node_modules/zlib-browserify/test/zlib.test.js +0 -0
  413. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/node_modules/zlib-browserify/zlib.js +0 -0
  414. data/node_modules/browserify/node_modules/browser-resolve/package.json +38 -0
  415. data/node_modules/browserify/node_modules/browser-resolve/test/core.js +28 -0
  416. data/node_modules/browserify/node_modules/browser-resolve/test/false.js +24 -0
  417. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/test/fixtures/foo.js +0 -0
  418. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/test/local.js +0 -0
  419. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/test/mocha.opts +0 -0
  420. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/test/modules.js +0 -0
  421. data/node_modules/browserify/node_modules/concat-stream/index.js +50 -0
  422. data/node_modules/browserify/node_modules/concat-stream/package.json +29 -0
  423. data/node_modules/{module-deps/node_modules/browser-resolve/node_modules/http-browserify → browserify}/node_modules/concat-stream/readme.md +0 -0
  424. data/node_modules/browserify/node_modules/concat-stream/test.js +34 -0
  425. data/node_modules/{module-deps/node_modules/browser-resolve/node_modules/console-browserify → browserify/node_modules/duplexer}/LICENCE +0 -0
  426. data/node_modules/browserify/node_modules/duplexer/Makefile +4 -0
  427. data/node_modules/browserify/node_modules/duplexer/README.md +36 -0
  428. data/node_modules/browserify/node_modules/duplexer/index.js +77 -0
  429. data/node_modules/browserify/node_modules/duplexer/package.json +42 -0
  430. data/node_modules/browserify/node_modules/duplexer/test.js +27 -0
  431. data/node_modules/browserify/node_modules/inherits/README.md +51 -0
  432. data/node_modules/browserify/node_modules/inherits/inherits.js +29 -0
  433. data/node_modules/browserify/node_modules/inherits/package.json +26 -0
  434. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals}/LICENSE +0 -0
  435. data/node_modules/browserify/node_modules/insert-module-globals/bench/results.txt +18 -0
  436. data/node_modules/browserify/node_modules/insert-module-globals/bench/run.sh +2 -0
  437. data/node_modules/browserify/node_modules/insert-module-globals/bin/cmd.js +13 -0
  438. data/node_modules/browserify/node_modules/insert-module-globals/buffer.js +3863 -0
  439. data/node_modules/browserify/node_modules/insert-module-globals/bundle.sh +4 -0
  440. data/node_modules/browserify/node_modules/insert-module-globals/example/files/foo/index.js +6 -0
  441. data/node_modules/browserify/node_modules/insert-module-globals/example/files/main.js +6 -0
  442. data/node_modules/browserify/node_modules/insert-module-globals/example/insert.js +10 -0
  443. data/node_modules/browserify/node_modules/insert-module-globals/index.js +102 -0
  444. data/node_modules/browserify/node_modules/{commondir → insert-module-globals/node_modules/commondir}/README.markdown +0 -0
  445. data/node_modules/browserify/node_modules/{commondir → insert-module-globals/node_modules/commondir}/example/base.js +0 -0
  446. data/node_modules/browserify/node_modules/{commondir → insert-module-globals/node_modules/commondir}/example/dir.js +0 -0
  447. data/node_modules/browserify/node_modules/{commondir → insert-module-globals/node_modules/commondir}/index.js +0 -0
  448. data/node_modules/browserify/node_modules/{commondir → insert-module-globals/node_modules/commondir}/package.json +0 -0
  449. data/node_modules/browserify/node_modules/{commondir → insert-module-globals/node_modules/commondir}/test/dirs.js +0 -0
  450. data/node_modules/{module-deps/node_modules/resolve → browserify/node_modules/insert-module-globals/node_modules/lexical-scope}/LICENSE +0 -0
  451. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/bench/jquery.js +4 -0
  452. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/bench/results.txt +15 -0
  453. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/bench/run.js +7 -0
  454. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/example/detect.js +6 -0
  455. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/example/src.js +27 -0
  456. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/index.js +164 -0
  457. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/LICENSE +18 -0
  458. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/example/types.js +8 -0
  459. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/index.js +42 -0
  460. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/ChangeLog +0 -0
  461. data/node_modules/browserify/node_modules/{detective → insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/LICENSE.BSD +0 -0
  462. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/README.md +0 -0
  463. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/bin/esparse.js +0 -0
  464. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/bin/esvalidate.js +0 -0
  465. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/component.json +0 -0
  466. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/doc/index.html +0 -0
  467. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/esprima.js +0 -0
  468. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/examples/detectnestedternary.js +0 -0
  469. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/examples/findbooleantrap.js +0 -0
  470. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/examples/tokendist.js +0 -0
  471. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/index.html +0 -0
  472. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/package.json +0 -0
  473. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/benchmarks.html +0 -0
  474. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/benchmarks.js +0 -0
  475. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/compare.html +0 -0
  476. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/compare.js +0 -0
  477. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/compat.html +0 -0
  478. data/node_modules/browserify/node_modules/{detective → insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/compat.js +0 -0
  479. data/node_modules/browserify/node_modules/{detective → insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/coverage.footer.html +0 -0
  480. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/coverage.header.html +0 -0
  481. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/coverage.html +0 -0
  482. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/index.html +0 -0
  483. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/module.html +0 -0
  484. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/module.js +0 -0
  485. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/reflect.js +0 -0
  486. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/run.js +0 -0
  487. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/runner.js +0 -0
  488. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/test.js +0 -0
  489. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/package.json +50 -0
  490. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/readme.markdown +52 -0
  491. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/test/parent.js +25 -0
  492. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/package.json +61 -0
  493. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/readme.markdown +99 -0
  494. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/argument.js +17 -0
  495. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/assign_implicit.js +13 -0
  496. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/detect.js +17 -0
  497. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/argument.js +6 -0
  498. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/assign_implicit.js +2 -0
  499. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/detect.js +32 -0
  500. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/labels.js +11 -0
  501. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/multiple-exports.js +6 -0
  502. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/named_arg.js +6 -0
  503. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/obj.js +1 -0
  504. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/return_hash.js +5 -0
  505. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/right_hand.js +2 -0
  506. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/labels.js +13 -0
  507. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/multiple-exports.js +18 -0
  508. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/named_arg.js +17 -0
  509. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/obj.js +16 -0
  510. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/package.json +5 -0
  511. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/return_hash.js +13 -0
  512. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/right_hand.js +16 -0
  513. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/shebang.js +19 -0
  514. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/2132fedf7e11adbdb654aea08615ffea7b84cbf0.patch +25 -0
  515. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/README.md +15 -0
  516. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js +52 -0
  517. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/index.js +2 -0
  518. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/package.json +26 -0
  519. data/node_modules/browserify/node_modules/insert-module-globals/package.json +52 -0
  520. data/node_modules/browserify/node_modules/insert-module-globals/readme.markdown +86 -0
  521. data/node_modules/browserify/node_modules/insert-module-globals/test/always/main.js +6 -0
  522. data/node_modules/browserify/node_modules/insert-module-globals/test/always.js +23 -0
  523. data/node_modules/browserify/node_modules/insert-module-globals/test/global/filename.js +2 -0
  524. data/node_modules/browserify/node_modules/insert-module-globals/test/global/main.js +2 -0
  525. data/node_modules/browserify/node_modules/insert-module-globals/test/global.js +49 -0
  526. data/node_modules/browserify/node_modules/insert-module-globals/test/insert/buffer.js +1 -0
  527. data/node_modules/browserify/node_modules/insert-module-globals/test/insert/foo/buf.js +4 -0
  528. data/node_modules/browserify/node_modules/insert-module-globals/test/insert/foo/index.js +4 -0
  529. data/node_modules/browserify/node_modules/insert-module-globals/test/insert/main.js +4 -0
  530. data/node_modules/browserify/node_modules/insert-module-globals/test/insert.js +35 -0
  531. data/node_modules/browserify/node_modules/module-deps/LICENSE +18 -0
  532. data/node_modules/{module-deps → browserify/node_modules/module-deps}/cmd.js +0 -0
  533. data/node_modules/{module-deps → browserify/node_modules/module-deps}/example/deps.js +0 -0
  534. data/node_modules/{module-deps → browserify/node_modules/module-deps}/example/files/bar.js +0 -0
  535. data/node_modules/{module-deps → browserify/node_modules/module-deps}/example/files/foo.js +0 -0
  536. data/node_modules/{module-deps → browserify/node_modules/module-deps}/example/files/main.js +0 -0
  537. data/node_modules/{module-deps → browserify/node_modules/module-deps}/example/files/xyz.js +0 -0
  538. data/node_modules/browserify/node_modules/module-deps/index.js +195 -0
  539. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/LICENSE +18 -0
  540. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/example/strings.js +0 -0
  541. data/node_modules/browserify/node_modules/{detective → module-deps/node_modules/detective}/example/strings_src.js +0 -0
  542. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/index.js +66 -0
  543. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/node_modules/escodegen/LICENSE.BSD +0 -0
  544. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/node_modules/escodegen/LICENSE.source-map +0 -0
  545. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/node_modules/escodegen/README.md +0 -0
  546. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/node_modules/escodegen/bin/escodegen.js +0 -0
  547. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/node_modules/escodegen/bin/esgenerate.js +0 -0
  548. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/node_modules/escodegen/escodegen.js +0 -0
  549. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/CHANGELOG.md +58 -0
  550. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/LICENSE +28 -0
  551. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/Makefile.dryice.js +166 -0
  552. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/README.md +347 -0
  553. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/assert-shim.js +56 -0
  554. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/mini-require.js +152 -0
  555. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/prefix-source-map.jsm +20 -0
  556. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/prefix-utils.jsm +18 -0
  557. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/suffix-browser.js +8 -0
  558. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/suffix-source-map.jsm +6 -0
  559. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/suffix-utils.jsm +21 -0
  560. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/test-prefix.js +8 -0
  561. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/test-suffix.js +3 -0
  562. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/array-set.js +96 -0
  563. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
  564. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/base64.js +42 -0
  565. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/binary-search.js +81 -0
  566. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-consumer.js +426 -0
  567. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-generator.js +381 -0
  568. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/source-node.js +353 -0
  569. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/util.js +91 -0
  570. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map.js +8 -0
  571. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
  572. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/README.md +119 -0
  573. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
  574. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/package.json +34 -0
  575. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/package.json +74 -0
  576. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/run-tests.js +73 -0
  577. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-api.js +26 -0
  578. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-array-set.js +71 -0
  579. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
  580. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64.js +35 -0
  581. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
  582. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
  583. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-consumer.js +291 -0
  584. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-generator.js +391 -0
  585. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-node.js +282 -0
  586. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/util.js +152 -0
  587. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/node_modules/escodegen/package.json +0 -0
  588. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/ChangeLog +18 -0
  589. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/node_modules/esprima/LICENSE.BSD +0 -0
  590. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/README.md +73 -0
  591. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/bin/esparse.js +117 -0
  592. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/bin/esvalidate.js +177 -0
  593. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/component.json +14 -0
  594. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/doc/index.html +473 -0
  595. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/esprima.js +3895 -0
  596. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/examples/detectnestedternary.js +106 -0
  597. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/examples/findbooleantrap.js +173 -0
  598. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/examples/tokendist.js +33 -0
  599. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/index.html +102 -0
  600. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/package.json +40 -0
  601. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/benchmarks.html +58 -0
  602. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/benchmarks.js +334 -0
  603. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/compare.html +69 -0
  604. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/compare.js +328 -0
  605. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/compat.html +40 -0
  606. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/node_modules/esprima/test/compat.js +0 -0
  607. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/node_modules/esprima/test/coverage.footer.html +0 -0
  608. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/coverage.header.html +37 -0
  609. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/coverage.html +4676 -0
  610. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/index.html +37 -0
  611. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/module.html +36 -0
  612. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/module.js +129 -0
  613. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/reflect.js +422 -0
  614. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/run.js +66 -0
  615. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/runner.js +387 -0
  616. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/test.js +19764 -0
  617. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/package.json +36 -0
  618. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/readme.markdown +73 -0
  619. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/both.js +26 -0
  620. data/node_modules/browserify/node_modules/{detective → module-deps/node_modules/detective}/test/chained.js +0 -0
  621. data/node_modules/browserify/node_modules/{detective → module-deps/node_modules/detective}/test/files/both.js +0 -0
  622. data/node_modules/browserify/node_modules/{detective → module-deps/node_modules/detective}/test/files/chained.js +0 -0
  623. data/node_modules/browserify/node_modules/{detective → module-deps/node_modules/detective}/test/files/nested.js +0 -0
  624. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/test/files/shebang.js +0 -0
  625. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/files/sparse-array.js +3 -0
  626. data/node_modules/browserify/node_modules/{detective → module-deps/node_modules/detective}/test/files/strings.js +0 -0
  627. data/node_modules/browserify/node_modules/{detective → module-deps/node_modules/detective}/test/files/word.js +0 -0
  628. data/node_modules/browserify/node_modules/{detective → module-deps/node_modules/detective}/test/nested.js +0 -0
  629. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/return.js +9 -0
  630. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/test/shebang.js +0 -0
  631. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/sparse-array.js +14 -0
  632. data/node_modules/browserify/node_modules/{detective → module-deps/node_modules/detective}/test/strings.js +0 -0
  633. data/node_modules/browserify/node_modules/{detective → module-deps/node_modules/detective}/test/word.js +0 -0
  634. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/LICENSE +18 -0
  635. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/example/async.js +5 -0
  636. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/example/sync.js +3 -0
  637. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/index.js +5 -0
  638. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/lib/async.js +131 -0
  639. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/lib/core.js +4 -0
  640. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/lib/core.json +38 -0
  641. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/lib/sync.js +99 -0
  642. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/package.json +32 -0
  643. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/readme.markdown +134 -0
  644. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/resolve/test/core.js +0 -0
  645. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/filter.js +17 -0
  646. data/node_modules/browserify/node_modules/{resolve/test/filter.js → module-deps/node_modules/resolve/test/filter_sync.js} +0 -0
  647. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/mock.js +68 -0
  648. data/node_modules/browserify/node_modules/{resolve/test/mock.js → module-deps/node_modules/resolve/test/mock_sync.js} +0 -0
  649. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +0 -0
  650. data/node_modules/browserify/{test/wrap/x.js → node_modules/module-deps/node_modules/resolve/test/resolver/baz/doom.js} +0 -0
  651. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/resolve/test/resolver/baz/package.json +0 -0
  652. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/resolve/test/resolver/baz/quux.js +0 -0
  653. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +0 -0
  654. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +0 -0
  655. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/resolve/test/resolver/cup.coffee +0 -0
  656. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/resolve/test/resolver/foo.js +0 -0
  657. data/node_modules/{module-deps/node_modules/resolve/test/resolver/other_path/lib/other-lib.js → browserify/node_modules/module-deps/node_modules/resolve/test/resolver/mug.coffee} +0 -0
  658. data/node_modules/{module-deps/node_modules/resolve/test/resolver/other_path/root.js → browserify/node_modules/module-deps/node_modules/resolve/test/resolver/mug.js} +0 -0
  659. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
  660. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/other_path/root.js +0 -0
  661. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver.js +144 -0
  662. data/node_modules/browserify/node_modules/{resolve/test/resolver.js → module-deps/node_modules/resolve/test/resolver_sync.js} +0 -0
  663. data/node_modules/{through → browserify/node_modules/module-deps/node_modules/through}/LICENSE.APACHE2 +0 -0
  664. data/node_modules/{through → browserify/node_modules/module-deps/node_modules/through}/LICENSE.MIT +0 -0
  665. data/node_modules/browserify/node_modules/module-deps/node_modules/through/index.js +108 -0
  666. data/node_modules/browserify/node_modules/module-deps/node_modules/through/package.json +43 -0
  667. data/node_modules/browserify/node_modules/module-deps/node_modules/through/readme.markdown +63 -0
  668. data/node_modules/browserify/node_modules/module-deps/node_modules/through/test/auto-destroy.js +30 -0
  669. data/node_modules/browserify/node_modules/module-deps/node_modules/through/test/buffering.js +71 -0
  670. data/node_modules/browserify/node_modules/module-deps/node_modules/through/test/end.js +45 -0
  671. data/node_modules/browserify/node_modules/module-deps/node_modules/through/test/index.js +114 -0
  672. data/node_modules/browserify/node_modules/module-deps/package.json +48 -0
  673. data/node_modules/browserify/node_modules/module-deps/readme.markdown +137 -0
  674. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/bundle.js +0 -0
  675. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/deps.js +0 -0
  676. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/bar.js +0 -0
  677. data/node_modules/browserify/node_modules/module-deps/test/files/filterable.js +10 -0
  678. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/foo.js +0 -0
  679. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/main.js +0 -0
  680. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_module/f.js +0 -0
  681. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_module/main.js +0 -0
  682. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_module/node_modules/g/index.js +0 -0
  683. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_module/node_modules/g/node_modules/insert-ggg/index.js +0 -0
  684. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_module/node_modules/g/package.json +0 -0
  685. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_module/node_modules/insert-aaa/index.js +0 -0
  686. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_module/node_modules/insert-bbb/index.js +0 -0
  687. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_module/node_modules/m/index.js +0 -0
  688. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_sh/f.js +0 -0
  689. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_sh/main.js +0 -0
  690. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_sh/node_modules/g/index.js +0 -0
  691. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_sh/node_modules/g/package.json +0 -0
  692. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_sh/node_modules/g/tr_g.js +0 -0
  693. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_sh/node_modules/m/index.js +0 -0
  694. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_sh/tr_a.js +0 -0
  695. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_sh/tr_b.js +0 -0
  696. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/xyz.js +0 -0
  697. data/node_modules/browserify/node_modules/module-deps/test/filter.js +37 -0
  698. data/node_modules/browserify/node_modules/module-deps/test/noparse.js +37 -0
  699. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/tr_fn.js +0 -0
  700. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/tr_module.js +0 -0
  701. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/tr_sh.js +0 -0
  702. data/node_modules/browserify/node_modules/optimist/README.markdown +13 -0
  703. data/node_modules/browserify/node_modules/optimist/index.js +36 -13
  704. data/node_modules/browserify/node_modules/optimist/package.json +6 -11
  705. data/node_modules/browserify/node_modules/optimist/test/dash.js +31 -0
  706. data/node_modules/browserify/node_modules/optimist/test/parse.js +13 -0
  707. data/node_modules/browserify/node_modules/optimist/test/parse_modified.js +14 -0
  708. data/node_modules/browserify/node_modules/optimist/test/short.js +16 -0
  709. data/node_modules/browserify/node_modules/optimist/test/whitespace.js +8 -0
  710. data/node_modules/browserify/node_modules/shell-quote/README.markdown +72 -0
  711. data/node_modules/browserify/node_modules/shell-quote/example/parse.js +3 -0
  712. data/node_modules/browserify/node_modules/shell-quote/example/quote.js +3 -0
  713. data/node_modules/browserify/node_modules/shell-quote/index.js +33 -0
  714. data/node_modules/browserify/node_modules/shell-quote/package.json +39 -0
  715. data/node_modules/browserify/node_modules/shell-quote/test/parse.js +14 -0
  716. data/node_modules/browserify/node_modules/shell-quote/test/quote.js +15 -0
  717. data/node_modules/browserify/node_modules/syntax-error/index.js +1 -1
  718. data/node_modules/browserify/node_modules/syntax-error/package.json +2 -2
  719. data/node_modules/browserify/node_modules/through/LICENSE.APACHE2 +15 -0
  720. data/node_modules/browserify/node_modules/through/LICENSE.MIT +24 -0
  721. data/node_modules/{through → browserify/node_modules/through}/index.js +0 -0
  722. data/node_modules/browserify/node_modules/through/package.json +43 -0
  723. data/node_modules/browserify/node_modules/through/readme.markdown +43 -0
  724. data/node_modules/browserify/node_modules/through/test/buffering.js +71 -0
  725. data/node_modules/browserify/node_modules/through/test/end.js +26 -0
  726. data/node_modules/browserify/node_modules/through/test/index.js +114 -0
  727. data/node_modules/browserify/node_modules/umd/README.md +46 -0
  728. data/node_modules/browserify/node_modules/umd/index.js +63 -0
  729. data/node_modules/browserify/node_modules/umd/node_modules/rfile/README.md +81 -0
  730. data/node_modules/browserify/node_modules/umd/node_modules/rfile/index.js +39 -0
  731. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/callsite/History.md +10 -0
  732. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/callsite/Makefile +6 -0
  733. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/callsite/Readme.md +44 -0
  734. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/callsite/index.js +10 -0
  735. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/callsite/package.json +27 -0
  736. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/LICENSE +18 -0
  737. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/example/async.js +5 -0
  738. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/example/sync.js +3 -0
  739. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/index.js +5 -0
  740. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/lib/async.js +131 -0
  741. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/lib/core.js +4 -0
  742. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/lib/core.json +38 -0
  743. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/lib/sync.js +99 -0
  744. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/package.json +32 -0
  745. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/readme.markdown +134 -0
  746. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/core.js +12 -0
  747. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/filter.js +17 -0
  748. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/filter_sync.js +15 -0
  749. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/mock.js +68 -0
  750. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/mock_sync.js +68 -0
  751. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +1 -0
  752. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/baz/doom.js +0 -0
  753. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/baz/package.json +3 -0
  754. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/baz/quux.js +1 -0
  755. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +1 -0
  756. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +1 -0
  757. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/cup.coffee +1 -0
  758. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/foo.js +1 -0
  759. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/mug.coffee +0 -0
  760. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/mug.js +0 -0
  761. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
  762. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/other_path/root.js +0 -0
  763. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver.js +144 -0
  764. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver_sync.js +157 -0
  765. data/node_modules/browserify/node_modules/umd/node_modules/rfile/package.json +36 -0
  766. data/node_modules/browserify/node_modules/umd/node_modules/rfile/test/index.js +43 -0
  767. data/node_modules/browserify/node_modules/umd/node_modules/ruglify/README.md +26 -0
  768. data/node_modules/browserify/node_modules/umd/node_modules/ruglify/index.js +9 -0
  769. data/node_modules/browserify/node_modules/umd/node_modules/ruglify/package.json +39 -0
  770. data/node_modules/browserify/node_modules/umd/node_modules/ruglify/test/fixture/jquery.js +9597 -0
  771. data/node_modules/browserify/node_modules/umd/node_modules/ruglify/test/fixture/jquery.min.js +3 -0
  772. data/node_modules/browserify/node_modules/umd/node_modules/ruglify/test/index.js +8 -0
  773. data/node_modules/browserify/node_modules/umd/node_modules/through/LICENSE.APACHE2 +15 -0
  774. data/node_modules/browserify/node_modules/umd/node_modules/through/LICENSE.MIT +24 -0
  775. data/node_modules/browserify/node_modules/umd/node_modules/through/index.js +108 -0
  776. data/node_modules/browserify/node_modules/umd/node_modules/through/package.json +43 -0
  777. data/node_modules/browserify/node_modules/umd/node_modules/through/readme.markdown +63 -0
  778. data/node_modules/browserify/node_modules/umd/node_modules/through/test/auto-destroy.js +30 -0
  779. data/node_modules/browserify/node_modules/umd/node_modules/through/test/buffering.js +71 -0
  780. data/node_modules/browserify/node_modules/umd/node_modules/through/test/end.js +45 -0
  781. data/node_modules/browserify/node_modules/umd/node_modules/through/test/index.js +114 -0
  782. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/README.md +544 -0
  783. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/bin/uglifyjs +370 -0
  784. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/ast.js +964 -0
  785. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/compress.js +1968 -0
  786. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/mozilla-ast.js +265 -0
  787. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/output.js +1220 -0
  788. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/parse.js +1407 -0
  789. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/scope.js +580 -0
  790. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/sourcemap.js +81 -0
  791. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/transform.js +218 -0
  792. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/utils.js +288 -0
  793. data/node_modules/browserify/node_modules/{deputy/node_modules/mkdirp → umd/node_modules/uglify-js/node_modules/optimist}/LICENSE +0 -0
  794. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/bool.js +10 -0
  795. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/boolean_double.js +7 -0
  796. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/boolean_single.js +7 -0
  797. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/default_hash.js +8 -0
  798. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/default_singles.js +7 -0
  799. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/divide.js +8 -0
  800. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/line_count.js +20 -0
  801. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/line_count_options.js +29 -0
  802. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/line_count_wrap.js +29 -0
  803. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/nonopt.js +4 -0
  804. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/reflect.js +2 -0
  805. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/short.js +3 -0
  806. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/string.js +11 -0
  807. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/usage-options.js +19 -0
  808. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/xup.js +10 -0
  809. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/index.js +478 -0
  810. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/README.markdown +70 -0
  811. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/example/center.js +10 -0
  812. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/example/meat.js +3 -0
  813. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/index.js +76 -0
  814. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/package.json +41 -0
  815. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/test/break.js +30 -0
  816. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/test/idleness.txt +63 -0
  817. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/test/wrap.js +31 -0
  818. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/package.json +42 -0
  819. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/readme.markdown +487 -0
  820. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/test/_/argv.js +2 -0
  821. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/test/_/bin.js +3 -0
  822. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/test/_.js +71 -0
  823. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/test/parse.js +446 -0
  824. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/test/usage.js +292 -0
  825. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/CHANGELOG.md +58 -0
  826. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/LICENSE +28 -0
  827. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/Makefile.dryice.js +166 -0
  828. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/README.md +347 -0
  829. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/assert-shim.js +56 -0
  830. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/mini-require.js +152 -0
  831. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/prefix-source-map.jsm +20 -0
  832. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/prefix-utils.jsm +18 -0
  833. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/suffix-browser.js +8 -0
  834. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/suffix-source-map.jsm +6 -0
  835. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/suffix-utils.jsm +21 -0
  836. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/test-prefix.js +8 -0
  837. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/test-suffix.js +3 -0
  838. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/array-set.js +96 -0
  839. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
  840. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64.js +42 -0
  841. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/binary-search.js +81 -0
  842. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-consumer.js +426 -0
  843. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-generator.js +381 -0
  844. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-node.js +353 -0
  845. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js +91 -0
  846. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map.js +8 -0
  847. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
  848. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/README.md +119 -0
  849. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
  850. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/package.json +33 -0
  851. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/package.json +74 -0
  852. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/run-tests.js +73 -0
  853. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-api.js +26 -0
  854. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-array-set.js +71 -0
  855. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
  856. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64.js +35 -0
  857. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
  858. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
  859. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-consumer.js +291 -0
  860. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-generator.js +391 -0
  861. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-node.js +282 -0
  862. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/util.js +152 -0
  863. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/package.json +37 -0
  864. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/arrays.js +12 -0
  865. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/blocks.js +49 -0
  866. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/conditionals.js +143 -0
  867. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/dead-code.js +89 -0
  868. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/debugger.js +24 -0
  869. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/drop-unused.js +97 -0
  870. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/issue-105.js +17 -0
  871. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/issue-12.js +11 -0
  872. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/issue-22.js +17 -0
  873. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/issue-44.js +31 -0
  874. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/issue-59.js +30 -0
  875. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/labels.js +163 -0
  876. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/loops.js +123 -0
  877. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/properties.js +25 -0
  878. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/sequences.js +161 -0
  879. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/switch.js +210 -0
  880. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/run-tests.js +170 -0
  881. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/tools/node.js +164 -0
  882. data/node_modules/browserify/node_modules/umd/package.json +32 -0
  883. data/node_modules/browserify/node_modules/umd/template.js +33 -0
  884. data/node_modules/browserify/package.json +25 -38
  885. data/node_modules/browserify/test/args.js +15 -0
  886. data/node_modules/browserify/test/backbone.js +13 -12
  887. data/node_modules/browserify/test/bin.js +6 -14
  888. data/node_modules/browserify/test/bin_entry.js +31 -0
  889. data/node_modules/browserify/test/buffer.js +83 -64
  890. data/node_modules/browserify/test/bundle_sourcemap.js +30 -0
  891. data/node_modules/browserify/test/catch/main.js +1 -0
  892. data/node_modules/browserify/test/catch.js +22 -0
  893. data/node_modules/browserify/test/circular/a.js +3 -0
  894. data/node_modules/browserify/test/circular/b.js +1 -0
  895. data/node_modules/browserify/test/circular/main.js +1 -0
  896. data/node_modules/browserify/test/circular.js +34 -0
  897. data/node_modules/browserify/test/coffee_bin/main.coffee +2 -0
  898. data/node_modules/browserify/test/coffee_bin/x.coffee +1 -0
  899. data/node_modules/browserify/test/coffee_bin.js +36 -0
  900. data/node_modules/browserify/test/comment.js +8 -9
  901. data/node_modules/browserify/test/dep.js +31 -0
  902. data/node_modules/browserify/test/dnode.js +17 -17
  903. data/node_modules/browserify/test/dollar.js +11 -12
  904. data/node_modules/browserify/test/entry.js +11 -28
  905. data/node_modules/browserify/test/entry_exec/fail.js +1 -0
  906. data/node_modules/browserify/test/entry_exec/main.js +1 -0
  907. data/node_modules/browserify/test/entry_exec.js +15 -0
  908. data/node_modules/browserify/test/error_code.js +0 -2
  909. data/node_modules/browserify/test/export.js +22 -39
  910. data/node_modules/browserify/test/fake/fake_fs.js +1 -0
  911. data/node_modules/browserify/test/fake/main.js +2 -0
  912. data/node_modules/browserify/test/fake.js +15 -0
  913. data/node_modules/browserify/test/field/node_modules/z-object/package.json +1 -3
  914. data/node_modules/browserify/test/field.js +40 -40
  915. data/node_modules/browserify/test/file_event.js +33 -0
  916. data/node_modules/browserify/test/global/buffer.js +2 -0
  917. data/node_modules/browserify/test/global/filename.js +2 -0
  918. data/node_modules/browserify/test/global/tick.js +3 -0
  919. data/node_modules/browserify/test/global.js +45 -10
  920. data/node_modules/browserify/test/ignore/by-id.js +4 -0
  921. data/node_modules/browserify/test/ignore/main.js +1 -0
  922. data/node_modules/browserify/test/ignore/skip.js +1 -0
  923. data/node_modules/browserify/test/ignore.js +33 -0
  924. data/node_modules/browserify/test/json.js +11 -10
  925. data/node_modules/browserify/test/maxlisteners/main.js +3 -0
  926. data/node_modules/browserify/test/maxlisteners.js +9 -4
  927. data/node_modules/browserify/test/multi_bundle/a.js +2 -0
  928. data/node_modules/browserify/test/multi_bundle/b.js +5 -0
  929. data/node_modules/browserify/test/multi_bundle.js +44 -0
  930. data/node_modules/browserify/test/multi_entry/c.js +0 -1
  931. data/node_modules/browserify/test/multi_entry.js +16 -11
  932. data/node_modules/browserify/test/process/main.js +3 -0
  933. data/node_modules/browserify/test/process/one.js +1 -0
  934. data/node_modules/browserify/test/process/two.js +1 -0
  935. data/node_modules/browserify/test/process.js +20 -0
  936. data/node_modules/browserify/test/require_cache.js +13 -12
  937. data/node_modules/browserify/test/retarget.js +2 -6
  938. data/node_modules/browserify/test/reverse_multi_bundle/app.js +22 -0
  939. data/node_modules/browserify/test/reverse_multi_bundle/lazy.js +4 -0
  940. data/node_modules/browserify/test/reverse_multi_bundle/shared.js +4 -0
  941. data/node_modules/browserify/test/reverse_multi_bundle.js +43 -0
  942. data/node_modules/browserify/test/shebang/foo.js +2 -0
  943. data/node_modules/browserify/test/shebang/main.js +4 -0
  944. data/node_modules/browserify/test/shebang.js +11 -0
  945. data/node_modules/browserify/test/standalone/main.js +3 -0
  946. data/node_modules/browserify/test/standalone/one.js +1 -0
  947. data/node_modules/browserify/test/standalone/two.js +1 -0
  948. data/node_modules/browserify/test/standalone.js +73 -0
  949. data/node_modules/browserify/test/subdep.js +8 -18
  950. data/node_modules/browserify/test/tr/f.js +1 -0
  951. data/node_modules/browserify/test/tr/main.js +7 -0
  952. data/node_modules/browserify/test/tr/node_modules/g/index.js +1 -0
  953. data/node_modules/browserify/test/tr/node_modules/g/node_modules/insert-ggg/index.js +7 -0
  954. data/node_modules/browserify/test/tr/node_modules/g/package.json +6 -0
  955. data/node_modules/browserify/test/tr/node_modules/insert-aaa/index.js +7 -0
  956. data/node_modules/browserify/test/tr/node_modules/insert-bbb/index.js +7 -0
  957. data/node_modules/browserify/test/tr/node_modules/m/index.js +3 -0
  958. data/node_modules/browserify/test/tr.js +21 -0
  959. data/node_modules/browserify/test/util.js +43 -29
  960. data/package.json +2 -5
  961. metadata +931 -614
  962. data/node_modules/JSONStream/node_modules/jsonparse/package.json +0 -34
  963. data/node_modules/JSONStream/package.json +0 -38
  964. data/node_modules/browserify/builtins/__browserify_process.js +0 -55
  965. data/node_modules/browserify/builtins/events.js +0 -178
  966. data/node_modules/browserify/builtins/https.js +0 -1
  967. data/node_modules/browserify/doc/methods.markdown +0 -182
  968. data/node_modules/browserify/doc/recipes.markdown +0 -62
  969. data/node_modules/browserify/example/debug/browserify.js +0 -219
  970. data/node_modules/browserify/example/debug/build.sh +0 -3
  971. data/node_modules/browserify/example/debug/index.html +0 -7
  972. data/node_modules/browserify/example/debug/js/entry.js +0 -2
  973. data/node_modules/browserify/example/debug/js/thrower.js +0 -3
  974. data/node_modules/browserify/example/debug/server.js +0 -9
  975. data/node_modules/browserify/example/simple-build/browserify.js +0 -368
  976. data/node_modules/browserify/example/simple-build/build.sh +0 -3
  977. data/node_modules/browserify/example/simple-build/index.html +0 -9
  978. data/node_modules/browserify/example/simple-build/js/bar.js +0 -3
  979. data/node_modules/browserify/example/simple-build/js/entry.js +0 -5
  980. data/node_modules/browserify/example/simple-build/js/foo.js +0 -5
  981. data/node_modules/browserify/example/simple-build/server.js +0 -9
  982. data/node_modules/browserify/example/test/b.js +0 -5
  983. data/node_modules/browserify/example/test/bar.js +0 -3
  984. data/node_modules/browserify/example/test/foo.js +0 -3
  985. data/node_modules/browserify/example/test/m.js +0 -3
  986. data/node_modules/browserify/example/test/n.js +0 -3
  987. data/node_modules/browserify/example/using-http/bundle.js +0 -813
  988. data/node_modules/browserify/example/using-http/entry.js +0 -25
  989. data/node_modules/browserify/example/using-http/index.html +0 -9
  990. data/node_modules/browserify/example/using-http/server.js +0 -28
  991. data/node_modules/browserify/lib/watch.js +0 -75
  992. data/node_modules/browserify/lib/wrap.js +0 -583
  993. data/node_modules/browserify/lib/wrappers.js +0 -10
  994. data/node_modules/browserify/node_modules/buffer-browserify/package.json +0 -42
  995. data/node_modules/browserify/node_modules/coffee-script/CNAME +0 -1
  996. data/node_modules/browserify/node_modules/coffee-script/CONTRIBUTING.md +0 -9
  997. data/node_modules/browserify/node_modules/coffee-script/LICENSE +0 -22
  998. data/node_modules/browserify/node_modules/coffee-script/README +0 -51
  999. data/node_modules/browserify/node_modules/coffee-script/Rakefile +0 -79
  1000. data/node_modules/browserify/node_modules/coffee-script/bin/cake +0 -7
  1001. data/node_modules/browserify/node_modules/coffee-script/bin/coffee +0 -7
  1002. data/node_modules/browserify/node_modules/coffee-script/extras/jsl.conf +0 -44
  1003. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/browser.js +0 -101
  1004. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/cake.js +0 -113
  1005. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/coffee-script.js +0 -218
  1006. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/command.js +0 -506
  1007. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/grammar.js +0 -623
  1008. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/helpers.js +0 -150
  1009. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/index.js +0 -11
  1010. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/lexer.js +0 -905
  1011. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/nodes.js +0 -3088
  1012. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/optparse.js +0 -138
  1013. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/parser.js +0 -608
  1014. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/repl.js +0 -104
  1015. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/rewriter.js +0 -478
  1016. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/scope.js +0 -147
  1017. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/sourcemap.js +0 -237
  1018. data/node_modules/browserify/node_modules/coffee-script/package.json +0 -48
  1019. data/node_modules/browserify/node_modules/console-browserify/package.json +0 -76
  1020. data/node_modules/browserify/node_modules/crypto-browserify/package.json +0 -30
  1021. data/node_modules/browserify/node_modules/deputy/README.markdown +0 -55
  1022. data/node_modules/browserify/node_modules/deputy/example/cache.js +0 -5
  1023. data/node_modules/browserify/node_modules/deputy/index.js +0 -46
  1024. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/examples/pow.js +0 -6
  1025. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/index.js +0 -82
  1026. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/package.json +0 -30
  1027. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/readme.markdown +0 -63
  1028. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/chmod.js +0 -38
  1029. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/clobber.js +0 -37
  1030. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/mkdirp.js +0 -28
  1031. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/perm.js +0 -32
  1032. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/perm_sync.js +0 -39
  1033. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/race.js +0 -41
  1034. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/rel.js +0 -32
  1035. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/return.js +0 -25
  1036. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/return_sync.js +0 -24
  1037. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/root.js +0 -18
  1038. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/sync.js +0 -32
  1039. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/umask.js +0 -28
  1040. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/umask_sync.js +0 -32
  1041. data/node_modules/browserify/node_modules/deputy/package.json +0 -43
  1042. data/node_modules/browserify/node_modules/deputy/test/cache.js +0 -58
  1043. data/node_modules/browserify/node_modules/detective/README.markdown +0 -66
  1044. data/node_modules/browserify/node_modules/detective/example/strings.js +0 -6
  1045. data/node_modules/browserify/node_modules/detective/index.js +0 -60
  1046. data/node_modules/browserify/node_modules/detective/node_modules/esprima/README.md +0 -74
  1047. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/codemirror/codemirror.css +0 -112
  1048. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/codemirror/codemirror.js +0 -2972
  1049. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/codemirror/javascript.js +0 -360
  1050. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/json2.js +0 -487
  1051. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/style.css +0 -164
  1052. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/treeview-min.js +0 -12
  1053. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/treeview-sprite.gif +0 -0
  1054. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/treeview.css +0 -7
  1055. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/yahoo-dom-event.js +0 -14
  1056. data/node_modules/browserify/node_modules/detective/node_modules/esprima/bin/esparse.js +0 -42
  1057. data/node_modules/browserify/node_modules/detective/node_modules/esprima/changes +0 -92
  1058. data/node_modules/browserify/node_modules/detective/node_modules/esprima/cm +0 -696
  1059. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/checkenv.js +0 -42
  1060. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/collector.html +0 -82
  1061. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/collector.js +0 -170
  1062. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/functiontrace.html +0 -106
  1063. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/functiontrace.js +0 -123
  1064. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/parse.css +0 -82
  1065. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/parse.html +0 -352
  1066. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/precedence.html +0 -225
  1067. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/rewrite.html +0 -120
  1068. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/rewrite.js +0 -71
  1069. data/node_modules/browserify/node_modules/detective/node_modules/esprima/esprima.js +0 -3577
  1070. data/node_modules/browserify/node_modules/detective/node_modules/esprima/index.html +0 -103
  1071. data/node_modules/browserify/node_modules/detective/node_modules/esprima/package.json +0 -39
  1072. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/Tokenizer.js +0 -646
  1073. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/XMLHttpRequest.js +0 -509
  1074. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/ZeParser.js +0 -2185
  1075. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/backbone-0.5.3.js +0 -1158
  1076. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/benchmark.js +0 -3261
  1077. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/escodegen.js +0 -906
  1078. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/esmorph.js +0 -240
  1079. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/ext-core-3.0.0.js +0 -6579
  1080. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/ext-core-3.1.0.js +0 -10255
  1081. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jquery-1.6.4.js +0 -9046
  1082. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jquery-1.7.1.js +0 -9266
  1083. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jquery.mobile-1.0.js +0 -6951
  1084. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jsdefs.js +0 -731
  1085. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jslex.js +0 -588
  1086. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jsparse.js +0 -1921
  1087. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/mootools-1.3.2.js +0 -5952
  1088. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/mootools-1.4.1.js +0 -6297
  1089. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/parse-js.js +0 -1342
  1090. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/platform.js +0 -878
  1091. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/prototype-1.6.1.js +0 -4874
  1092. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/prototype-1.7.0.0.js +0 -6082
  1093. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/underscore-1.2.3.js +0 -981
  1094. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/benchmarks.html +0 -58
  1095. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/benchmarks.js +0 -328
  1096. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compare.html +0 -140
  1097. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compare.js +0 -270
  1098. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compat.html +0 -40
  1099. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/coverage.header.html +0 -37
  1100. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/coverage.html +0 -3617
  1101. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/index.html +0 -36
  1102. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/reflect.js +0 -403
  1103. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/run.js +0 -66
  1104. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/test.js +0 -16659
  1105. data/node_modules/browserify/node_modules/detective/node_modules/esprima/tools/generate-unicode-regex.py +0 -164
  1106. data/node_modules/browserify/node_modules/detective/node_modules/esprima/tools/update-coverage.sh +0 -28
  1107. data/node_modules/browserify/node_modules/detective/package.json +0 -43
  1108. data/node_modules/browserify/node_modules/detective/test/both.js +0 -11
  1109. data/node_modules/browserify/node_modules/detective/test/files/skip.js +0 -7
  1110. data/node_modules/browserify/node_modules/detective/test/skip.js +0 -9
  1111. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/index.js +0 -189
  1112. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js +0 -379
  1113. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/memory.js +0 -69
  1114. data/node_modules/browserify/node_modules/http-browserify/lib/request.js +0 -128
  1115. data/node_modules/browserify/node_modules/http-browserify/package.json +0 -42
  1116. data/node_modules/browserify/node_modules/nub/README.markdown +0 -23
  1117. data/node_modules/browserify/node_modules/nub/index.js +0 -64
  1118. data/node_modules/browserify/node_modules/nub/package.json +0 -42
  1119. data/node_modules/browserify/node_modules/nub/test/by.js +0 -51
  1120. data/node_modules/browserify/node_modules/nub/test/nub.js +0 -46
  1121. data/node_modules/browserify/node_modules/optimist/x.js +0 -1
  1122. data/node_modules/browserify/node_modules/resolve/README.markdown +0 -47
  1123. data/node_modules/browserify/node_modules/resolve/index.js +0 -109
  1124. data/node_modules/browserify/node_modules/resolve/package.json +0 -41
  1125. data/node_modules/browserify/node_modules/vm-browserify/package.json +0 -39
  1126. data/node_modules/browserify/test/alias.js +0 -58
  1127. data/node_modules/browserify/test/bundle.js +0 -32
  1128. data/node_modules/browserify/test/cache.js +0 -28
  1129. data/node_modules/browserify/test/coffee/bar.js +0 -1
  1130. data/node_modules/browserify/test/coffee/baz.coffee +0 -1
  1131. data/node_modules/browserify/test/coffee/entry.coffee +0 -1
  1132. data/node_modules/browserify/test/coffee/foo.coffee +0 -1
  1133. data/node_modules/browserify/test/coffee/index.coffee +0 -5
  1134. data/node_modules/browserify/test/coffee/nested/nested.coffee +0 -2
  1135. data/node_modules/browserify/test/coffee.js +0 -39
  1136. data/node_modules/browserify/test/jade.js +0 -35
  1137. data/node_modules/browserify/test/module.js +0 -22
  1138. data/node_modules/browserify/test/multi_ignore.js +0 -23
  1139. data/node_modules/browserify/test/seq.js +0 -47
  1140. data/node_modules/browserify/test/watch/a.js +0 -1
  1141. data/node_modules/browserify/test/watch.js +0 -91
  1142. data/node_modules/browserify/test/wrap/a.js +0 -2
  1143. data/node_modules/browserify/test/wrap/c.js +0 -1
  1144. data/node_modules/browserify/test/wrap/node_modules/b/main.js +0 -1
  1145. data/node_modules/browserify/test/wrap/node_modules/b/package.json +0 -3
  1146. data/node_modules/browserify/test/wrap/node_modules/skipmetoo/index.js +0 -1
  1147. data/node_modules/browserify/test/wrap/skipme.js +0 -1
  1148. data/node_modules/browserify/test/wrap.js +0 -43
  1149. data/node_modules/browserify/testling/README.markdown +0 -29
  1150. data/node_modules/browserify/testling/test.sh +0 -37
  1151. data/node_modules/browserify/testling/tick.js +0 -9
  1152. data/node_modules/browserify/testling/timers.js +0 -50
  1153. data/node_modules/browserify/testling/util.js +0 -24
  1154. data/node_modules/browserify/v2.markdown +0 -41
  1155. data/node_modules/browserify/wrappers/alias.js +0 -1
  1156. data/node_modules/browserify/wrappers/body.js +0 -2
  1157. data/node_modules/browserify/wrappers/body_debug.js +0 -2
  1158. data/node_modules/browserify/wrappers/entry.js +0 -3
  1159. data/node_modules/browserify/wrappers/entry_debug.js +0 -3
  1160. data/node_modules/browserify/wrappers/package.js +0 -3
  1161. data/node_modules/browserify/wrappers/prelude.js +0 -196
  1162. data/node_modules/module-deps/index.js +0 -142
  1163. data/node_modules/module-deps/node_modules/browser-resolve/README.md +0 -14
  1164. data/node_modules/module-deps/node_modules/browser-resolve/builtin/assert.js +0 -314
  1165. data/node_modules/module-deps/node_modules/browser-resolve/builtin/child_process.js +0 -2
  1166. data/node_modules/module-deps/node_modules/browser-resolve/builtin/fs.js +0 -1
  1167. data/node_modules/module-deps/node_modules/browser-resolve/builtin/net.js +0 -1
  1168. data/node_modules/module-deps/node_modules/browser-resolve/builtin/path.js +0 -175
  1169. data/node_modules/module-deps/node_modules/browser-resolve/builtin/querystring.js +0 -250
  1170. data/node_modules/module-deps/node_modules/browser-resolve/builtin/stream.js +0 -119
  1171. data/node_modules/module-deps/node_modules/browser-resolve/builtin/string_decoder.js +0 -161
  1172. data/node_modules/module-deps/node_modules/browser-resolve/builtin/sys.js +0 -1
  1173. data/node_modules/module-deps/node_modules/browser-resolve/builtin/timers.js +0 -39
  1174. data/node_modules/module-deps/node_modules/browser-resolve/builtin/tls.js +0 -1
  1175. data/node_modules/module-deps/node_modules/browser-resolve/builtin/tty.js +0 -2
  1176. data/node_modules/module-deps/node_modules/browser-resolve/builtin/url.js +0 -604
  1177. data/node_modules/module-deps/node_modules/browser-resolve/builtin/util.js +0 -351
  1178. data/node_modules/module-deps/node_modules/browser-resolve/index.js +0 -144
  1179. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/buffer-browserify/README.md +0 -11
  1180. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/buffer-browserify/buffer_ieee754.js +0 -84
  1181. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/buffer-browserify/index.js +0 -1282
  1182. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/buffer-browserify/node_modules/base64-js/README.md +0 -14
  1183. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/buffer-browserify/node_modules/base64-js/lib/b64.js +0 -84
  1184. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/buffer-browserify/node_modules/base64-js/package.json +0 -26
  1185. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/buffer-browserify/node_modules/base64-js/test/runner.js +0 -50
  1186. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/buffer-browserify/package.json +0 -42
  1187. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/buffer-browserify/test/buffer.js +0 -121
  1188. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/console-browserify/README.md +0 -32
  1189. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/console-browserify/index.js +0 -85
  1190. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/console-browserify/package.json +0 -76
  1191. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/console-browserify/test/index.js +0 -67
  1192. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/console-browserify/test/static/index.html +0 -12
  1193. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/console-browserify/test/static/test-adapter.js +0 -53
  1194. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/crypto-browserify/example/bundle.js +0 -637
  1195. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/crypto-browserify/example/index.html +0 -12
  1196. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/crypto-browserify/example/test.js +0 -4
  1197. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/crypto-browserify/index.js +0 -74
  1198. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/crypto-browserify/md5.js +0 -384
  1199. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/crypto-browserify/package.json +0 -30
  1200. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/crypto-browserify/readme.markdown +0 -20
  1201. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/crypto-browserify/rng.js +0 -37
  1202. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/crypto-browserify/sha.js +0 -210
  1203. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/crypto-browserify/test/simple.js +0 -35
  1204. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/README.markdown +0 -128
  1205. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/get/index.html +0 -9
  1206. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/get/main.js +0 -14
  1207. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/get/server.js +0 -12
  1208. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/headers/index.html +0 -9
  1209. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/headers/main.js +0 -18
  1210. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/headers/server.js +0 -15
  1211. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/post/index.html +0 -9
  1212. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/post/main.js +0 -16
  1213. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/post/server.js +0 -19
  1214. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/streaming/index.html +0 -9
  1215. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/streaming/main.js +0 -16
  1216. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/streaming/server.js +0 -21
  1217. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/index.js +0 -59
  1218. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/lib/request.js +0 -122
  1219. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/lib/response.js +0 -119
  1220. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/node_modules/concat-stream/index.js +0 -48
  1221. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/node_modules/concat-stream/package.json +0 -29
  1222. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/node_modules/concat-stream/test.js +0 -34
  1223. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/package.json +0 -42
  1224. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/vm-browserify/README.markdown +0 -103
  1225. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/vm-browserify/example/run/bundle.js +0 -473
  1226. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/vm-browserify/example/run/entry.js +0 -6
  1227. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/vm-browserify/example/run/index.html +0 -9
  1228. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/vm-browserify/example/run/server.js +0 -6
  1229. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/vm-browserify/index.js +0 -85
  1230. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/vm-browserify/package.json +0 -39
  1231. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/vm-browserify/testling/run.js +0 -22
  1232. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/vm-browserify/testling/test.sh +0 -11
  1233. data/node_modules/module-deps/node_modules/browser-resolve/package.json +0 -38
  1234. data/node_modules/module-deps/node_modules/browser-resolve/test/core.js +0 -20
  1235. data/node_modules/module-deps/node_modules/detective/example/strings_src.js +0 -3
  1236. data/node_modules/module-deps/node_modules/detective/index.js +0 -62
  1237. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/Makefile.dryice.js +0 -165
  1238. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/README.md +0 -268
  1239. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/prefix-source-map.jsm +0 -20
  1240. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/prefix-utils.jsm +0 -18
  1241. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/suffix-source-map.jsm +0 -6
  1242. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/suffix-utils.jsm +0 -20
  1243. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/array-set.js +0 -107
  1244. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-consumer.js +0 -379
  1245. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-generator.js +0 -202
  1246. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/source-node.js +0 -199
  1247. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/util.js +0 -40
  1248. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/README.md +0 -119
  1249. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/amdefine.js +0 -299
  1250. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/package.json +0 -29
  1251. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/package.json +0 -38
  1252. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/run-tests.js +0 -72
  1253. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-consumer.js +0 -142
  1254. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-generator.js +0 -187
  1255. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-node.js +0 -163
  1256. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/util.js +0 -78
  1257. data/node_modules/module-deps/node_modules/detective/package.json +0 -36
  1258. data/node_modules/module-deps/node_modules/detective/readme.markdown +0 -70
  1259. data/node_modules/module-deps/node_modules/detective/test/both.js +0 -11
  1260. data/node_modules/module-deps/node_modules/detective/test/chained.js +0 -9
  1261. data/node_modules/module-deps/node_modules/detective/test/files/both.js +0 -4
  1262. data/node_modules/module-deps/node_modules/detective/test/files/chained.js +0 -5
  1263. data/node_modules/module-deps/node_modules/detective/test/files/nested.js +0 -22
  1264. data/node_modules/module-deps/node_modules/detective/test/files/strings.js +0 -13
  1265. data/node_modules/module-deps/node_modules/detective/test/files/word.js +0 -13
  1266. data/node_modules/module-deps/node_modules/detective/test/nested.js +0 -9
  1267. data/node_modules/module-deps/node_modules/detective/test/strings.js +0 -9
  1268. data/node_modules/module-deps/node_modules/detective/test/word.js +0 -12
  1269. data/node_modules/module-deps/node_modules/resolve/lib/async.js +0 -131
  1270. data/node_modules/module-deps/node_modules/resolve/lib/sync.js +0 -98
  1271. data/node_modules/module-deps/node_modules/resolve/package.json +0 -32
  1272. data/node_modules/module-deps/package.json +0 -47
  1273. data/node_modules/module-deps/readme.markdown +0 -128
  1274. data/node_modules/through/package.json +0 -35
  1275. data/node_modules/through/readme.markdown +0 -43
  1276. data/node_modules/through/test/buffering.js +0 -71
  1277. data/node_modules/through/test/end.js +0 -27
  1278. data/node_modules/through/test/index.js +0 -113
@@ -0,0 +1,3895 @@
1
+ /*
2
+ Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
3
+ Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be>
4
+ Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
5
+ Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com>
6
+ Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
7
+ Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com>
8
+ Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com>
9
+
10
+ Redistribution and use in source and binary forms, with or without
11
+ modification, are permitted provided that the following conditions are met:
12
+
13
+ * Redistributions of source code must retain the above copyright
14
+ notice, this list of conditions and the following disclaimer.
15
+ * Redistributions in binary form must reproduce the above copyright
16
+ notice, this list of conditions and the following disclaimer in the
17
+ documentation and/or other materials provided with the distribution.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
+ ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
23
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
+ */
30
+
31
+ /*jslint bitwise:true plusplus:true */
32
+ /*global esprima:true, define:true, exports:true, window: true,
33
+ throwError: true, createLiteral: true, generateStatement: true,
34
+ parseAssignmentExpression: true, parseBlock: true, parseExpression: true,
35
+ parseFunctionDeclaration: true, parseFunctionExpression: true,
36
+ parseFunctionSourceElements: true, parseVariableIdentifier: true,
37
+ parseLeftHandSideExpression: true,
38
+ parseStatement: true, parseSourceElement: true */
39
+
40
+ (function (root, factory) {
41
+ 'use strict';
42
+
43
+ // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js,
44
+ // Rhino, and plain browser loading.
45
+ if (typeof define === 'function' && define.amd) {
46
+ define(['exports'], factory);
47
+ } else if (typeof exports !== 'undefined') {
48
+ factory(exports);
49
+ } else {
50
+ factory((root.esprima = {}));
51
+ }
52
+ }(this, function (exports) {
53
+ 'use strict';
54
+
55
+ var Token,
56
+ TokenName,
57
+ Syntax,
58
+ PropertyKind,
59
+ Messages,
60
+ Regex,
61
+ source,
62
+ strict,
63
+ index,
64
+ lineNumber,
65
+ lineStart,
66
+ length,
67
+ buffer,
68
+ state,
69
+ extra;
70
+
71
+ Token = {
72
+ BooleanLiteral: 1,
73
+ EOF: 2,
74
+ Identifier: 3,
75
+ Keyword: 4,
76
+ NullLiteral: 5,
77
+ NumericLiteral: 6,
78
+ Punctuator: 7,
79
+ StringLiteral: 8
80
+ };
81
+
82
+ TokenName = {};
83
+ TokenName[Token.BooleanLiteral] = 'Boolean';
84
+ TokenName[Token.EOF] = '<end>';
85
+ TokenName[Token.Identifier] = 'Identifier';
86
+ TokenName[Token.Keyword] = 'Keyword';
87
+ TokenName[Token.NullLiteral] = 'Null';
88
+ TokenName[Token.NumericLiteral] = 'Numeric';
89
+ TokenName[Token.Punctuator] = 'Punctuator';
90
+ TokenName[Token.StringLiteral] = 'String';
91
+
92
+ Syntax = {
93
+ AssignmentExpression: 'AssignmentExpression',
94
+ ArrayExpression: 'ArrayExpression',
95
+ BlockStatement: 'BlockStatement',
96
+ BinaryExpression: 'BinaryExpression',
97
+ BreakStatement: 'BreakStatement',
98
+ CallExpression: 'CallExpression',
99
+ CatchClause: 'CatchClause',
100
+ ConditionalExpression: 'ConditionalExpression',
101
+ ContinueStatement: 'ContinueStatement',
102
+ DoWhileStatement: 'DoWhileStatement',
103
+ DebuggerStatement: 'DebuggerStatement',
104
+ EmptyStatement: 'EmptyStatement',
105
+ ExpressionStatement: 'ExpressionStatement',
106
+ ForStatement: 'ForStatement',
107
+ ForInStatement: 'ForInStatement',
108
+ FunctionDeclaration: 'FunctionDeclaration',
109
+ FunctionExpression: 'FunctionExpression',
110
+ Identifier: 'Identifier',
111
+ IfStatement: 'IfStatement',
112
+ Literal: 'Literal',
113
+ LabeledStatement: 'LabeledStatement',
114
+ LogicalExpression: 'LogicalExpression',
115
+ MemberExpression: 'MemberExpression',
116
+ NewExpression: 'NewExpression',
117
+ ObjectExpression: 'ObjectExpression',
118
+ Program: 'Program',
119
+ Property: 'Property',
120
+ ReturnStatement: 'ReturnStatement',
121
+ SequenceExpression: 'SequenceExpression',
122
+ SwitchStatement: 'SwitchStatement',
123
+ SwitchCase: 'SwitchCase',
124
+ ThisExpression: 'ThisExpression',
125
+ ThrowStatement: 'ThrowStatement',
126
+ TryStatement: 'TryStatement',
127
+ UnaryExpression: 'UnaryExpression',
128
+ UpdateExpression: 'UpdateExpression',
129
+ VariableDeclaration: 'VariableDeclaration',
130
+ VariableDeclarator: 'VariableDeclarator',
131
+ WhileStatement: 'WhileStatement',
132
+ WithStatement: 'WithStatement'
133
+ };
134
+
135
+ PropertyKind = {
136
+ Data: 1,
137
+ Get: 2,
138
+ Set: 4
139
+ };
140
+
141
+ // Error messages should be identical to V8.
142
+ Messages = {
143
+ UnexpectedToken: 'Unexpected token %0',
144
+ UnexpectedNumber: 'Unexpected number',
145
+ UnexpectedString: 'Unexpected string',
146
+ UnexpectedIdentifier: 'Unexpected identifier',
147
+ UnexpectedReserved: 'Unexpected reserved word',
148
+ UnexpectedEOS: 'Unexpected end of input',
149
+ NewlineAfterThrow: 'Illegal newline after throw',
150
+ InvalidRegExp: 'Invalid regular expression',
151
+ UnterminatedRegExp: 'Invalid regular expression: missing /',
152
+ InvalidLHSInAssignment: 'Invalid left-hand side in assignment',
153
+ InvalidLHSInForIn: 'Invalid left-hand side in for-in',
154
+ MultipleDefaultsInSwitch: 'More than one default clause in switch statement',
155
+ NoCatchOrFinally: 'Missing catch or finally after try',
156
+ UnknownLabel: 'Undefined label \'%0\'',
157
+ Redeclaration: '%0 \'%1\' has already been declared',
158
+ IllegalContinue: 'Illegal continue statement',
159
+ IllegalBreak: 'Illegal break statement',
160
+ IllegalReturn: 'Illegal return statement',
161
+ StrictModeWith: 'Strict mode code may not include a with statement',
162
+ StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode',
163
+ StrictVarName: 'Variable name may not be eval or arguments in strict mode',
164
+ StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode',
165
+ StrictParamDupe: 'Strict mode function may not have duplicate parameter names',
166
+ StrictFunctionName: 'Function name may not be eval or arguments in strict mode',
167
+ StrictOctalLiteral: 'Octal literals are not allowed in strict mode.',
168
+ StrictDelete: 'Delete of an unqualified identifier in strict mode.',
169
+ StrictDuplicateProperty: 'Duplicate data property in object literal not allowed in strict mode',
170
+ AccessorDataProperty: 'Object literal may not have data and accessor property with the same name',
171
+ AccessorGetSet: 'Object literal may not have multiple get/set accessors with the same name',
172
+ StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode',
173
+ StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode',
174
+ StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode',
175
+ StrictReservedWord: 'Use of future reserved word in strict mode'
176
+ };
177
+
178
+ // See also tools/generate-unicode-regex.py.
179
+ Regex = {
180
+ NonAsciiIdentifierStart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]'),
181
+ NonAsciiIdentifierPart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0\u08a2-\u08ac\u08e4-\u08fe\u0900-\u0963\u0966-\u096f\u0971-\u0977\u0979-\u097f\u0981-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d02\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191c\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1d00-\u1de6\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua697\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a\uaa7b\uaa80-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]')
182
+ };
183
+
184
+ // Ensure the condition is true, otherwise throw an error.
185
+ // This is only to have a better contract semantic, i.e. another safety net
186
+ // to catch a logic error. The condition shall be fulfilled in normal case.
187
+ // Do NOT use this to enforce a certain condition on any user input.
188
+
189
+ function assert(condition, message) {
190
+ if (!condition) {
191
+ throw new Error('ASSERT: ' + message);
192
+ }
193
+ }
194
+
195
+ function sliceSource(from, to) {
196
+ return source.slice(from, to);
197
+ }
198
+
199
+ if (typeof 'esprima'[0] === 'undefined') {
200
+ sliceSource = function sliceArraySource(from, to) {
201
+ return source.slice(from, to).join('');
202
+ };
203
+ }
204
+
205
+ function isDecimalDigit(ch) {
206
+ return '0123456789'.indexOf(ch) >= 0;
207
+ }
208
+
209
+ function isHexDigit(ch) {
210
+ return '0123456789abcdefABCDEF'.indexOf(ch) >= 0;
211
+ }
212
+
213
+ function isOctalDigit(ch) {
214
+ return '01234567'.indexOf(ch) >= 0;
215
+ }
216
+
217
+
218
+ // 7.2 White Space
219
+
220
+ function isWhiteSpace(ch) {
221
+ return (ch === ' ') || (ch === '\u0009') || (ch === '\u000B') ||
222
+ (ch === '\u000C') || (ch === '\u00A0') ||
223
+ (ch.charCodeAt(0) >= 0x1680 &&
224
+ '\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\uFEFF'.indexOf(ch) >= 0);
225
+ }
226
+
227
+ // 7.3 Line Terminators
228
+
229
+ function isLineTerminator(ch) {
230
+ return (ch === '\n' || ch === '\r' || ch === '\u2028' || ch === '\u2029');
231
+ }
232
+
233
+ // 7.6 Identifier Names and Identifiers
234
+
235
+ function isIdentifierStart(ch) {
236
+ return (ch === '$') || (ch === '_') || (ch === '\\') ||
237
+ (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') ||
238
+ ((ch.charCodeAt(0) >= 0x80) && Regex.NonAsciiIdentifierStart.test(ch));
239
+ }
240
+
241
+ function isIdentifierPart(ch) {
242
+ return (ch === '$') || (ch === '_') || (ch === '\\') ||
243
+ (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') ||
244
+ ((ch >= '0') && (ch <= '9')) ||
245
+ ((ch.charCodeAt(0) >= 0x80) && Regex.NonAsciiIdentifierPart.test(ch));
246
+ }
247
+
248
+ // 7.6.1.2 Future Reserved Words
249
+
250
+ function isFutureReservedWord(id) {
251
+ switch (id) {
252
+
253
+ // Future reserved words.
254
+ case 'class':
255
+ case 'enum':
256
+ case 'export':
257
+ case 'extends':
258
+ case 'import':
259
+ case 'super':
260
+ return true;
261
+ }
262
+
263
+ return false;
264
+ }
265
+
266
+ function isStrictModeReservedWord(id) {
267
+ switch (id) {
268
+
269
+ // Strict Mode reserved words.
270
+ case 'implements':
271
+ case 'interface':
272
+ case 'package':
273
+ case 'private':
274
+ case 'protected':
275
+ case 'public':
276
+ case 'static':
277
+ case 'yield':
278
+ case 'let':
279
+ return true;
280
+ }
281
+
282
+ return false;
283
+ }
284
+
285
+ function isRestrictedWord(id) {
286
+ return id === 'eval' || id === 'arguments';
287
+ }
288
+
289
+ // 7.6.1.1 Keywords
290
+
291
+ function isKeyword(id) {
292
+ var keyword = false;
293
+ switch (id.length) {
294
+ case 2:
295
+ keyword = (id === 'if') || (id === 'in') || (id === 'do');
296
+ break;
297
+ case 3:
298
+ keyword = (id === 'var') || (id === 'for') || (id === 'new') || (id === 'try');
299
+ break;
300
+ case 4:
301
+ keyword = (id === 'this') || (id === 'else') || (id === 'case') || (id === 'void') || (id === 'with');
302
+ break;
303
+ case 5:
304
+ keyword = (id === 'while') || (id === 'break') || (id === 'catch') || (id === 'throw');
305
+ break;
306
+ case 6:
307
+ keyword = (id === 'return') || (id === 'typeof') || (id === 'delete') || (id === 'switch');
308
+ break;
309
+ case 7:
310
+ keyword = (id === 'default') || (id === 'finally');
311
+ break;
312
+ case 8:
313
+ keyword = (id === 'function') || (id === 'continue') || (id === 'debugger');
314
+ break;
315
+ case 10:
316
+ keyword = (id === 'instanceof');
317
+ break;
318
+ }
319
+
320
+ if (keyword) {
321
+ return true;
322
+ }
323
+
324
+ switch (id) {
325
+ // Future reserved words.
326
+ // 'const' is specialized as Keyword in V8.
327
+ case 'const':
328
+ return true;
329
+
330
+ // For compatiblity to SpiderMonkey and ES.next
331
+ case 'yield':
332
+ case 'let':
333
+ return true;
334
+ }
335
+
336
+ if (strict && isStrictModeReservedWord(id)) {
337
+ return true;
338
+ }
339
+
340
+ return isFutureReservedWord(id);
341
+ }
342
+
343
+ // 7.4 Comments
344
+
345
+ function skipComment() {
346
+ var ch, blockComment, lineComment;
347
+
348
+ blockComment = false;
349
+ lineComment = false;
350
+
351
+ while (index < length) {
352
+ ch = source[index];
353
+
354
+ if (lineComment) {
355
+ ch = source[index++];
356
+ if (isLineTerminator(ch)) {
357
+ lineComment = false;
358
+ if (ch === '\r' && source[index] === '\n') {
359
+ ++index;
360
+ }
361
+ ++lineNumber;
362
+ lineStart = index;
363
+ }
364
+ } else if (blockComment) {
365
+ if (isLineTerminator(ch)) {
366
+ if (ch === '\r' && source[index + 1] === '\n') {
367
+ ++index;
368
+ }
369
+ ++lineNumber;
370
+ ++index;
371
+ lineStart = index;
372
+ if (index >= length) {
373
+ throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
374
+ }
375
+ } else {
376
+ ch = source[index++];
377
+ if (index >= length) {
378
+ throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
379
+ }
380
+ if (ch === '*') {
381
+ ch = source[index];
382
+ if (ch === '/') {
383
+ ++index;
384
+ blockComment = false;
385
+ }
386
+ }
387
+ }
388
+ } else if (ch === '/') {
389
+ ch = source[index + 1];
390
+ if (ch === '/') {
391
+ index += 2;
392
+ lineComment = true;
393
+ } else if (ch === '*') {
394
+ index += 2;
395
+ blockComment = true;
396
+ if (index >= length) {
397
+ throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
398
+ }
399
+ } else {
400
+ break;
401
+ }
402
+ } else if (isWhiteSpace(ch)) {
403
+ ++index;
404
+ } else if (isLineTerminator(ch)) {
405
+ ++index;
406
+ if (ch === '\r' && source[index] === '\n') {
407
+ ++index;
408
+ }
409
+ ++lineNumber;
410
+ lineStart = index;
411
+ } else {
412
+ break;
413
+ }
414
+ }
415
+ }
416
+
417
+ function scanHexEscape(prefix) {
418
+ var i, len, ch, code = 0;
419
+
420
+ len = (prefix === 'u') ? 4 : 2;
421
+ for (i = 0; i < len; ++i) {
422
+ if (index < length && isHexDigit(source[index])) {
423
+ ch = source[index++];
424
+ code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase());
425
+ } else {
426
+ return '';
427
+ }
428
+ }
429
+ return String.fromCharCode(code);
430
+ }
431
+
432
+ function scanIdentifier() {
433
+ var ch, start, id, restore;
434
+
435
+ ch = source[index];
436
+ if (!isIdentifierStart(ch)) {
437
+ return;
438
+ }
439
+
440
+ start = index;
441
+ if (ch === '\\') {
442
+ ++index;
443
+ if (source[index] !== 'u') {
444
+ return;
445
+ }
446
+ ++index;
447
+ restore = index;
448
+ ch = scanHexEscape('u');
449
+ if (ch) {
450
+ if (ch === '\\' || !isIdentifierStart(ch)) {
451
+ return;
452
+ }
453
+ id = ch;
454
+ } else {
455
+ index = restore;
456
+ id = 'u';
457
+ }
458
+ } else {
459
+ id = source[index++];
460
+ }
461
+
462
+ while (index < length) {
463
+ ch = source[index];
464
+ if (!isIdentifierPart(ch)) {
465
+ break;
466
+ }
467
+ if (ch === '\\') {
468
+ ++index;
469
+ if (source[index] !== 'u') {
470
+ return;
471
+ }
472
+ ++index;
473
+ restore = index;
474
+ ch = scanHexEscape('u');
475
+ if (ch) {
476
+ if (ch === '\\' || !isIdentifierPart(ch)) {
477
+ return;
478
+ }
479
+ id += ch;
480
+ } else {
481
+ index = restore;
482
+ id += 'u';
483
+ }
484
+ } else {
485
+ id += source[index++];
486
+ }
487
+ }
488
+
489
+ // There is no keyword or literal with only one character.
490
+ // Thus, it must be an identifier.
491
+ if (id.length === 1) {
492
+ return {
493
+ type: Token.Identifier,
494
+ value: id,
495
+ lineNumber: lineNumber,
496
+ lineStart: lineStart,
497
+ range: [start, index]
498
+ };
499
+ }
500
+
501
+ if (isKeyword(id)) {
502
+ return {
503
+ type: Token.Keyword,
504
+ value: id,
505
+ lineNumber: lineNumber,
506
+ lineStart: lineStart,
507
+ range: [start, index]
508
+ };
509
+ }
510
+
511
+ // 7.8.1 Null Literals
512
+
513
+ if (id === 'null') {
514
+ return {
515
+ type: Token.NullLiteral,
516
+ value: id,
517
+ lineNumber: lineNumber,
518
+ lineStart: lineStart,
519
+ range: [start, index]
520
+ };
521
+ }
522
+
523
+ // 7.8.2 Boolean Literals
524
+
525
+ if (id === 'true' || id === 'false') {
526
+ return {
527
+ type: Token.BooleanLiteral,
528
+ value: id,
529
+ lineNumber: lineNumber,
530
+ lineStart: lineStart,
531
+ range: [start, index]
532
+ };
533
+ }
534
+
535
+ return {
536
+ type: Token.Identifier,
537
+ value: id,
538
+ lineNumber: lineNumber,
539
+ lineStart: lineStart,
540
+ range: [start, index]
541
+ };
542
+ }
543
+
544
+ // 7.7 Punctuators
545
+
546
+ function scanPunctuator() {
547
+ var start = index,
548
+ ch1 = source[index],
549
+ ch2,
550
+ ch3,
551
+ ch4;
552
+
553
+ // Check for most common single-character punctuators.
554
+
555
+ if (ch1 === ';' || ch1 === '{' || ch1 === '}') {
556
+ ++index;
557
+ return {
558
+ type: Token.Punctuator,
559
+ value: ch1,
560
+ lineNumber: lineNumber,
561
+ lineStart: lineStart,
562
+ range: [start, index]
563
+ };
564
+ }
565
+
566
+ if (ch1 === ',' || ch1 === '(' || ch1 === ')') {
567
+ ++index;
568
+ return {
569
+ type: Token.Punctuator,
570
+ value: ch1,
571
+ lineNumber: lineNumber,
572
+ lineStart: lineStart,
573
+ range: [start, index]
574
+ };
575
+ }
576
+
577
+ // Dot (.) can also start a floating-point number, hence the need
578
+ // to check the next character.
579
+
580
+ ch2 = source[index + 1];
581
+ if (ch1 === '.' && !isDecimalDigit(ch2)) {
582
+ return {
583
+ type: Token.Punctuator,
584
+ value: source[index++],
585
+ lineNumber: lineNumber,
586
+ lineStart: lineStart,
587
+ range: [start, index]
588
+ };
589
+ }
590
+
591
+ // Peek more characters.
592
+
593
+ ch3 = source[index + 2];
594
+ ch4 = source[index + 3];
595
+
596
+ // 4-character punctuator: >>>=
597
+
598
+ if (ch1 === '>' && ch2 === '>' && ch3 === '>') {
599
+ if (ch4 === '=') {
600
+ index += 4;
601
+ return {
602
+ type: Token.Punctuator,
603
+ value: '>>>=',
604
+ lineNumber: lineNumber,
605
+ lineStart: lineStart,
606
+ range: [start, index]
607
+ };
608
+ }
609
+ }
610
+
611
+ // 3-character punctuators: === !== >>> <<= >>=
612
+
613
+ if (ch1 === '=' && ch2 === '=' && ch3 === '=') {
614
+ index += 3;
615
+ return {
616
+ type: Token.Punctuator,
617
+ value: '===',
618
+ lineNumber: lineNumber,
619
+ lineStart: lineStart,
620
+ range: [start, index]
621
+ };
622
+ }
623
+
624
+ if (ch1 === '!' && ch2 === '=' && ch3 === '=') {
625
+ index += 3;
626
+ return {
627
+ type: Token.Punctuator,
628
+ value: '!==',
629
+ lineNumber: lineNumber,
630
+ lineStart: lineStart,
631
+ range: [start, index]
632
+ };
633
+ }
634
+
635
+ if (ch1 === '>' && ch2 === '>' && ch3 === '>') {
636
+ index += 3;
637
+ return {
638
+ type: Token.Punctuator,
639
+ value: '>>>',
640
+ lineNumber: lineNumber,
641
+ lineStart: lineStart,
642
+ range: [start, index]
643
+ };
644
+ }
645
+
646
+ if (ch1 === '<' && ch2 === '<' && ch3 === '=') {
647
+ index += 3;
648
+ return {
649
+ type: Token.Punctuator,
650
+ value: '<<=',
651
+ lineNumber: lineNumber,
652
+ lineStart: lineStart,
653
+ range: [start, index]
654
+ };
655
+ }
656
+
657
+ if (ch1 === '>' && ch2 === '>' && ch3 === '=') {
658
+ index += 3;
659
+ return {
660
+ type: Token.Punctuator,
661
+ value: '>>=',
662
+ lineNumber: lineNumber,
663
+ lineStart: lineStart,
664
+ range: [start, index]
665
+ };
666
+ }
667
+
668
+ // 2-character punctuators: <= >= == != ++ -- << >> && ||
669
+ // += -= *= %= &= |= ^= /=
670
+
671
+ if (ch2 === '=') {
672
+ if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) {
673
+ index += 2;
674
+ return {
675
+ type: Token.Punctuator,
676
+ value: ch1 + ch2,
677
+ lineNumber: lineNumber,
678
+ lineStart: lineStart,
679
+ range: [start, index]
680
+ };
681
+ }
682
+ }
683
+
684
+ if (ch1 === ch2 && ('+-<>&|'.indexOf(ch1) >= 0)) {
685
+ if ('+-<>&|'.indexOf(ch2) >= 0) {
686
+ index += 2;
687
+ return {
688
+ type: Token.Punctuator,
689
+ value: ch1 + ch2,
690
+ lineNumber: lineNumber,
691
+ lineStart: lineStart,
692
+ range: [start, index]
693
+ };
694
+ }
695
+ }
696
+
697
+ // The remaining 1-character punctuators.
698
+
699
+ if ('[]<>+-*%&|^!~?:=/'.indexOf(ch1) >= 0) {
700
+ return {
701
+ type: Token.Punctuator,
702
+ value: source[index++],
703
+ lineNumber: lineNumber,
704
+ lineStart: lineStart,
705
+ range: [start, index]
706
+ };
707
+ }
708
+ }
709
+
710
+ // 7.8.3 Numeric Literals
711
+
712
+ function scanNumericLiteral() {
713
+ var number, start, ch;
714
+
715
+ ch = source[index];
716
+ assert(isDecimalDigit(ch) || (ch === '.'),
717
+ 'Numeric literal must start with a decimal digit or a decimal point');
718
+
719
+ start = index;
720
+ number = '';
721
+ if (ch !== '.') {
722
+ number = source[index++];
723
+ ch = source[index];
724
+
725
+ // Hex number starts with '0x'.
726
+ // Octal number starts with '0'.
727
+ if (number === '0') {
728
+ if (ch === 'x' || ch === 'X') {
729
+ number += source[index++];
730
+ while (index < length) {
731
+ ch = source[index];
732
+ if (!isHexDigit(ch)) {
733
+ break;
734
+ }
735
+ number += source[index++];
736
+ }
737
+
738
+ if (number.length <= 2) {
739
+ // only 0x
740
+ throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
741
+ }
742
+
743
+ if (index < length) {
744
+ ch = source[index];
745
+ if (isIdentifierStart(ch)) {
746
+ throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
747
+ }
748
+ }
749
+ return {
750
+ type: Token.NumericLiteral,
751
+ value: parseInt(number, 16),
752
+ lineNumber: lineNumber,
753
+ lineStart: lineStart,
754
+ range: [start, index]
755
+ };
756
+ } else if (isOctalDigit(ch)) {
757
+ number += source[index++];
758
+ while (index < length) {
759
+ ch = source[index];
760
+ if (!isOctalDigit(ch)) {
761
+ break;
762
+ }
763
+ number += source[index++];
764
+ }
765
+
766
+ if (index < length) {
767
+ ch = source[index];
768
+ if (isIdentifierStart(ch) || isDecimalDigit(ch)) {
769
+ throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
770
+ }
771
+ }
772
+ return {
773
+ type: Token.NumericLiteral,
774
+ value: parseInt(number, 8),
775
+ octal: true,
776
+ lineNumber: lineNumber,
777
+ lineStart: lineStart,
778
+ range: [start, index]
779
+ };
780
+ }
781
+
782
+ // decimal number starts with '0' such as '09' is illegal.
783
+ if (isDecimalDigit(ch)) {
784
+ throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
785
+ }
786
+ }
787
+
788
+ while (index < length) {
789
+ ch = source[index];
790
+ if (!isDecimalDigit(ch)) {
791
+ break;
792
+ }
793
+ number += source[index++];
794
+ }
795
+ }
796
+
797
+ if (ch === '.') {
798
+ number += source[index++];
799
+ while (index < length) {
800
+ ch = source[index];
801
+ if (!isDecimalDigit(ch)) {
802
+ break;
803
+ }
804
+ number += source[index++];
805
+ }
806
+ }
807
+
808
+ if (ch === 'e' || ch === 'E') {
809
+ number += source[index++];
810
+
811
+ ch = source[index];
812
+ if (ch === '+' || ch === '-') {
813
+ number += source[index++];
814
+ }
815
+
816
+ ch = source[index];
817
+ if (isDecimalDigit(ch)) {
818
+ number += source[index++];
819
+ while (index < length) {
820
+ ch = source[index];
821
+ if (!isDecimalDigit(ch)) {
822
+ break;
823
+ }
824
+ number += source[index++];
825
+ }
826
+ } else {
827
+ ch = 'character ' + ch;
828
+ if (index >= length) {
829
+ ch = '<end>';
830
+ }
831
+ throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
832
+ }
833
+ }
834
+
835
+ if (index < length) {
836
+ ch = source[index];
837
+ if (isIdentifierStart(ch)) {
838
+ throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
839
+ }
840
+ }
841
+
842
+ return {
843
+ type: Token.NumericLiteral,
844
+ value: parseFloat(number),
845
+ lineNumber: lineNumber,
846
+ lineStart: lineStart,
847
+ range: [start, index]
848
+ };
849
+ }
850
+
851
+ // 7.8.4 String Literals
852
+
853
+ function scanStringLiteral() {
854
+ var str = '', quote, start, ch, code, unescaped, restore, octal = false;
855
+
856
+ quote = source[index];
857
+ assert((quote === '\'' || quote === '"'),
858
+ 'String literal must starts with a quote');
859
+
860
+ start = index;
861
+ ++index;
862
+
863
+ while (index < length) {
864
+ ch = source[index++];
865
+
866
+ if (ch === quote) {
867
+ quote = '';
868
+ break;
869
+ } else if (ch === '\\') {
870
+ ch = source[index++];
871
+ if (!isLineTerminator(ch)) {
872
+ switch (ch) {
873
+ case 'n':
874
+ str += '\n';
875
+ break;
876
+ case 'r':
877
+ str += '\r';
878
+ break;
879
+ case 't':
880
+ str += '\t';
881
+ break;
882
+ case 'u':
883
+ case 'x':
884
+ restore = index;
885
+ unescaped = scanHexEscape(ch);
886
+ if (unescaped) {
887
+ str += unescaped;
888
+ } else {
889
+ index = restore;
890
+ str += ch;
891
+ }
892
+ break;
893
+ case 'b':
894
+ str += '\b';
895
+ break;
896
+ case 'f':
897
+ str += '\f';
898
+ break;
899
+ case 'v':
900
+ str += '\v';
901
+ break;
902
+
903
+ default:
904
+ if (isOctalDigit(ch)) {
905
+ code = '01234567'.indexOf(ch);
906
+
907
+ // \0 is not octal escape sequence
908
+ if (code !== 0) {
909
+ octal = true;
910
+ }
911
+
912
+ if (index < length && isOctalDigit(source[index])) {
913
+ octal = true;
914
+ code = code * 8 + '01234567'.indexOf(source[index++]);
915
+
916
+ // 3 digits are only allowed when string starts
917
+ // with 0, 1, 2, 3
918
+ if ('0123'.indexOf(ch) >= 0 &&
919
+ index < length &&
920
+ isOctalDigit(source[index])) {
921
+ code = code * 8 + '01234567'.indexOf(source[index++]);
922
+ }
923
+ }
924
+ str += String.fromCharCode(code);
925
+ } else {
926
+ str += ch;
927
+ }
928
+ break;
929
+ }
930
+ } else {
931
+ ++lineNumber;
932
+ if (ch === '\r' && source[index] === '\n') {
933
+ ++index;
934
+ }
935
+ }
936
+ } else if (isLineTerminator(ch)) {
937
+ break;
938
+ } else {
939
+ str += ch;
940
+ }
941
+ }
942
+
943
+ if (quote !== '') {
944
+ throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
945
+ }
946
+
947
+ return {
948
+ type: Token.StringLiteral,
949
+ value: str,
950
+ octal: octal,
951
+ lineNumber: lineNumber,
952
+ lineStart: lineStart,
953
+ range: [start, index]
954
+ };
955
+ }
956
+
957
+ function scanRegExp() {
958
+ var str, ch, start, pattern, flags, value, classMarker = false, restore, terminated = false;
959
+
960
+ buffer = null;
961
+ skipComment();
962
+
963
+ start = index;
964
+ ch = source[index];
965
+ assert(ch === '/', 'Regular expression literal must start with a slash');
966
+ str = source[index++];
967
+
968
+ while (index < length) {
969
+ ch = source[index++];
970
+ str += ch;
971
+ if (classMarker) {
972
+ if (ch === ']') {
973
+ classMarker = false;
974
+ }
975
+ } else {
976
+ if (ch === '\\') {
977
+ ch = source[index++];
978
+ // ECMA-262 7.8.5
979
+ if (isLineTerminator(ch)) {
980
+ throwError({}, Messages.UnterminatedRegExp);
981
+ }
982
+ str += ch;
983
+ } else if (ch === '/') {
984
+ terminated = true;
985
+ break;
986
+ } else if (ch === '[') {
987
+ classMarker = true;
988
+ } else if (isLineTerminator(ch)) {
989
+ throwError({}, Messages.UnterminatedRegExp);
990
+ }
991
+ }
992
+ }
993
+
994
+ if (!terminated) {
995
+ throwError({}, Messages.UnterminatedRegExp);
996
+ }
997
+
998
+ // Exclude leading and trailing slash.
999
+ pattern = str.substr(1, str.length - 2);
1000
+
1001
+ flags = '';
1002
+ while (index < length) {
1003
+ ch = source[index];
1004
+ if (!isIdentifierPart(ch)) {
1005
+ break;
1006
+ }
1007
+
1008
+ ++index;
1009
+ if (ch === '\\' && index < length) {
1010
+ ch = source[index];
1011
+ if (ch === 'u') {
1012
+ ++index;
1013
+ restore = index;
1014
+ ch = scanHexEscape('u');
1015
+ if (ch) {
1016
+ flags += ch;
1017
+ str += '\\u';
1018
+ for (; restore < index; ++restore) {
1019
+ str += source[restore];
1020
+ }
1021
+ } else {
1022
+ index = restore;
1023
+ flags += 'u';
1024
+ str += '\\u';
1025
+ }
1026
+ } else {
1027
+ str += '\\';
1028
+ }
1029
+ } else {
1030
+ flags += ch;
1031
+ str += ch;
1032
+ }
1033
+ }
1034
+
1035
+ try {
1036
+ value = new RegExp(pattern, flags);
1037
+ } catch (e) {
1038
+ throwError({}, Messages.InvalidRegExp);
1039
+ }
1040
+
1041
+ return {
1042
+ literal: str,
1043
+ value: value,
1044
+ range: [start, index]
1045
+ };
1046
+ }
1047
+
1048
+ function isIdentifierName(token) {
1049
+ return token.type === Token.Identifier ||
1050
+ token.type === Token.Keyword ||
1051
+ token.type === Token.BooleanLiteral ||
1052
+ token.type === Token.NullLiteral;
1053
+ }
1054
+
1055
+ function advance() {
1056
+ var ch, token;
1057
+
1058
+ skipComment();
1059
+
1060
+ if (index >= length) {
1061
+ return {
1062
+ type: Token.EOF,
1063
+ lineNumber: lineNumber,
1064
+ lineStart: lineStart,
1065
+ range: [index, index]
1066
+ };
1067
+ }
1068
+
1069
+ token = scanPunctuator();
1070
+ if (typeof token !== 'undefined') {
1071
+ return token;
1072
+ }
1073
+
1074
+ ch = source[index];
1075
+
1076
+ if (ch === '\'' || ch === '"') {
1077
+ return scanStringLiteral();
1078
+ }
1079
+
1080
+ if (ch === '.' || isDecimalDigit(ch)) {
1081
+ return scanNumericLiteral();
1082
+ }
1083
+
1084
+ token = scanIdentifier();
1085
+ if (typeof token !== 'undefined') {
1086
+ return token;
1087
+ }
1088
+
1089
+ throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
1090
+ }
1091
+
1092
+ function lex() {
1093
+ var token;
1094
+
1095
+ if (buffer) {
1096
+ index = buffer.range[1];
1097
+ lineNumber = buffer.lineNumber;
1098
+ lineStart = buffer.lineStart;
1099
+ token = buffer;
1100
+ buffer = null;
1101
+ return token;
1102
+ }
1103
+
1104
+ buffer = null;
1105
+ return advance();
1106
+ }
1107
+
1108
+ function lookahead() {
1109
+ var pos, line, start;
1110
+
1111
+ if (buffer !== null) {
1112
+ return buffer;
1113
+ }
1114
+
1115
+ pos = index;
1116
+ line = lineNumber;
1117
+ start = lineStart;
1118
+ buffer = advance();
1119
+ index = pos;
1120
+ lineNumber = line;
1121
+ lineStart = start;
1122
+
1123
+ return buffer;
1124
+ }
1125
+
1126
+ // Return true if there is a line terminator before the next token.
1127
+
1128
+ function peekLineTerminator() {
1129
+ var pos, line, start, found;
1130
+
1131
+ pos = index;
1132
+ line = lineNumber;
1133
+ start = lineStart;
1134
+ skipComment();
1135
+ found = lineNumber !== line;
1136
+ index = pos;
1137
+ lineNumber = line;
1138
+ lineStart = start;
1139
+
1140
+ return found;
1141
+ }
1142
+
1143
+ // Throw an exception
1144
+
1145
+ function throwError(token, messageFormat) {
1146
+ var error,
1147
+ args = Array.prototype.slice.call(arguments, 2),
1148
+ msg = messageFormat.replace(
1149
+ /%(\d)/g,
1150
+ function (whole, index) {
1151
+ return args[index] || '';
1152
+ }
1153
+ );
1154
+
1155
+ if (typeof token.lineNumber === 'number') {
1156
+ error = new Error('Line ' + token.lineNumber + ': ' + msg);
1157
+ error.index = token.range[0];
1158
+ error.lineNumber = token.lineNumber;
1159
+ error.column = token.range[0] - lineStart + 1;
1160
+ } else {
1161
+ error = new Error('Line ' + lineNumber + ': ' + msg);
1162
+ error.index = index;
1163
+ error.lineNumber = lineNumber;
1164
+ error.column = index - lineStart + 1;
1165
+ }
1166
+
1167
+ throw error;
1168
+ }
1169
+
1170
+ function throwErrorTolerant() {
1171
+ try {
1172
+ throwError.apply(null, arguments);
1173
+ } catch (e) {
1174
+ if (extra.errors) {
1175
+ extra.errors.push(e);
1176
+ } else {
1177
+ throw e;
1178
+ }
1179
+ }
1180
+ }
1181
+
1182
+
1183
+ // Throw an exception because of the token.
1184
+
1185
+ function throwUnexpected(token) {
1186
+ if (token.type === Token.EOF) {
1187
+ throwError(token, Messages.UnexpectedEOS);
1188
+ }
1189
+
1190
+ if (token.type === Token.NumericLiteral) {
1191
+ throwError(token, Messages.UnexpectedNumber);
1192
+ }
1193
+
1194
+ if (token.type === Token.StringLiteral) {
1195
+ throwError(token, Messages.UnexpectedString);
1196
+ }
1197
+
1198
+ if (token.type === Token.Identifier) {
1199
+ throwError(token, Messages.UnexpectedIdentifier);
1200
+ }
1201
+
1202
+ if (token.type === Token.Keyword) {
1203
+ if (isFutureReservedWord(token.value)) {
1204
+ throwError(token, Messages.UnexpectedReserved);
1205
+ } else if (strict && isStrictModeReservedWord(token.value)) {
1206
+ throwErrorTolerant(token, Messages.StrictReservedWord);
1207
+ return;
1208
+ }
1209
+ throwError(token, Messages.UnexpectedToken, token.value);
1210
+ }
1211
+
1212
+ // BooleanLiteral, NullLiteral, or Punctuator.
1213
+ throwError(token, Messages.UnexpectedToken, token.value);
1214
+ }
1215
+
1216
+ // Expect the next token to match the specified punctuator.
1217
+ // If not, an exception will be thrown.
1218
+
1219
+ function expect(value) {
1220
+ var token = lex();
1221
+ if (token.type !== Token.Punctuator || token.value !== value) {
1222
+ throwUnexpected(token);
1223
+ }
1224
+ }
1225
+
1226
+ // Expect the next token to match the specified keyword.
1227
+ // If not, an exception will be thrown.
1228
+
1229
+ function expectKeyword(keyword) {
1230
+ var token = lex();
1231
+ if (token.type !== Token.Keyword || token.value !== keyword) {
1232
+ throwUnexpected(token);
1233
+ }
1234
+ }
1235
+
1236
+ // Return true if the next token matches the specified punctuator.
1237
+
1238
+ function match(value) {
1239
+ var token = lookahead();
1240
+ return token.type === Token.Punctuator && token.value === value;
1241
+ }
1242
+
1243
+ // Return true if the next token matches the specified keyword
1244
+
1245
+ function matchKeyword(keyword) {
1246
+ var token = lookahead();
1247
+ return token.type === Token.Keyword && token.value === keyword;
1248
+ }
1249
+
1250
+ // Return true if the next token is an assignment operator
1251
+
1252
+ function matchAssign() {
1253
+ var token = lookahead(),
1254
+ op = token.value;
1255
+
1256
+ if (token.type !== Token.Punctuator) {
1257
+ return false;
1258
+ }
1259
+ return op === '=' ||
1260
+ op === '*=' ||
1261
+ op === '/=' ||
1262
+ op === '%=' ||
1263
+ op === '+=' ||
1264
+ op === '-=' ||
1265
+ op === '<<=' ||
1266
+ op === '>>=' ||
1267
+ op === '>>>=' ||
1268
+ op === '&=' ||
1269
+ op === '^=' ||
1270
+ op === '|=';
1271
+ }
1272
+
1273
+ function consumeSemicolon() {
1274
+ var token, line;
1275
+
1276
+ // Catch the very common case first.
1277
+ if (source[index] === ';') {
1278
+ lex();
1279
+ return;
1280
+ }
1281
+
1282
+ line = lineNumber;
1283
+ skipComment();
1284
+ if (lineNumber !== line) {
1285
+ return;
1286
+ }
1287
+
1288
+ if (match(';')) {
1289
+ lex();
1290
+ return;
1291
+ }
1292
+
1293
+ token = lookahead();
1294
+ if (token.type !== Token.EOF && !match('}')) {
1295
+ throwUnexpected(token);
1296
+ }
1297
+ }
1298
+
1299
+ // Return true if provided expression is LeftHandSideExpression
1300
+
1301
+ function isLeftHandSide(expr) {
1302
+ return expr.type === Syntax.Identifier || expr.type === Syntax.MemberExpression;
1303
+ }
1304
+
1305
+ // 11.1.4 Array Initialiser
1306
+
1307
+ function parseArrayInitialiser() {
1308
+ var elements = [];
1309
+
1310
+ expect('[');
1311
+
1312
+ while (!match(']')) {
1313
+ if (match(',')) {
1314
+ lex();
1315
+ elements.push(null);
1316
+ } else {
1317
+ elements.push(parseAssignmentExpression());
1318
+
1319
+ if (!match(']')) {
1320
+ expect(',');
1321
+ }
1322
+ }
1323
+ }
1324
+
1325
+ expect(']');
1326
+
1327
+ return {
1328
+ type: Syntax.ArrayExpression,
1329
+ elements: elements
1330
+ };
1331
+ }
1332
+
1333
+ // 11.1.5 Object Initialiser
1334
+
1335
+ function parsePropertyFunction(param, first) {
1336
+ var previousStrict, body;
1337
+
1338
+ previousStrict = strict;
1339
+ body = parseFunctionSourceElements();
1340
+ if (first && strict && isRestrictedWord(param[0].name)) {
1341
+ throwErrorTolerant(first, Messages.StrictParamName);
1342
+ }
1343
+ strict = previousStrict;
1344
+
1345
+ return {
1346
+ type: Syntax.FunctionExpression,
1347
+ id: null,
1348
+ params: param,
1349
+ defaults: [],
1350
+ body: body,
1351
+ rest: null,
1352
+ generator: false,
1353
+ expression: false
1354
+ };
1355
+ }
1356
+
1357
+ function parseObjectPropertyKey() {
1358
+ var token = lex();
1359
+
1360
+ // Note: This function is called only from parseObjectProperty(), where
1361
+ // EOF and Punctuator tokens are already filtered out.
1362
+
1363
+ if (token.type === Token.StringLiteral || token.type === Token.NumericLiteral) {
1364
+ if (strict && token.octal) {
1365
+ throwErrorTolerant(token, Messages.StrictOctalLiteral);
1366
+ }
1367
+ return createLiteral(token);
1368
+ }
1369
+
1370
+ return {
1371
+ type: Syntax.Identifier,
1372
+ name: token.value
1373
+ };
1374
+ }
1375
+
1376
+ function parseObjectProperty() {
1377
+ var token, key, id, param;
1378
+
1379
+ token = lookahead();
1380
+
1381
+ if (token.type === Token.Identifier) {
1382
+
1383
+ id = parseObjectPropertyKey();
1384
+
1385
+ // Property Assignment: Getter and Setter.
1386
+
1387
+ if (token.value === 'get' && !match(':')) {
1388
+ key = parseObjectPropertyKey();
1389
+ expect('(');
1390
+ expect(')');
1391
+ return {
1392
+ type: Syntax.Property,
1393
+ key: key,
1394
+ value: parsePropertyFunction([]),
1395
+ kind: 'get'
1396
+ };
1397
+ } else if (token.value === 'set' && !match(':')) {
1398
+ key = parseObjectPropertyKey();
1399
+ expect('(');
1400
+ token = lookahead();
1401
+ if (token.type !== Token.Identifier) {
1402
+ throwUnexpected(lex());
1403
+ }
1404
+ param = [ parseVariableIdentifier() ];
1405
+ expect(')');
1406
+ return {
1407
+ type: Syntax.Property,
1408
+ key: key,
1409
+ value: parsePropertyFunction(param, token),
1410
+ kind: 'set'
1411
+ };
1412
+ } else {
1413
+ expect(':');
1414
+ return {
1415
+ type: Syntax.Property,
1416
+ key: id,
1417
+ value: parseAssignmentExpression(),
1418
+ kind: 'init'
1419
+ };
1420
+ }
1421
+ } else if (token.type === Token.EOF || token.type === Token.Punctuator) {
1422
+ throwUnexpected(token);
1423
+ } else {
1424
+ key = parseObjectPropertyKey();
1425
+ expect(':');
1426
+ return {
1427
+ type: Syntax.Property,
1428
+ key: key,
1429
+ value: parseAssignmentExpression(),
1430
+ kind: 'init'
1431
+ };
1432
+ }
1433
+ }
1434
+
1435
+ function parseObjectInitialiser() {
1436
+ var properties = [], property, name, kind, map = {}, toString = String;
1437
+
1438
+ expect('{');
1439
+
1440
+ while (!match('}')) {
1441
+ property = parseObjectProperty();
1442
+
1443
+ if (property.key.type === Syntax.Identifier) {
1444
+ name = property.key.name;
1445
+ } else {
1446
+ name = toString(property.key.value);
1447
+ }
1448
+ kind = (property.kind === 'init') ? PropertyKind.Data : (property.kind === 'get') ? PropertyKind.Get : PropertyKind.Set;
1449
+ if (Object.prototype.hasOwnProperty.call(map, name)) {
1450
+ if (map[name] === PropertyKind.Data) {
1451
+ if (strict && kind === PropertyKind.Data) {
1452
+ throwErrorTolerant({}, Messages.StrictDuplicateProperty);
1453
+ } else if (kind !== PropertyKind.Data) {
1454
+ throwErrorTolerant({}, Messages.AccessorDataProperty);
1455
+ }
1456
+ } else {
1457
+ if (kind === PropertyKind.Data) {
1458
+ throwErrorTolerant({}, Messages.AccessorDataProperty);
1459
+ } else if (map[name] & kind) {
1460
+ throwErrorTolerant({}, Messages.AccessorGetSet);
1461
+ }
1462
+ }
1463
+ map[name] |= kind;
1464
+ } else {
1465
+ map[name] = kind;
1466
+ }
1467
+
1468
+ properties.push(property);
1469
+
1470
+ if (!match('}')) {
1471
+ expect(',');
1472
+ }
1473
+ }
1474
+
1475
+ expect('}');
1476
+
1477
+ return {
1478
+ type: Syntax.ObjectExpression,
1479
+ properties: properties
1480
+ };
1481
+ }
1482
+
1483
+ // 11.1.6 The Grouping Operator
1484
+
1485
+ function parseGroupExpression() {
1486
+ var expr;
1487
+
1488
+ expect('(');
1489
+
1490
+ expr = parseExpression();
1491
+
1492
+ expect(')');
1493
+
1494
+ return expr;
1495
+ }
1496
+
1497
+
1498
+ // 11.1 Primary Expressions
1499
+
1500
+ function parsePrimaryExpression() {
1501
+ var token = lookahead(),
1502
+ type = token.type;
1503
+
1504
+ if (type === Token.Identifier) {
1505
+ return {
1506
+ type: Syntax.Identifier,
1507
+ name: lex().value
1508
+ };
1509
+ }
1510
+
1511
+ if (type === Token.StringLiteral || type === Token.NumericLiteral) {
1512
+ if (strict && token.octal) {
1513
+ throwErrorTolerant(token, Messages.StrictOctalLiteral);
1514
+ }
1515
+ return createLiteral(lex());
1516
+ }
1517
+
1518
+ if (type === Token.Keyword) {
1519
+ if (matchKeyword('this')) {
1520
+ lex();
1521
+ return {
1522
+ type: Syntax.ThisExpression
1523
+ };
1524
+ }
1525
+
1526
+ if (matchKeyword('function')) {
1527
+ return parseFunctionExpression();
1528
+ }
1529
+ }
1530
+
1531
+ if (type === Token.BooleanLiteral) {
1532
+ lex();
1533
+ token.value = (token.value === 'true');
1534
+ return createLiteral(token);
1535
+ }
1536
+
1537
+ if (type === Token.NullLiteral) {
1538
+ lex();
1539
+ token.value = null;
1540
+ return createLiteral(token);
1541
+ }
1542
+
1543
+ if (match('[')) {
1544
+ return parseArrayInitialiser();
1545
+ }
1546
+
1547
+ if (match('{')) {
1548
+ return parseObjectInitialiser();
1549
+ }
1550
+
1551
+ if (match('(')) {
1552
+ return parseGroupExpression();
1553
+ }
1554
+
1555
+ if (match('/') || match('/=')) {
1556
+ return createLiteral(scanRegExp());
1557
+ }
1558
+
1559
+ return throwUnexpected(lex());
1560
+ }
1561
+
1562
+ // 11.2 Left-Hand-Side Expressions
1563
+
1564
+ function parseArguments() {
1565
+ var args = [];
1566
+
1567
+ expect('(');
1568
+
1569
+ if (!match(')')) {
1570
+ while (index < length) {
1571
+ args.push(parseAssignmentExpression());
1572
+ if (match(')')) {
1573
+ break;
1574
+ }
1575
+ expect(',');
1576
+ }
1577
+ }
1578
+
1579
+ expect(')');
1580
+
1581
+ return args;
1582
+ }
1583
+
1584
+ function parseNonComputedProperty() {
1585
+ var token = lex();
1586
+
1587
+ if (!isIdentifierName(token)) {
1588
+ throwUnexpected(token);
1589
+ }
1590
+
1591
+ return {
1592
+ type: Syntax.Identifier,
1593
+ name: token.value
1594
+ };
1595
+ }
1596
+
1597
+ function parseNonComputedMember() {
1598
+ expect('.');
1599
+
1600
+ return parseNonComputedProperty();
1601
+ }
1602
+
1603
+ function parseComputedMember() {
1604
+ var expr;
1605
+
1606
+ expect('[');
1607
+
1608
+ expr = parseExpression();
1609
+
1610
+ expect(']');
1611
+
1612
+ return expr;
1613
+ }
1614
+
1615
+ function parseNewExpression() {
1616
+ var expr;
1617
+
1618
+ expectKeyword('new');
1619
+
1620
+ expr = {
1621
+ type: Syntax.NewExpression,
1622
+ callee: parseLeftHandSideExpression(),
1623
+ 'arguments': []
1624
+ };
1625
+
1626
+ if (match('(')) {
1627
+ expr['arguments'] = parseArguments();
1628
+ }
1629
+
1630
+ return expr;
1631
+ }
1632
+
1633
+ function parseLeftHandSideExpressionAllowCall() {
1634
+ var expr;
1635
+
1636
+ expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression();
1637
+
1638
+ while (match('.') || match('[') || match('(')) {
1639
+ if (match('(')) {
1640
+ expr = {
1641
+ type: Syntax.CallExpression,
1642
+ callee: expr,
1643
+ 'arguments': parseArguments()
1644
+ };
1645
+ } else if (match('[')) {
1646
+ expr = {
1647
+ type: Syntax.MemberExpression,
1648
+ computed: true,
1649
+ object: expr,
1650
+ property: parseComputedMember()
1651
+ };
1652
+ } else {
1653
+ expr = {
1654
+ type: Syntax.MemberExpression,
1655
+ computed: false,
1656
+ object: expr,
1657
+ property: parseNonComputedMember()
1658
+ };
1659
+ }
1660
+ }
1661
+
1662
+ return expr;
1663
+ }
1664
+
1665
+
1666
+ function parseLeftHandSideExpression() {
1667
+ var expr;
1668
+
1669
+ expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression();
1670
+
1671
+ while (match('.') || match('[')) {
1672
+ if (match('[')) {
1673
+ expr = {
1674
+ type: Syntax.MemberExpression,
1675
+ computed: true,
1676
+ object: expr,
1677
+ property: parseComputedMember()
1678
+ };
1679
+ } else {
1680
+ expr = {
1681
+ type: Syntax.MemberExpression,
1682
+ computed: false,
1683
+ object: expr,
1684
+ property: parseNonComputedMember()
1685
+ };
1686
+ }
1687
+ }
1688
+
1689
+ return expr;
1690
+ }
1691
+
1692
+ // 11.3 Postfix Expressions
1693
+
1694
+ function parsePostfixExpression() {
1695
+ var expr = parseLeftHandSideExpressionAllowCall(), token;
1696
+
1697
+ token = lookahead();
1698
+ if (token.type !== Token.Punctuator) {
1699
+ return expr;
1700
+ }
1701
+
1702
+ if ((match('++') || match('--')) && !peekLineTerminator()) {
1703
+ // 11.3.1, 11.3.2
1704
+ if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) {
1705
+ throwErrorTolerant({}, Messages.StrictLHSPostfix);
1706
+ }
1707
+
1708
+ if (!isLeftHandSide(expr)) {
1709
+ throwError({}, Messages.InvalidLHSInAssignment);
1710
+ }
1711
+
1712
+ expr = {
1713
+ type: Syntax.UpdateExpression,
1714
+ operator: lex().value,
1715
+ argument: expr,
1716
+ prefix: false
1717
+ };
1718
+ }
1719
+
1720
+ return expr;
1721
+ }
1722
+
1723
+ // 11.4 Unary Operators
1724
+
1725
+ function parseUnaryExpression() {
1726
+ var token, expr;
1727
+
1728
+ token = lookahead();
1729
+ if (token.type !== Token.Punctuator && token.type !== Token.Keyword) {
1730
+ return parsePostfixExpression();
1731
+ }
1732
+
1733
+ if (match('++') || match('--')) {
1734
+ token = lex();
1735
+ expr = parseUnaryExpression();
1736
+ // 11.4.4, 11.4.5
1737
+ if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) {
1738
+ throwErrorTolerant({}, Messages.StrictLHSPrefix);
1739
+ }
1740
+
1741
+ if (!isLeftHandSide(expr)) {
1742
+ throwError({}, Messages.InvalidLHSInAssignment);
1743
+ }
1744
+
1745
+ expr = {
1746
+ type: Syntax.UpdateExpression,
1747
+ operator: token.value,
1748
+ argument: expr,
1749
+ prefix: true
1750
+ };
1751
+ return expr;
1752
+ }
1753
+
1754
+ if (match('+') || match('-') || match('~') || match('!')) {
1755
+ expr = {
1756
+ type: Syntax.UnaryExpression,
1757
+ operator: lex().value,
1758
+ argument: parseUnaryExpression()
1759
+ };
1760
+ return expr;
1761
+ }
1762
+
1763
+ if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) {
1764
+ expr = {
1765
+ type: Syntax.UnaryExpression,
1766
+ operator: lex().value,
1767
+ argument: parseUnaryExpression()
1768
+ };
1769
+ if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) {
1770
+ throwErrorTolerant({}, Messages.StrictDelete);
1771
+ }
1772
+ return expr;
1773
+ }
1774
+
1775
+ return parsePostfixExpression();
1776
+ }
1777
+
1778
+ // 11.5 Multiplicative Operators
1779
+
1780
+ function parseMultiplicativeExpression() {
1781
+ var expr = parseUnaryExpression();
1782
+
1783
+ while (match('*') || match('/') || match('%')) {
1784
+ expr = {
1785
+ type: Syntax.BinaryExpression,
1786
+ operator: lex().value,
1787
+ left: expr,
1788
+ right: parseUnaryExpression()
1789
+ };
1790
+ }
1791
+
1792
+ return expr;
1793
+ }
1794
+
1795
+ // 11.6 Additive Operators
1796
+
1797
+ function parseAdditiveExpression() {
1798
+ var expr = parseMultiplicativeExpression();
1799
+
1800
+ while (match('+') || match('-')) {
1801
+ expr = {
1802
+ type: Syntax.BinaryExpression,
1803
+ operator: lex().value,
1804
+ left: expr,
1805
+ right: parseMultiplicativeExpression()
1806
+ };
1807
+ }
1808
+
1809
+ return expr;
1810
+ }
1811
+
1812
+ // 11.7 Bitwise Shift Operators
1813
+
1814
+ function parseShiftExpression() {
1815
+ var expr = parseAdditiveExpression();
1816
+
1817
+ while (match('<<') || match('>>') || match('>>>')) {
1818
+ expr = {
1819
+ type: Syntax.BinaryExpression,
1820
+ operator: lex().value,
1821
+ left: expr,
1822
+ right: parseAdditiveExpression()
1823
+ };
1824
+ }
1825
+
1826
+ return expr;
1827
+ }
1828
+ // 11.8 Relational Operators
1829
+
1830
+ function parseRelationalExpression() {
1831
+ var expr, previousAllowIn;
1832
+
1833
+ previousAllowIn = state.allowIn;
1834
+ state.allowIn = true;
1835
+
1836
+ expr = parseShiftExpression();
1837
+
1838
+ while (match('<') || match('>') || match('<=') || match('>=') || (previousAllowIn && matchKeyword('in')) || matchKeyword('instanceof')) {
1839
+ expr = {
1840
+ type: Syntax.BinaryExpression,
1841
+ operator: lex().value,
1842
+ left: expr,
1843
+ right: parseShiftExpression()
1844
+ };
1845
+ }
1846
+
1847
+ state.allowIn = previousAllowIn;
1848
+ return expr;
1849
+ }
1850
+
1851
+ // 11.9 Equality Operators
1852
+
1853
+ function parseEqualityExpression() {
1854
+ var expr = parseRelationalExpression();
1855
+
1856
+ while (match('==') || match('!=') || match('===') || match('!==')) {
1857
+ expr = {
1858
+ type: Syntax.BinaryExpression,
1859
+ operator: lex().value,
1860
+ left: expr,
1861
+ right: parseRelationalExpression()
1862
+ };
1863
+ }
1864
+
1865
+ return expr;
1866
+ }
1867
+
1868
+ // 11.10 Binary Bitwise Operators
1869
+
1870
+ function parseBitwiseANDExpression() {
1871
+ var expr = parseEqualityExpression();
1872
+
1873
+ while (match('&')) {
1874
+ lex();
1875
+ expr = {
1876
+ type: Syntax.BinaryExpression,
1877
+ operator: '&',
1878
+ left: expr,
1879
+ right: parseEqualityExpression()
1880
+ };
1881
+ }
1882
+
1883
+ return expr;
1884
+ }
1885
+
1886
+ function parseBitwiseXORExpression() {
1887
+ var expr = parseBitwiseANDExpression();
1888
+
1889
+ while (match('^')) {
1890
+ lex();
1891
+ expr = {
1892
+ type: Syntax.BinaryExpression,
1893
+ operator: '^',
1894
+ left: expr,
1895
+ right: parseBitwiseANDExpression()
1896
+ };
1897
+ }
1898
+
1899
+ return expr;
1900
+ }
1901
+
1902
+ function parseBitwiseORExpression() {
1903
+ var expr = parseBitwiseXORExpression();
1904
+
1905
+ while (match('|')) {
1906
+ lex();
1907
+ expr = {
1908
+ type: Syntax.BinaryExpression,
1909
+ operator: '|',
1910
+ left: expr,
1911
+ right: parseBitwiseXORExpression()
1912
+ };
1913
+ }
1914
+
1915
+ return expr;
1916
+ }
1917
+
1918
+ // 11.11 Binary Logical Operators
1919
+
1920
+ function parseLogicalANDExpression() {
1921
+ var expr = parseBitwiseORExpression();
1922
+
1923
+ while (match('&&')) {
1924
+ lex();
1925
+ expr = {
1926
+ type: Syntax.LogicalExpression,
1927
+ operator: '&&',
1928
+ left: expr,
1929
+ right: parseBitwiseORExpression()
1930
+ };
1931
+ }
1932
+
1933
+ return expr;
1934
+ }
1935
+
1936
+ function parseLogicalORExpression() {
1937
+ var expr = parseLogicalANDExpression();
1938
+
1939
+ while (match('||')) {
1940
+ lex();
1941
+ expr = {
1942
+ type: Syntax.LogicalExpression,
1943
+ operator: '||',
1944
+ left: expr,
1945
+ right: parseLogicalANDExpression()
1946
+ };
1947
+ }
1948
+
1949
+ return expr;
1950
+ }
1951
+
1952
+ // 11.12 Conditional Operator
1953
+
1954
+ function parseConditionalExpression() {
1955
+ var expr, previousAllowIn, consequent;
1956
+
1957
+ expr = parseLogicalORExpression();
1958
+
1959
+ if (match('?')) {
1960
+ lex();
1961
+ previousAllowIn = state.allowIn;
1962
+ state.allowIn = true;
1963
+ consequent = parseAssignmentExpression();
1964
+ state.allowIn = previousAllowIn;
1965
+ expect(':');
1966
+
1967
+ expr = {
1968
+ type: Syntax.ConditionalExpression,
1969
+ test: expr,
1970
+ consequent: consequent,
1971
+ alternate: parseAssignmentExpression()
1972
+ };
1973
+ }
1974
+
1975
+ return expr;
1976
+ }
1977
+
1978
+ // 11.13 Assignment Operators
1979
+
1980
+ function parseAssignmentExpression() {
1981
+ var token, expr;
1982
+
1983
+ token = lookahead();
1984
+ expr = parseConditionalExpression();
1985
+
1986
+ if (matchAssign()) {
1987
+ // LeftHandSideExpression
1988
+ if (!isLeftHandSide(expr)) {
1989
+ throwError({}, Messages.InvalidLHSInAssignment);
1990
+ }
1991
+
1992
+ // 11.13.1
1993
+ if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) {
1994
+ throwErrorTolerant(token, Messages.StrictLHSAssignment);
1995
+ }
1996
+
1997
+ expr = {
1998
+ type: Syntax.AssignmentExpression,
1999
+ operator: lex().value,
2000
+ left: expr,
2001
+ right: parseAssignmentExpression()
2002
+ };
2003
+ }
2004
+
2005
+ return expr;
2006
+ }
2007
+
2008
+ // 11.14 Comma Operator
2009
+
2010
+ function parseExpression() {
2011
+ var expr = parseAssignmentExpression();
2012
+
2013
+ if (match(',')) {
2014
+ expr = {
2015
+ type: Syntax.SequenceExpression,
2016
+ expressions: [ expr ]
2017
+ };
2018
+
2019
+ while (index < length) {
2020
+ if (!match(',')) {
2021
+ break;
2022
+ }
2023
+ lex();
2024
+ expr.expressions.push(parseAssignmentExpression());
2025
+ }
2026
+
2027
+ }
2028
+ return expr;
2029
+ }
2030
+
2031
+ // 12.1 Block
2032
+
2033
+ function parseStatementList() {
2034
+ var list = [],
2035
+ statement;
2036
+
2037
+ while (index < length) {
2038
+ if (match('}')) {
2039
+ break;
2040
+ }
2041
+ statement = parseSourceElement();
2042
+ if (typeof statement === 'undefined') {
2043
+ break;
2044
+ }
2045
+ list.push(statement);
2046
+ }
2047
+
2048
+ return list;
2049
+ }
2050
+
2051
+ function parseBlock() {
2052
+ var block;
2053
+
2054
+ expect('{');
2055
+
2056
+ block = parseStatementList();
2057
+
2058
+ expect('}');
2059
+
2060
+ return {
2061
+ type: Syntax.BlockStatement,
2062
+ body: block
2063
+ };
2064
+ }
2065
+
2066
+ // 12.2 Variable Statement
2067
+
2068
+ function parseVariableIdentifier() {
2069
+ var token = lex();
2070
+
2071
+ if (token.type !== Token.Identifier) {
2072
+ throwUnexpected(token);
2073
+ }
2074
+
2075
+ return {
2076
+ type: Syntax.Identifier,
2077
+ name: token.value
2078
+ };
2079
+ }
2080
+
2081
+ function parseVariableDeclaration(kind) {
2082
+ var id = parseVariableIdentifier(),
2083
+ init = null;
2084
+
2085
+ // 12.2.1
2086
+ if (strict && isRestrictedWord(id.name)) {
2087
+ throwErrorTolerant({}, Messages.StrictVarName);
2088
+ }
2089
+
2090
+ if (kind === 'const') {
2091
+ expect('=');
2092
+ init = parseAssignmentExpression();
2093
+ } else if (match('=')) {
2094
+ lex();
2095
+ init = parseAssignmentExpression();
2096
+ }
2097
+
2098
+ return {
2099
+ type: Syntax.VariableDeclarator,
2100
+ id: id,
2101
+ init: init
2102
+ };
2103
+ }
2104
+
2105
+ function parseVariableDeclarationList(kind) {
2106
+ var list = [];
2107
+
2108
+ while (index < length) {
2109
+ list.push(parseVariableDeclaration(kind));
2110
+ if (!match(',')) {
2111
+ break;
2112
+ }
2113
+ lex();
2114
+ }
2115
+
2116
+ return list;
2117
+ }
2118
+
2119
+ function parseVariableStatement() {
2120
+ var declarations;
2121
+
2122
+ expectKeyword('var');
2123
+
2124
+ declarations = parseVariableDeclarationList();
2125
+
2126
+ consumeSemicolon();
2127
+
2128
+ return {
2129
+ type: Syntax.VariableDeclaration,
2130
+ declarations: declarations,
2131
+ kind: 'var'
2132
+ };
2133
+ }
2134
+
2135
+ // kind may be `const` or `let`
2136
+ // Both are experimental and not in the specification yet.
2137
+ // see http://wiki.ecmascript.org/doku.php?id=harmony:const
2138
+ // and http://wiki.ecmascript.org/doku.php?id=harmony:let
2139
+ function parseConstLetDeclaration(kind) {
2140
+ var declarations;
2141
+
2142
+ expectKeyword(kind);
2143
+
2144
+ declarations = parseVariableDeclarationList(kind);
2145
+
2146
+ consumeSemicolon();
2147
+
2148
+ return {
2149
+ type: Syntax.VariableDeclaration,
2150
+ declarations: declarations,
2151
+ kind: kind
2152
+ };
2153
+ }
2154
+
2155
+ // 12.3 Empty Statement
2156
+
2157
+ function parseEmptyStatement() {
2158
+ expect(';');
2159
+
2160
+ return {
2161
+ type: Syntax.EmptyStatement
2162
+ };
2163
+ }
2164
+
2165
+ // 12.4 Expression Statement
2166
+
2167
+ function parseExpressionStatement() {
2168
+ var expr = parseExpression();
2169
+
2170
+ consumeSemicolon();
2171
+
2172
+ return {
2173
+ type: Syntax.ExpressionStatement,
2174
+ expression: expr
2175
+ };
2176
+ }
2177
+
2178
+ // 12.5 If statement
2179
+
2180
+ function parseIfStatement() {
2181
+ var test, consequent, alternate;
2182
+
2183
+ expectKeyword('if');
2184
+
2185
+ expect('(');
2186
+
2187
+ test = parseExpression();
2188
+
2189
+ expect(')');
2190
+
2191
+ consequent = parseStatement();
2192
+
2193
+ if (matchKeyword('else')) {
2194
+ lex();
2195
+ alternate = parseStatement();
2196
+ } else {
2197
+ alternate = null;
2198
+ }
2199
+
2200
+ return {
2201
+ type: Syntax.IfStatement,
2202
+ test: test,
2203
+ consequent: consequent,
2204
+ alternate: alternate
2205
+ };
2206
+ }
2207
+
2208
+ // 12.6 Iteration Statements
2209
+
2210
+ function parseDoWhileStatement() {
2211
+ var body, test, oldInIteration;
2212
+
2213
+ expectKeyword('do');
2214
+
2215
+ oldInIteration = state.inIteration;
2216
+ state.inIteration = true;
2217
+
2218
+ body = parseStatement();
2219
+
2220
+ state.inIteration = oldInIteration;
2221
+
2222
+ expectKeyword('while');
2223
+
2224
+ expect('(');
2225
+
2226
+ test = parseExpression();
2227
+
2228
+ expect(')');
2229
+
2230
+ if (match(';')) {
2231
+ lex();
2232
+ }
2233
+
2234
+ return {
2235
+ type: Syntax.DoWhileStatement,
2236
+ body: body,
2237
+ test: test
2238
+ };
2239
+ }
2240
+
2241
+ function parseWhileStatement() {
2242
+ var test, body, oldInIteration;
2243
+
2244
+ expectKeyword('while');
2245
+
2246
+ expect('(');
2247
+
2248
+ test = parseExpression();
2249
+
2250
+ expect(')');
2251
+
2252
+ oldInIteration = state.inIteration;
2253
+ state.inIteration = true;
2254
+
2255
+ body = parseStatement();
2256
+
2257
+ state.inIteration = oldInIteration;
2258
+
2259
+ return {
2260
+ type: Syntax.WhileStatement,
2261
+ test: test,
2262
+ body: body
2263
+ };
2264
+ }
2265
+
2266
+ function parseForVariableDeclaration() {
2267
+ var token = lex();
2268
+
2269
+ return {
2270
+ type: Syntax.VariableDeclaration,
2271
+ declarations: parseVariableDeclarationList(),
2272
+ kind: token.value
2273
+ };
2274
+ }
2275
+
2276
+ function parseForStatement() {
2277
+ var init, test, update, left, right, body, oldInIteration;
2278
+
2279
+ init = test = update = null;
2280
+
2281
+ expectKeyword('for');
2282
+
2283
+ expect('(');
2284
+
2285
+ if (match(';')) {
2286
+ lex();
2287
+ } else {
2288
+ if (matchKeyword('var') || matchKeyword('let')) {
2289
+ state.allowIn = false;
2290
+ init = parseForVariableDeclaration();
2291
+ state.allowIn = true;
2292
+
2293
+ if (init.declarations.length === 1 && matchKeyword('in')) {
2294
+ lex();
2295
+ left = init;
2296
+ right = parseExpression();
2297
+ init = null;
2298
+ }
2299
+ } else {
2300
+ state.allowIn = false;
2301
+ init = parseExpression();
2302
+ state.allowIn = true;
2303
+
2304
+ if (matchKeyword('in')) {
2305
+ // LeftHandSideExpression
2306
+ if (!isLeftHandSide(init)) {
2307
+ throwError({}, Messages.InvalidLHSInForIn);
2308
+ }
2309
+
2310
+ lex();
2311
+ left = init;
2312
+ right = parseExpression();
2313
+ init = null;
2314
+ }
2315
+ }
2316
+
2317
+ if (typeof left === 'undefined') {
2318
+ expect(';');
2319
+ }
2320
+ }
2321
+
2322
+ if (typeof left === 'undefined') {
2323
+
2324
+ if (!match(';')) {
2325
+ test = parseExpression();
2326
+ }
2327
+ expect(';');
2328
+
2329
+ if (!match(')')) {
2330
+ update = parseExpression();
2331
+ }
2332
+ }
2333
+
2334
+ expect(')');
2335
+
2336
+ oldInIteration = state.inIteration;
2337
+ state.inIteration = true;
2338
+
2339
+ body = parseStatement();
2340
+
2341
+ state.inIteration = oldInIteration;
2342
+
2343
+ if (typeof left === 'undefined') {
2344
+ return {
2345
+ type: Syntax.ForStatement,
2346
+ init: init,
2347
+ test: test,
2348
+ update: update,
2349
+ body: body
2350
+ };
2351
+ }
2352
+
2353
+ return {
2354
+ type: Syntax.ForInStatement,
2355
+ left: left,
2356
+ right: right,
2357
+ body: body,
2358
+ each: false
2359
+ };
2360
+ }
2361
+
2362
+ // 12.7 The continue statement
2363
+
2364
+ function parseContinueStatement() {
2365
+ var token, label = null;
2366
+
2367
+ expectKeyword('continue');
2368
+
2369
+ // Optimize the most common form: 'continue;'.
2370
+ if (source[index] === ';') {
2371
+ lex();
2372
+
2373
+ if (!state.inIteration) {
2374
+ throwError({}, Messages.IllegalContinue);
2375
+ }
2376
+
2377
+ return {
2378
+ type: Syntax.ContinueStatement,
2379
+ label: null
2380
+ };
2381
+ }
2382
+
2383
+ if (peekLineTerminator()) {
2384
+ if (!state.inIteration) {
2385
+ throwError({}, Messages.IllegalContinue);
2386
+ }
2387
+
2388
+ return {
2389
+ type: Syntax.ContinueStatement,
2390
+ label: null
2391
+ };
2392
+ }
2393
+
2394
+ token = lookahead();
2395
+ if (token.type === Token.Identifier) {
2396
+ label = parseVariableIdentifier();
2397
+
2398
+ if (!Object.prototype.hasOwnProperty.call(state.labelSet, label.name)) {
2399
+ throwError({}, Messages.UnknownLabel, label.name);
2400
+ }
2401
+ }
2402
+
2403
+ consumeSemicolon();
2404
+
2405
+ if (label === null && !state.inIteration) {
2406
+ throwError({}, Messages.IllegalContinue);
2407
+ }
2408
+
2409
+ return {
2410
+ type: Syntax.ContinueStatement,
2411
+ label: label
2412
+ };
2413
+ }
2414
+
2415
+ // 12.8 The break statement
2416
+
2417
+ function parseBreakStatement() {
2418
+ var token, label = null;
2419
+
2420
+ expectKeyword('break');
2421
+
2422
+ // Optimize the most common form: 'break;'.
2423
+ if (source[index] === ';') {
2424
+ lex();
2425
+
2426
+ if (!(state.inIteration || state.inSwitch)) {
2427
+ throwError({}, Messages.IllegalBreak);
2428
+ }
2429
+
2430
+ return {
2431
+ type: Syntax.BreakStatement,
2432
+ label: null
2433
+ };
2434
+ }
2435
+
2436
+ if (peekLineTerminator()) {
2437
+ if (!(state.inIteration || state.inSwitch)) {
2438
+ throwError({}, Messages.IllegalBreak);
2439
+ }
2440
+
2441
+ return {
2442
+ type: Syntax.BreakStatement,
2443
+ label: null
2444
+ };
2445
+ }
2446
+
2447
+ token = lookahead();
2448
+ if (token.type === Token.Identifier) {
2449
+ label = parseVariableIdentifier();
2450
+
2451
+ if (!Object.prototype.hasOwnProperty.call(state.labelSet, label.name)) {
2452
+ throwError({}, Messages.UnknownLabel, label.name);
2453
+ }
2454
+ }
2455
+
2456
+ consumeSemicolon();
2457
+
2458
+ if (label === null && !(state.inIteration || state.inSwitch)) {
2459
+ throwError({}, Messages.IllegalBreak);
2460
+ }
2461
+
2462
+ return {
2463
+ type: Syntax.BreakStatement,
2464
+ label: label
2465
+ };
2466
+ }
2467
+
2468
+ // 12.9 The return statement
2469
+
2470
+ function parseReturnStatement() {
2471
+ var token, argument = null;
2472
+
2473
+ expectKeyword('return');
2474
+
2475
+ if (!state.inFunctionBody) {
2476
+ throwErrorTolerant({}, Messages.IllegalReturn);
2477
+ }
2478
+
2479
+ // 'return' followed by a space and an identifier is very common.
2480
+ if (source[index] === ' ') {
2481
+ if (isIdentifierStart(source[index + 1])) {
2482
+ argument = parseExpression();
2483
+ consumeSemicolon();
2484
+ return {
2485
+ type: Syntax.ReturnStatement,
2486
+ argument: argument
2487
+ };
2488
+ }
2489
+ }
2490
+
2491
+ if (peekLineTerminator()) {
2492
+ return {
2493
+ type: Syntax.ReturnStatement,
2494
+ argument: null
2495
+ };
2496
+ }
2497
+
2498
+ if (!match(';')) {
2499
+ token = lookahead();
2500
+ if (!match('}') && token.type !== Token.EOF) {
2501
+ argument = parseExpression();
2502
+ }
2503
+ }
2504
+
2505
+ consumeSemicolon();
2506
+
2507
+ return {
2508
+ type: Syntax.ReturnStatement,
2509
+ argument: argument
2510
+ };
2511
+ }
2512
+
2513
+ // 12.10 The with statement
2514
+
2515
+ function parseWithStatement() {
2516
+ var object, body;
2517
+
2518
+ if (strict) {
2519
+ throwErrorTolerant({}, Messages.StrictModeWith);
2520
+ }
2521
+
2522
+ expectKeyword('with');
2523
+
2524
+ expect('(');
2525
+
2526
+ object = parseExpression();
2527
+
2528
+ expect(')');
2529
+
2530
+ body = parseStatement();
2531
+
2532
+ return {
2533
+ type: Syntax.WithStatement,
2534
+ object: object,
2535
+ body: body
2536
+ };
2537
+ }
2538
+
2539
+ // 12.10 The swith statement
2540
+
2541
+ function parseSwitchCase() {
2542
+ var test,
2543
+ consequent = [],
2544
+ statement;
2545
+
2546
+ if (matchKeyword('default')) {
2547
+ lex();
2548
+ test = null;
2549
+ } else {
2550
+ expectKeyword('case');
2551
+ test = parseExpression();
2552
+ }
2553
+ expect(':');
2554
+
2555
+ while (index < length) {
2556
+ if (match('}') || matchKeyword('default') || matchKeyword('case')) {
2557
+ break;
2558
+ }
2559
+ statement = parseStatement();
2560
+ if (typeof statement === 'undefined') {
2561
+ break;
2562
+ }
2563
+ consequent.push(statement);
2564
+ }
2565
+
2566
+ return {
2567
+ type: Syntax.SwitchCase,
2568
+ test: test,
2569
+ consequent: consequent
2570
+ };
2571
+ }
2572
+
2573
+ function parseSwitchStatement() {
2574
+ var discriminant, cases, clause, oldInSwitch, defaultFound;
2575
+
2576
+ expectKeyword('switch');
2577
+
2578
+ expect('(');
2579
+
2580
+ discriminant = parseExpression();
2581
+
2582
+ expect(')');
2583
+
2584
+ expect('{');
2585
+
2586
+ if (match('}')) {
2587
+ lex();
2588
+ return {
2589
+ type: Syntax.SwitchStatement,
2590
+ discriminant: discriminant
2591
+ };
2592
+ }
2593
+
2594
+ cases = [];
2595
+
2596
+ oldInSwitch = state.inSwitch;
2597
+ state.inSwitch = true;
2598
+ defaultFound = false;
2599
+
2600
+ while (index < length) {
2601
+ if (match('}')) {
2602
+ break;
2603
+ }
2604
+ clause = parseSwitchCase();
2605
+ if (clause.test === null) {
2606
+ if (defaultFound) {
2607
+ throwError({}, Messages.MultipleDefaultsInSwitch);
2608
+ }
2609
+ defaultFound = true;
2610
+ }
2611
+ cases.push(clause);
2612
+ }
2613
+
2614
+ state.inSwitch = oldInSwitch;
2615
+
2616
+ expect('}');
2617
+
2618
+ return {
2619
+ type: Syntax.SwitchStatement,
2620
+ discriminant: discriminant,
2621
+ cases: cases
2622
+ };
2623
+ }
2624
+
2625
+ // 12.13 The throw statement
2626
+
2627
+ function parseThrowStatement() {
2628
+ var argument;
2629
+
2630
+ expectKeyword('throw');
2631
+
2632
+ if (peekLineTerminator()) {
2633
+ throwError({}, Messages.NewlineAfterThrow);
2634
+ }
2635
+
2636
+ argument = parseExpression();
2637
+
2638
+ consumeSemicolon();
2639
+
2640
+ return {
2641
+ type: Syntax.ThrowStatement,
2642
+ argument: argument
2643
+ };
2644
+ }
2645
+
2646
+ // 12.14 The try statement
2647
+
2648
+ function parseCatchClause() {
2649
+ var param;
2650
+
2651
+ expectKeyword('catch');
2652
+
2653
+ expect('(');
2654
+ if (!match(')')) {
2655
+ param = parseExpression();
2656
+ // 12.14.1
2657
+ if (strict && param.type === Syntax.Identifier && isRestrictedWord(param.name)) {
2658
+ throwErrorTolerant({}, Messages.StrictCatchVariable);
2659
+ }
2660
+ }
2661
+ expect(')');
2662
+
2663
+ return {
2664
+ type: Syntax.CatchClause,
2665
+ param: param,
2666
+ body: parseBlock()
2667
+ };
2668
+ }
2669
+
2670
+ function parseTryStatement() {
2671
+ var block, handlers = [], finalizer = null;
2672
+
2673
+ expectKeyword('try');
2674
+
2675
+ block = parseBlock();
2676
+
2677
+ if (matchKeyword('catch')) {
2678
+ handlers.push(parseCatchClause());
2679
+ }
2680
+
2681
+ if (matchKeyword('finally')) {
2682
+ lex();
2683
+ finalizer = parseBlock();
2684
+ }
2685
+
2686
+ if (handlers.length === 0 && !finalizer) {
2687
+ throwError({}, Messages.NoCatchOrFinally);
2688
+ }
2689
+
2690
+ return {
2691
+ type: Syntax.TryStatement,
2692
+ block: block,
2693
+ guardedHandlers: [],
2694
+ handlers: handlers,
2695
+ finalizer: finalizer
2696
+ };
2697
+ }
2698
+
2699
+ // 12.15 The debugger statement
2700
+
2701
+ function parseDebuggerStatement() {
2702
+ expectKeyword('debugger');
2703
+
2704
+ consumeSemicolon();
2705
+
2706
+ return {
2707
+ type: Syntax.DebuggerStatement
2708
+ };
2709
+ }
2710
+
2711
+ // 12 Statements
2712
+
2713
+ function parseStatement() {
2714
+ var token = lookahead(),
2715
+ expr,
2716
+ labeledBody;
2717
+
2718
+ if (token.type === Token.EOF) {
2719
+ throwUnexpected(token);
2720
+ }
2721
+
2722
+ if (token.type === Token.Punctuator) {
2723
+ switch (token.value) {
2724
+ case ';':
2725
+ return parseEmptyStatement();
2726
+ case '{':
2727
+ return parseBlock();
2728
+ case '(':
2729
+ return parseExpressionStatement();
2730
+ default:
2731
+ break;
2732
+ }
2733
+ }
2734
+
2735
+ if (token.type === Token.Keyword) {
2736
+ switch (token.value) {
2737
+ case 'break':
2738
+ return parseBreakStatement();
2739
+ case 'continue':
2740
+ return parseContinueStatement();
2741
+ case 'debugger':
2742
+ return parseDebuggerStatement();
2743
+ case 'do':
2744
+ return parseDoWhileStatement();
2745
+ case 'for':
2746
+ return parseForStatement();
2747
+ case 'function':
2748
+ return parseFunctionDeclaration();
2749
+ case 'if':
2750
+ return parseIfStatement();
2751
+ case 'return':
2752
+ return parseReturnStatement();
2753
+ case 'switch':
2754
+ return parseSwitchStatement();
2755
+ case 'throw':
2756
+ return parseThrowStatement();
2757
+ case 'try':
2758
+ return parseTryStatement();
2759
+ case 'var':
2760
+ return parseVariableStatement();
2761
+ case 'while':
2762
+ return parseWhileStatement();
2763
+ case 'with':
2764
+ return parseWithStatement();
2765
+ default:
2766
+ break;
2767
+ }
2768
+ }
2769
+
2770
+ expr = parseExpression();
2771
+
2772
+ // 12.12 Labelled Statements
2773
+ if ((expr.type === Syntax.Identifier) && match(':')) {
2774
+ lex();
2775
+
2776
+ if (Object.prototype.hasOwnProperty.call(state.labelSet, expr.name)) {
2777
+ throwError({}, Messages.Redeclaration, 'Label', expr.name);
2778
+ }
2779
+
2780
+ state.labelSet[expr.name] = true;
2781
+ labeledBody = parseStatement();
2782
+ delete state.labelSet[expr.name];
2783
+
2784
+ return {
2785
+ type: Syntax.LabeledStatement,
2786
+ label: expr,
2787
+ body: labeledBody
2788
+ };
2789
+ }
2790
+
2791
+ consumeSemicolon();
2792
+
2793
+ return {
2794
+ type: Syntax.ExpressionStatement,
2795
+ expression: expr
2796
+ };
2797
+ }
2798
+
2799
+ // 13 Function Definition
2800
+
2801
+ function parseFunctionSourceElements() {
2802
+ var sourceElement, sourceElements = [], token, directive, firstRestricted,
2803
+ oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody;
2804
+
2805
+ expect('{');
2806
+
2807
+ while (index < length) {
2808
+ token = lookahead();
2809
+ if (token.type !== Token.StringLiteral) {
2810
+ break;
2811
+ }
2812
+
2813
+ sourceElement = parseSourceElement();
2814
+ sourceElements.push(sourceElement);
2815
+ if (sourceElement.expression.type !== Syntax.Literal) {
2816
+ // this is not directive
2817
+ break;
2818
+ }
2819
+ directive = sliceSource(token.range[0] + 1, token.range[1] - 1);
2820
+ if (directive === 'use strict') {
2821
+ strict = true;
2822
+ if (firstRestricted) {
2823
+ throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral);
2824
+ }
2825
+ } else {
2826
+ if (!firstRestricted && token.octal) {
2827
+ firstRestricted = token;
2828
+ }
2829
+ }
2830
+ }
2831
+
2832
+ oldLabelSet = state.labelSet;
2833
+ oldInIteration = state.inIteration;
2834
+ oldInSwitch = state.inSwitch;
2835
+ oldInFunctionBody = state.inFunctionBody;
2836
+
2837
+ state.labelSet = {};
2838
+ state.inIteration = false;
2839
+ state.inSwitch = false;
2840
+ state.inFunctionBody = true;
2841
+
2842
+ while (index < length) {
2843
+ if (match('}')) {
2844
+ break;
2845
+ }
2846
+ sourceElement = parseSourceElement();
2847
+ if (typeof sourceElement === 'undefined') {
2848
+ break;
2849
+ }
2850
+ sourceElements.push(sourceElement);
2851
+ }
2852
+
2853
+ expect('}');
2854
+
2855
+ state.labelSet = oldLabelSet;
2856
+ state.inIteration = oldInIteration;
2857
+ state.inSwitch = oldInSwitch;
2858
+ state.inFunctionBody = oldInFunctionBody;
2859
+
2860
+ return {
2861
+ type: Syntax.BlockStatement,
2862
+ body: sourceElements
2863
+ };
2864
+ }
2865
+
2866
+ function parseFunctionDeclaration() {
2867
+ var id, param, params = [], body, token, stricted, firstRestricted, message, previousStrict, paramSet;
2868
+
2869
+ expectKeyword('function');
2870
+ token = lookahead();
2871
+ id = parseVariableIdentifier();
2872
+ if (strict) {
2873
+ if (isRestrictedWord(token.value)) {
2874
+ throwErrorTolerant(token, Messages.StrictFunctionName);
2875
+ }
2876
+ } else {
2877
+ if (isRestrictedWord(token.value)) {
2878
+ firstRestricted = token;
2879
+ message = Messages.StrictFunctionName;
2880
+ } else if (isStrictModeReservedWord(token.value)) {
2881
+ firstRestricted = token;
2882
+ message = Messages.StrictReservedWord;
2883
+ }
2884
+ }
2885
+
2886
+ expect('(');
2887
+
2888
+ if (!match(')')) {
2889
+ paramSet = {};
2890
+ while (index < length) {
2891
+ token = lookahead();
2892
+ param = parseVariableIdentifier();
2893
+ if (strict) {
2894
+ if (isRestrictedWord(token.value)) {
2895
+ stricted = token;
2896
+ message = Messages.StrictParamName;
2897
+ }
2898
+ if (Object.prototype.hasOwnProperty.call(paramSet, token.value)) {
2899
+ stricted = token;
2900
+ message = Messages.StrictParamDupe;
2901
+ }
2902
+ } else if (!firstRestricted) {
2903
+ if (isRestrictedWord(token.value)) {
2904
+ firstRestricted = token;
2905
+ message = Messages.StrictParamName;
2906
+ } else if (isStrictModeReservedWord(token.value)) {
2907
+ firstRestricted = token;
2908
+ message = Messages.StrictReservedWord;
2909
+ } else if (Object.prototype.hasOwnProperty.call(paramSet, token.value)) {
2910
+ firstRestricted = token;
2911
+ message = Messages.StrictParamDupe;
2912
+ }
2913
+ }
2914
+ params.push(param);
2915
+ paramSet[param.name] = true;
2916
+ if (match(')')) {
2917
+ break;
2918
+ }
2919
+ expect(',');
2920
+ }
2921
+ }
2922
+
2923
+ expect(')');
2924
+
2925
+ previousStrict = strict;
2926
+ body = parseFunctionSourceElements();
2927
+ if (strict && firstRestricted) {
2928
+ throwError(firstRestricted, message);
2929
+ }
2930
+ if (strict && stricted) {
2931
+ throwErrorTolerant(stricted, message);
2932
+ }
2933
+ strict = previousStrict;
2934
+
2935
+ return {
2936
+ type: Syntax.FunctionDeclaration,
2937
+ id: id,
2938
+ params: params,
2939
+ defaults: [],
2940
+ body: body,
2941
+ rest: null,
2942
+ generator: false,
2943
+ expression: false
2944
+ };
2945
+ }
2946
+
2947
+ function parseFunctionExpression() {
2948
+ var token, id = null, stricted, firstRestricted, message, param, params = [], body, previousStrict, paramSet;
2949
+
2950
+ expectKeyword('function');
2951
+
2952
+ if (!match('(')) {
2953
+ token = lookahead();
2954
+ id = parseVariableIdentifier();
2955
+ if (strict) {
2956
+ if (isRestrictedWord(token.value)) {
2957
+ throwErrorTolerant(token, Messages.StrictFunctionName);
2958
+ }
2959
+ } else {
2960
+ if (isRestrictedWord(token.value)) {
2961
+ firstRestricted = token;
2962
+ message = Messages.StrictFunctionName;
2963
+ } else if (isStrictModeReservedWord(token.value)) {
2964
+ firstRestricted = token;
2965
+ message = Messages.StrictReservedWord;
2966
+ }
2967
+ }
2968
+ }
2969
+
2970
+ expect('(');
2971
+
2972
+ if (!match(')')) {
2973
+ paramSet = {};
2974
+ while (index < length) {
2975
+ token = lookahead();
2976
+ param = parseVariableIdentifier();
2977
+ if (strict) {
2978
+ if (isRestrictedWord(token.value)) {
2979
+ stricted = token;
2980
+ message = Messages.StrictParamName;
2981
+ }
2982
+ if (Object.prototype.hasOwnProperty.call(paramSet, token.value)) {
2983
+ stricted = token;
2984
+ message = Messages.StrictParamDupe;
2985
+ }
2986
+ } else if (!firstRestricted) {
2987
+ if (isRestrictedWord(token.value)) {
2988
+ firstRestricted = token;
2989
+ message = Messages.StrictParamName;
2990
+ } else if (isStrictModeReservedWord(token.value)) {
2991
+ firstRestricted = token;
2992
+ message = Messages.StrictReservedWord;
2993
+ } else if (Object.prototype.hasOwnProperty.call(paramSet, token.value)) {
2994
+ firstRestricted = token;
2995
+ message = Messages.StrictParamDupe;
2996
+ }
2997
+ }
2998
+ params.push(param);
2999
+ paramSet[param.name] = true;
3000
+ if (match(')')) {
3001
+ break;
3002
+ }
3003
+ expect(',');
3004
+ }
3005
+ }
3006
+
3007
+ expect(')');
3008
+
3009
+ previousStrict = strict;
3010
+ body = parseFunctionSourceElements();
3011
+ if (strict && firstRestricted) {
3012
+ throwError(firstRestricted, message);
3013
+ }
3014
+ if (strict && stricted) {
3015
+ throwErrorTolerant(stricted, message);
3016
+ }
3017
+ strict = previousStrict;
3018
+
3019
+ return {
3020
+ type: Syntax.FunctionExpression,
3021
+ id: id,
3022
+ params: params,
3023
+ defaults: [],
3024
+ body: body,
3025
+ rest: null,
3026
+ generator: false,
3027
+ expression: false
3028
+ };
3029
+ }
3030
+
3031
+ // 14 Program
3032
+
3033
+ function parseSourceElement() {
3034
+ var token = lookahead();
3035
+
3036
+ if (token.type === Token.Keyword) {
3037
+ switch (token.value) {
3038
+ case 'const':
3039
+ case 'let':
3040
+ return parseConstLetDeclaration(token.value);
3041
+ case 'function':
3042
+ return parseFunctionDeclaration();
3043
+ default:
3044
+ return parseStatement();
3045
+ }
3046
+ }
3047
+
3048
+ if (token.type !== Token.EOF) {
3049
+ return parseStatement();
3050
+ }
3051
+ }
3052
+
3053
+ function parseSourceElements() {
3054
+ var sourceElement, sourceElements = [], token, directive, firstRestricted;
3055
+
3056
+ while (index < length) {
3057
+ token = lookahead();
3058
+ if (token.type !== Token.StringLiteral) {
3059
+ break;
3060
+ }
3061
+
3062
+ sourceElement = parseSourceElement();
3063
+ sourceElements.push(sourceElement);
3064
+ if (sourceElement.expression.type !== Syntax.Literal) {
3065
+ // this is not directive
3066
+ break;
3067
+ }
3068
+ directive = sliceSource(token.range[0] + 1, token.range[1] - 1);
3069
+ if (directive === 'use strict') {
3070
+ strict = true;
3071
+ if (firstRestricted) {
3072
+ throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral);
3073
+ }
3074
+ } else {
3075
+ if (!firstRestricted && token.octal) {
3076
+ firstRestricted = token;
3077
+ }
3078
+ }
3079
+ }
3080
+
3081
+ while (index < length) {
3082
+ sourceElement = parseSourceElement();
3083
+ if (typeof sourceElement === 'undefined') {
3084
+ break;
3085
+ }
3086
+ sourceElements.push(sourceElement);
3087
+ }
3088
+ return sourceElements;
3089
+ }
3090
+
3091
+ function parseProgram() {
3092
+ var program;
3093
+ strict = false;
3094
+ program = {
3095
+ type: Syntax.Program,
3096
+ body: parseSourceElements()
3097
+ };
3098
+ return program;
3099
+ }
3100
+
3101
+ // The following functions are needed only when the option to preserve
3102
+ // the comments is active.
3103
+
3104
+ function addComment(type, value, start, end, loc) {
3105
+ assert(typeof start === 'number', 'Comment must have valid position');
3106
+
3107
+ // Because the way the actual token is scanned, often the comments
3108
+ // (if any) are skipped twice during the lexical analysis.
3109
+ // Thus, we need to skip adding a comment if the comment array already
3110
+ // handled it.
3111
+ if (extra.comments.length > 0) {
3112
+ if (extra.comments[extra.comments.length - 1].range[1] > start) {
3113
+ return;
3114
+ }
3115
+ }
3116
+
3117
+ extra.comments.push({
3118
+ type: type,
3119
+ value: value,
3120
+ range: [start, end],
3121
+ loc: loc
3122
+ });
3123
+ }
3124
+
3125
+ function scanComment() {
3126
+ var comment, ch, loc, start, blockComment, lineComment;
3127
+
3128
+ comment = '';
3129
+ blockComment = false;
3130
+ lineComment = false;
3131
+
3132
+ while (index < length) {
3133
+ ch = source[index];
3134
+
3135
+ if (lineComment) {
3136
+ ch = source[index++];
3137
+ if (isLineTerminator(ch)) {
3138
+ loc.end = {
3139
+ line: lineNumber,
3140
+ column: index - lineStart - 1
3141
+ };
3142
+ lineComment = false;
3143
+ addComment('Line', comment, start, index - 1, loc);
3144
+ if (ch === '\r' && source[index] === '\n') {
3145
+ ++index;
3146
+ }
3147
+ ++lineNumber;
3148
+ lineStart = index;
3149
+ comment = '';
3150
+ } else if (index >= length) {
3151
+ lineComment = false;
3152
+ comment += ch;
3153
+ loc.end = {
3154
+ line: lineNumber,
3155
+ column: length - lineStart
3156
+ };
3157
+ addComment('Line', comment, start, length, loc);
3158
+ } else {
3159
+ comment += ch;
3160
+ }
3161
+ } else if (blockComment) {
3162
+ if (isLineTerminator(ch)) {
3163
+ if (ch === '\r' && source[index + 1] === '\n') {
3164
+ ++index;
3165
+ comment += '\r\n';
3166
+ } else {
3167
+ comment += ch;
3168
+ }
3169
+ ++lineNumber;
3170
+ ++index;
3171
+ lineStart = index;
3172
+ if (index >= length) {
3173
+ throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
3174
+ }
3175
+ } else {
3176
+ ch = source[index++];
3177
+ if (index >= length) {
3178
+ throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
3179
+ }
3180
+ comment += ch;
3181
+ if (ch === '*') {
3182
+ ch = source[index];
3183
+ if (ch === '/') {
3184
+ comment = comment.substr(0, comment.length - 1);
3185
+ blockComment = false;
3186
+ ++index;
3187
+ loc.end = {
3188
+ line: lineNumber,
3189
+ column: index - lineStart
3190
+ };
3191
+ addComment('Block', comment, start, index, loc);
3192
+ comment = '';
3193
+ }
3194
+ }
3195
+ }
3196
+ } else if (ch === '/') {
3197
+ ch = source[index + 1];
3198
+ if (ch === '/') {
3199
+ loc = {
3200
+ start: {
3201
+ line: lineNumber,
3202
+ column: index - lineStart
3203
+ }
3204
+ };
3205
+ start = index;
3206
+ index += 2;
3207
+ lineComment = true;
3208
+ if (index >= length) {
3209
+ loc.end = {
3210
+ line: lineNumber,
3211
+ column: index - lineStart
3212
+ };
3213
+ lineComment = false;
3214
+ addComment('Line', comment, start, index, loc);
3215
+ }
3216
+ } else if (ch === '*') {
3217
+ start = index;
3218
+ index += 2;
3219
+ blockComment = true;
3220
+ loc = {
3221
+ start: {
3222
+ line: lineNumber,
3223
+ column: index - lineStart - 2
3224
+ }
3225
+ };
3226
+ if (index >= length) {
3227
+ throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
3228
+ }
3229
+ } else {
3230
+ break;
3231
+ }
3232
+ } else if (isWhiteSpace(ch)) {
3233
+ ++index;
3234
+ } else if (isLineTerminator(ch)) {
3235
+ ++index;
3236
+ if (ch === '\r' && source[index] === '\n') {
3237
+ ++index;
3238
+ }
3239
+ ++lineNumber;
3240
+ lineStart = index;
3241
+ } else {
3242
+ break;
3243
+ }
3244
+ }
3245
+ }
3246
+
3247
+ function filterCommentLocation() {
3248
+ var i, entry, comment, comments = [];
3249
+
3250
+ for (i = 0; i < extra.comments.length; ++i) {
3251
+ entry = extra.comments[i];
3252
+ comment = {
3253
+ type: entry.type,
3254
+ value: entry.value
3255
+ };
3256
+ if (extra.range) {
3257
+ comment.range = entry.range;
3258
+ }
3259
+ if (extra.loc) {
3260
+ comment.loc = entry.loc;
3261
+ }
3262
+ comments.push(comment);
3263
+ }
3264
+
3265
+ extra.comments = comments;
3266
+ }
3267
+
3268
+ function collectToken() {
3269
+ var start, loc, token, range, value;
3270
+
3271
+ skipComment();
3272
+ start = index;
3273
+ loc = {
3274
+ start: {
3275
+ line: lineNumber,
3276
+ column: index - lineStart
3277
+ }
3278
+ };
3279
+
3280
+ token = extra.advance();
3281
+ loc.end = {
3282
+ line: lineNumber,
3283
+ column: index - lineStart
3284
+ };
3285
+
3286
+ if (token.type !== Token.EOF) {
3287
+ range = [token.range[0], token.range[1]];
3288
+ value = sliceSource(token.range[0], token.range[1]);
3289
+ extra.tokens.push({
3290
+ type: TokenName[token.type],
3291
+ value: value,
3292
+ range: range,
3293
+ loc: loc
3294
+ });
3295
+ }
3296
+
3297
+ return token;
3298
+ }
3299
+
3300
+ function collectRegex() {
3301
+ var pos, loc, regex, token;
3302
+
3303
+ skipComment();
3304
+
3305
+ pos = index;
3306
+ loc = {
3307
+ start: {
3308
+ line: lineNumber,
3309
+ column: index - lineStart
3310
+ }
3311
+ };
3312
+
3313
+ regex = extra.scanRegExp();
3314
+ loc.end = {
3315
+ line: lineNumber,
3316
+ column: index - lineStart
3317
+ };
3318
+
3319
+ // Pop the previous token, which is likely '/' or '/='
3320
+ if (extra.tokens.length > 0) {
3321
+ token = extra.tokens[extra.tokens.length - 1];
3322
+ if (token.range[0] === pos && token.type === 'Punctuator') {
3323
+ if (token.value === '/' || token.value === '/=') {
3324
+ extra.tokens.pop();
3325
+ }
3326
+ }
3327
+ }
3328
+
3329
+ extra.tokens.push({
3330
+ type: 'RegularExpression',
3331
+ value: regex.literal,
3332
+ range: [pos, index],
3333
+ loc: loc
3334
+ });
3335
+
3336
+ return regex;
3337
+ }
3338
+
3339
+ function filterTokenLocation() {
3340
+ var i, entry, token, tokens = [];
3341
+
3342
+ for (i = 0; i < extra.tokens.length; ++i) {
3343
+ entry = extra.tokens[i];
3344
+ token = {
3345
+ type: entry.type,
3346
+ value: entry.value
3347
+ };
3348
+ if (extra.range) {
3349
+ token.range = entry.range;
3350
+ }
3351
+ if (extra.loc) {
3352
+ token.loc = entry.loc;
3353
+ }
3354
+ tokens.push(token);
3355
+ }
3356
+
3357
+ extra.tokens = tokens;
3358
+ }
3359
+
3360
+ function createLiteral(token) {
3361
+ return {
3362
+ type: Syntax.Literal,
3363
+ value: token.value
3364
+ };
3365
+ }
3366
+
3367
+ function createRawLiteral(token) {
3368
+ return {
3369
+ type: Syntax.Literal,
3370
+ value: token.value,
3371
+ raw: sliceSource(token.range[0], token.range[1])
3372
+ };
3373
+ }
3374
+
3375
+ function createLocationMarker() {
3376
+ var marker = {};
3377
+
3378
+ marker.range = [index, index];
3379
+ marker.loc = {
3380
+ start: {
3381
+ line: lineNumber,
3382
+ column: index - lineStart
3383
+ },
3384
+ end: {
3385
+ line: lineNumber,
3386
+ column: index - lineStart
3387
+ }
3388
+ };
3389
+
3390
+ marker.end = function () {
3391
+ this.range[1] = index;
3392
+ this.loc.end.line = lineNumber;
3393
+ this.loc.end.column = index - lineStart;
3394
+ };
3395
+
3396
+ marker.applyGroup = function (node) {
3397
+ if (extra.range) {
3398
+ node.groupRange = [this.range[0], this.range[1]];
3399
+ }
3400
+ if (extra.loc) {
3401
+ node.groupLoc = {
3402
+ start: {
3403
+ line: this.loc.start.line,
3404
+ column: this.loc.start.column
3405
+ },
3406
+ end: {
3407
+ line: this.loc.end.line,
3408
+ column: this.loc.end.column
3409
+ }
3410
+ };
3411
+ }
3412
+ };
3413
+
3414
+ marker.apply = function (node) {
3415
+ if (extra.range) {
3416
+ node.range = [this.range[0], this.range[1]];
3417
+ }
3418
+ if (extra.loc) {
3419
+ node.loc = {
3420
+ start: {
3421
+ line: this.loc.start.line,
3422
+ column: this.loc.start.column
3423
+ },
3424
+ end: {
3425
+ line: this.loc.end.line,
3426
+ column: this.loc.end.column
3427
+ }
3428
+ };
3429
+ }
3430
+ };
3431
+
3432
+ return marker;
3433
+ }
3434
+
3435
+ function trackGroupExpression() {
3436
+ var marker, expr;
3437
+
3438
+ skipComment();
3439
+ marker = createLocationMarker();
3440
+ expect('(');
3441
+
3442
+ expr = parseExpression();
3443
+
3444
+ expect(')');
3445
+
3446
+ marker.end();
3447
+ marker.applyGroup(expr);
3448
+
3449
+ return expr;
3450
+ }
3451
+
3452
+ function trackLeftHandSideExpression() {
3453
+ var marker, expr;
3454
+
3455
+ skipComment();
3456
+ marker = createLocationMarker();
3457
+
3458
+ expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression();
3459
+
3460
+ while (match('.') || match('[')) {
3461
+ if (match('[')) {
3462
+ expr = {
3463
+ type: Syntax.MemberExpression,
3464
+ computed: true,
3465
+ object: expr,
3466
+ property: parseComputedMember()
3467
+ };
3468
+ marker.end();
3469
+ marker.apply(expr);
3470
+ } else {
3471
+ expr = {
3472
+ type: Syntax.MemberExpression,
3473
+ computed: false,
3474
+ object: expr,
3475
+ property: parseNonComputedMember()
3476
+ };
3477
+ marker.end();
3478
+ marker.apply(expr);
3479
+ }
3480
+ }
3481
+
3482
+ return expr;
3483
+ }
3484
+
3485
+ function trackLeftHandSideExpressionAllowCall() {
3486
+ var marker, expr;
3487
+
3488
+ skipComment();
3489
+ marker = createLocationMarker();
3490
+
3491
+ expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression();
3492
+
3493
+ while (match('.') || match('[') || match('(')) {
3494
+ if (match('(')) {
3495
+ expr = {
3496
+ type: Syntax.CallExpression,
3497
+ callee: expr,
3498
+ 'arguments': parseArguments()
3499
+ };
3500
+ marker.end();
3501
+ marker.apply(expr);
3502
+ } else if (match('[')) {
3503
+ expr = {
3504
+ type: Syntax.MemberExpression,
3505
+ computed: true,
3506
+ object: expr,
3507
+ property: parseComputedMember()
3508
+ };
3509
+ marker.end();
3510
+ marker.apply(expr);
3511
+ } else {
3512
+ expr = {
3513
+ type: Syntax.MemberExpression,
3514
+ computed: false,
3515
+ object: expr,
3516
+ property: parseNonComputedMember()
3517
+ };
3518
+ marker.end();
3519
+ marker.apply(expr);
3520
+ }
3521
+ }
3522
+
3523
+ return expr;
3524
+ }
3525
+
3526
+ function filterGroup(node) {
3527
+ var n, i, entry;
3528
+
3529
+ n = (Object.prototype.toString.apply(node) === '[object Array]') ? [] : {};
3530
+ for (i in node) {
3531
+ if (node.hasOwnProperty(i) && i !== 'groupRange' && i !== 'groupLoc') {
3532
+ entry = node[i];
3533
+ if (entry === null || typeof entry !== 'object' || entry instanceof RegExp) {
3534
+ n[i] = entry;
3535
+ } else {
3536
+ n[i] = filterGroup(entry);
3537
+ }
3538
+ }
3539
+ }
3540
+ return n;
3541
+ }
3542
+
3543
+ function wrapTrackingFunction(range, loc) {
3544
+
3545
+ return function (parseFunction) {
3546
+
3547
+ function isBinary(node) {
3548
+ return node.type === Syntax.LogicalExpression ||
3549
+ node.type === Syntax.BinaryExpression;
3550
+ }
3551
+
3552
+ function visit(node) {
3553
+ var start, end;
3554
+
3555
+ if (isBinary(node.left)) {
3556
+ visit(node.left);
3557
+ }
3558
+ if (isBinary(node.right)) {
3559
+ visit(node.right);
3560
+ }
3561
+
3562
+ if (range) {
3563
+ if (node.left.groupRange || node.right.groupRange) {
3564
+ start = node.left.groupRange ? node.left.groupRange[0] : node.left.range[0];
3565
+ end = node.right.groupRange ? node.right.groupRange[1] : node.right.range[1];
3566
+ node.range = [start, end];
3567
+ } else if (typeof node.range === 'undefined') {
3568
+ start = node.left.range[0];
3569
+ end = node.right.range[1];
3570
+ node.range = [start, end];
3571
+ }
3572
+ }
3573
+ if (loc) {
3574
+ if (node.left.groupLoc || node.right.groupLoc) {
3575
+ start = node.left.groupLoc ? node.left.groupLoc.start : node.left.loc.start;
3576
+ end = node.right.groupLoc ? node.right.groupLoc.end : node.right.loc.end;
3577
+ node.loc = {
3578
+ start: start,
3579
+ end: end
3580
+ };
3581
+ } else if (typeof node.loc === 'undefined') {
3582
+ node.loc = {
3583
+ start: node.left.loc.start,
3584
+ end: node.right.loc.end
3585
+ };
3586
+ }
3587
+ }
3588
+ }
3589
+
3590
+ return function () {
3591
+ var marker, node;
3592
+
3593
+ skipComment();
3594
+
3595
+ marker = createLocationMarker();
3596
+ node = parseFunction.apply(null, arguments);
3597
+ marker.end();
3598
+
3599
+ if (range && typeof node.range === 'undefined') {
3600
+ marker.apply(node);
3601
+ }
3602
+
3603
+ if (loc && typeof node.loc === 'undefined') {
3604
+ marker.apply(node);
3605
+ }
3606
+
3607
+ if (isBinary(node)) {
3608
+ visit(node);
3609
+ }
3610
+
3611
+ return node;
3612
+ };
3613
+ };
3614
+ }
3615
+
3616
+ function patch() {
3617
+
3618
+ var wrapTracking;
3619
+
3620
+ if (extra.comments) {
3621
+ extra.skipComment = skipComment;
3622
+ skipComment = scanComment;
3623
+ }
3624
+
3625
+ if (extra.raw) {
3626
+ extra.createLiteral = createLiteral;
3627
+ createLiteral = createRawLiteral;
3628
+ }
3629
+
3630
+ if (extra.range || extra.loc) {
3631
+
3632
+ extra.parseGroupExpression = parseGroupExpression;
3633
+ extra.parseLeftHandSideExpression = parseLeftHandSideExpression;
3634
+ extra.parseLeftHandSideExpressionAllowCall = parseLeftHandSideExpressionAllowCall;
3635
+ parseGroupExpression = trackGroupExpression;
3636
+ parseLeftHandSideExpression = trackLeftHandSideExpression;
3637
+ parseLeftHandSideExpressionAllowCall = trackLeftHandSideExpressionAllowCall;
3638
+
3639
+ wrapTracking = wrapTrackingFunction(extra.range, extra.loc);
3640
+
3641
+ extra.parseAdditiveExpression = parseAdditiveExpression;
3642
+ extra.parseAssignmentExpression = parseAssignmentExpression;
3643
+ extra.parseBitwiseANDExpression = parseBitwiseANDExpression;
3644
+ extra.parseBitwiseORExpression = parseBitwiseORExpression;
3645
+ extra.parseBitwiseXORExpression = parseBitwiseXORExpression;
3646
+ extra.parseBlock = parseBlock;
3647
+ extra.parseFunctionSourceElements = parseFunctionSourceElements;
3648
+ extra.parseCatchClause = parseCatchClause;
3649
+ extra.parseComputedMember = parseComputedMember;
3650
+ extra.parseConditionalExpression = parseConditionalExpression;
3651
+ extra.parseConstLetDeclaration = parseConstLetDeclaration;
3652
+ extra.parseEqualityExpression = parseEqualityExpression;
3653
+ extra.parseExpression = parseExpression;
3654
+ extra.parseForVariableDeclaration = parseForVariableDeclaration;
3655
+ extra.parseFunctionDeclaration = parseFunctionDeclaration;
3656
+ extra.parseFunctionExpression = parseFunctionExpression;
3657
+ extra.parseLogicalANDExpression = parseLogicalANDExpression;
3658
+ extra.parseLogicalORExpression = parseLogicalORExpression;
3659
+ extra.parseMultiplicativeExpression = parseMultiplicativeExpression;
3660
+ extra.parseNewExpression = parseNewExpression;
3661
+ extra.parseNonComputedProperty = parseNonComputedProperty;
3662
+ extra.parseObjectProperty = parseObjectProperty;
3663
+ extra.parseObjectPropertyKey = parseObjectPropertyKey;
3664
+ extra.parsePostfixExpression = parsePostfixExpression;
3665
+ extra.parsePrimaryExpression = parsePrimaryExpression;
3666
+ extra.parseProgram = parseProgram;
3667
+ extra.parsePropertyFunction = parsePropertyFunction;
3668
+ extra.parseRelationalExpression = parseRelationalExpression;
3669
+ extra.parseStatement = parseStatement;
3670
+ extra.parseShiftExpression = parseShiftExpression;
3671
+ extra.parseSwitchCase = parseSwitchCase;
3672
+ extra.parseUnaryExpression = parseUnaryExpression;
3673
+ extra.parseVariableDeclaration = parseVariableDeclaration;
3674
+ extra.parseVariableIdentifier = parseVariableIdentifier;
3675
+
3676
+ parseAdditiveExpression = wrapTracking(extra.parseAdditiveExpression);
3677
+ parseAssignmentExpression = wrapTracking(extra.parseAssignmentExpression);
3678
+ parseBitwiseANDExpression = wrapTracking(extra.parseBitwiseANDExpression);
3679
+ parseBitwiseORExpression = wrapTracking(extra.parseBitwiseORExpression);
3680
+ parseBitwiseXORExpression = wrapTracking(extra.parseBitwiseXORExpression);
3681
+ parseBlock = wrapTracking(extra.parseBlock);
3682
+ parseFunctionSourceElements = wrapTracking(extra.parseFunctionSourceElements);
3683
+ parseCatchClause = wrapTracking(extra.parseCatchClause);
3684
+ parseComputedMember = wrapTracking(extra.parseComputedMember);
3685
+ parseConditionalExpression = wrapTracking(extra.parseConditionalExpression);
3686
+ parseConstLetDeclaration = wrapTracking(extra.parseConstLetDeclaration);
3687
+ parseEqualityExpression = wrapTracking(extra.parseEqualityExpression);
3688
+ parseExpression = wrapTracking(extra.parseExpression);
3689
+ parseForVariableDeclaration = wrapTracking(extra.parseForVariableDeclaration);
3690
+ parseFunctionDeclaration = wrapTracking(extra.parseFunctionDeclaration);
3691
+ parseFunctionExpression = wrapTracking(extra.parseFunctionExpression);
3692
+ parseLeftHandSideExpression = wrapTracking(parseLeftHandSideExpression);
3693
+ parseLogicalANDExpression = wrapTracking(extra.parseLogicalANDExpression);
3694
+ parseLogicalORExpression = wrapTracking(extra.parseLogicalORExpression);
3695
+ parseMultiplicativeExpression = wrapTracking(extra.parseMultiplicativeExpression);
3696
+ parseNewExpression = wrapTracking(extra.parseNewExpression);
3697
+ parseNonComputedProperty = wrapTracking(extra.parseNonComputedProperty);
3698
+ parseObjectProperty = wrapTracking(extra.parseObjectProperty);
3699
+ parseObjectPropertyKey = wrapTracking(extra.parseObjectPropertyKey);
3700
+ parsePostfixExpression = wrapTracking(extra.parsePostfixExpression);
3701
+ parsePrimaryExpression = wrapTracking(extra.parsePrimaryExpression);
3702
+ parseProgram = wrapTracking(extra.parseProgram);
3703
+ parsePropertyFunction = wrapTracking(extra.parsePropertyFunction);
3704
+ parseRelationalExpression = wrapTracking(extra.parseRelationalExpression);
3705
+ parseStatement = wrapTracking(extra.parseStatement);
3706
+ parseShiftExpression = wrapTracking(extra.parseShiftExpression);
3707
+ parseSwitchCase = wrapTracking(extra.parseSwitchCase);
3708
+ parseUnaryExpression = wrapTracking(extra.parseUnaryExpression);
3709
+ parseVariableDeclaration = wrapTracking(extra.parseVariableDeclaration);
3710
+ parseVariableIdentifier = wrapTracking(extra.parseVariableIdentifier);
3711
+ }
3712
+
3713
+ if (typeof extra.tokens !== 'undefined') {
3714
+ extra.advance = advance;
3715
+ extra.scanRegExp = scanRegExp;
3716
+
3717
+ advance = collectToken;
3718
+ scanRegExp = collectRegex;
3719
+ }
3720
+ }
3721
+
3722
+ function unpatch() {
3723
+ if (typeof extra.skipComment === 'function') {
3724
+ skipComment = extra.skipComment;
3725
+ }
3726
+
3727
+ if (extra.raw) {
3728
+ createLiteral = extra.createLiteral;
3729
+ }
3730
+
3731
+ if (extra.range || extra.loc) {
3732
+ parseAdditiveExpression = extra.parseAdditiveExpression;
3733
+ parseAssignmentExpression = extra.parseAssignmentExpression;
3734
+ parseBitwiseANDExpression = extra.parseBitwiseANDExpression;
3735
+ parseBitwiseORExpression = extra.parseBitwiseORExpression;
3736
+ parseBitwiseXORExpression = extra.parseBitwiseXORExpression;
3737
+ parseBlock = extra.parseBlock;
3738
+ parseFunctionSourceElements = extra.parseFunctionSourceElements;
3739
+ parseCatchClause = extra.parseCatchClause;
3740
+ parseComputedMember = extra.parseComputedMember;
3741
+ parseConditionalExpression = extra.parseConditionalExpression;
3742
+ parseConstLetDeclaration = extra.parseConstLetDeclaration;
3743
+ parseEqualityExpression = extra.parseEqualityExpression;
3744
+ parseExpression = extra.parseExpression;
3745
+ parseForVariableDeclaration = extra.parseForVariableDeclaration;
3746
+ parseFunctionDeclaration = extra.parseFunctionDeclaration;
3747
+ parseFunctionExpression = extra.parseFunctionExpression;
3748
+ parseGroupExpression = extra.parseGroupExpression;
3749
+ parseLeftHandSideExpression = extra.parseLeftHandSideExpression;
3750
+ parseLeftHandSideExpressionAllowCall = extra.parseLeftHandSideExpressionAllowCall;
3751
+ parseLogicalANDExpression = extra.parseLogicalANDExpression;
3752
+ parseLogicalORExpression = extra.parseLogicalORExpression;
3753
+ parseMultiplicativeExpression = extra.parseMultiplicativeExpression;
3754
+ parseNewExpression = extra.parseNewExpression;
3755
+ parseNonComputedProperty = extra.parseNonComputedProperty;
3756
+ parseObjectProperty = extra.parseObjectProperty;
3757
+ parseObjectPropertyKey = extra.parseObjectPropertyKey;
3758
+ parsePrimaryExpression = extra.parsePrimaryExpression;
3759
+ parsePostfixExpression = extra.parsePostfixExpression;
3760
+ parseProgram = extra.parseProgram;
3761
+ parsePropertyFunction = extra.parsePropertyFunction;
3762
+ parseRelationalExpression = extra.parseRelationalExpression;
3763
+ parseStatement = extra.parseStatement;
3764
+ parseShiftExpression = extra.parseShiftExpression;
3765
+ parseSwitchCase = extra.parseSwitchCase;
3766
+ parseUnaryExpression = extra.parseUnaryExpression;
3767
+ parseVariableDeclaration = extra.parseVariableDeclaration;
3768
+ parseVariableIdentifier = extra.parseVariableIdentifier;
3769
+ }
3770
+
3771
+ if (typeof extra.scanRegExp === 'function') {
3772
+ advance = extra.advance;
3773
+ scanRegExp = extra.scanRegExp;
3774
+ }
3775
+ }
3776
+
3777
+ function stringToArray(str) {
3778
+ var length = str.length,
3779
+ result = [],
3780
+ i;
3781
+ for (i = 0; i < length; ++i) {
3782
+ result[i] = str.charAt(i);
3783
+ }
3784
+ return result;
3785
+ }
3786
+
3787
+ function parse(code, options) {
3788
+ var program, toString;
3789
+
3790
+ toString = String;
3791
+ if (typeof code !== 'string' && !(code instanceof String)) {
3792
+ code = toString(code);
3793
+ }
3794
+
3795
+ source = code;
3796
+ index = 0;
3797
+ lineNumber = (source.length > 0) ? 1 : 0;
3798
+ lineStart = 0;
3799
+ length = source.length;
3800
+ buffer = null;
3801
+ state = {
3802
+ allowIn: true,
3803
+ labelSet: {},
3804
+ inFunctionBody: false,
3805
+ inIteration: false,
3806
+ inSwitch: false
3807
+ };
3808
+
3809
+ extra = {};
3810
+ if (typeof options !== 'undefined') {
3811
+ extra.range = (typeof options.range === 'boolean') && options.range;
3812
+ extra.loc = (typeof options.loc === 'boolean') && options.loc;
3813
+ extra.raw = (typeof options.raw === 'boolean') && options.raw;
3814
+ if (typeof options.tokens === 'boolean' && options.tokens) {
3815
+ extra.tokens = [];
3816
+ }
3817
+ if (typeof options.comment === 'boolean' && options.comment) {
3818
+ extra.comments = [];
3819
+ }
3820
+ if (typeof options.tolerant === 'boolean' && options.tolerant) {
3821
+ extra.errors = [];
3822
+ }
3823
+ }
3824
+
3825
+ if (length > 0) {
3826
+ if (typeof source[0] === 'undefined') {
3827
+ // Try first to convert to a string. This is good as fast path
3828
+ // for old IE which understands string indexing for string
3829
+ // literals only and not for string object.
3830
+ if (code instanceof String) {
3831
+ source = code.valueOf();
3832
+ }
3833
+
3834
+ // Force accessing the characters via an array.
3835
+ if (typeof source[0] === 'undefined') {
3836
+ source = stringToArray(code);
3837
+ }
3838
+ }
3839
+ }
3840
+
3841
+ patch();
3842
+ try {
3843
+ program = parseProgram();
3844
+ if (typeof extra.comments !== 'undefined') {
3845
+ filterCommentLocation();
3846
+ program.comments = extra.comments;
3847
+ }
3848
+ if (typeof extra.tokens !== 'undefined') {
3849
+ filterTokenLocation();
3850
+ program.tokens = extra.tokens;
3851
+ }
3852
+ if (typeof extra.errors !== 'undefined') {
3853
+ program.errors = extra.errors;
3854
+ }
3855
+ if (extra.range || extra.loc) {
3856
+ program.body = filterGroup(program.body);
3857
+ }
3858
+ } catch (e) {
3859
+ throw e;
3860
+ } finally {
3861
+ unpatch();
3862
+ extra = {};
3863
+ }
3864
+
3865
+ return program;
3866
+ }
3867
+
3868
+ // Sync with package.json.
3869
+ exports.version = '1.0.2';
3870
+
3871
+ exports.parse = parse;
3872
+
3873
+ // Deep copy.
3874
+ exports.Syntax = (function () {
3875
+ var name, types = {};
3876
+
3877
+ if (typeof Object.create === 'function') {
3878
+ types = Object.create(null);
3879
+ }
3880
+
3881
+ for (name in Syntax) {
3882
+ if (Syntax.hasOwnProperty(name)) {
3883
+ types[name] = Syntax[name];
3884
+ }
3885
+ }
3886
+
3887
+ if (typeof Object.freeze === 'function') {
3888
+ Object.freeze(types);
3889
+ }
3890
+
3891
+ return types;
3892
+ }());
3893
+
3894
+ }));
3895
+ /* vim: set sw=4 ts=4 et tw=80 : */