Commit Graph

191 Commits

Author SHA1 Message Date
Sean Larkin cf459052b4 fix semantic error 2017-01-27 11:17:27 -06:00
Tom910 588976d5e9 Deleting cache length size to loop 2017-01-24 22:39:38 +03:00
Sean Larkin 05fbec8eb2 feat(benchmark): add benchmarkCase for AST 2017-01-24 10:20:20 -06:00
Tom910 48866368cb Refactoring and optimize Parse.js 2017-01-23 21:51:59 +03:00
Sean Larkin 91b3b4608c
fix lint error 2017-01-21 12:12:54 -06:00
Sean Larkin 5e99e78ebb
converted additional forEach statements 2017-01-21 11:47:43 -06:00
Sean Larkin ab36859df7
feat(parser): increase parse optimization by switching forEach to for 2017-01-21 11:36:14 -06:00
Tobias Koppers a44694aa4e hoist exports declarations too
fixes #3972
2017-01-16 15:45:15 +01:00
Tobias Koppers 8e69a80847 code linting 2017-01-11 12:29:01 +01:00
Tobias Koppers 6ae2b07012 make harmony order stable 2017-01-09 00:50:32 +01:00
Kees Kluskens 644e3a009b Upgrade eslint (#3626)
* Upgrade eslint

* Pin down eslint version

* Temporary fix for difference between js-beautify and eslint

js-beautify suddenly requires a space between `while` here,
but everywhere else we use it without space.

* Remove redundant rules (present in eslint:recommended)

* Add rules comparable to js-beautify rules to eslint

* Add some forgotten files

* Ugh, fix some differences between eslint and js-beautify the nuclear way

* Add back variables
2016-12-29 10:10:41 -06:00
Tobias Koppers da29d21ae4 performance improvements
breaking change: Module has now a "unbuild" method that must work correctly
2016-12-14 16:22:16 +01:00
Tobias Koppers 73acc3b8af beautify missing files 2016-12-06 19:40:10 +01:00
Tobias Koppers 11eefd5841 added import(), fixes #3098 2016-12-03 11:50:44 +01:00
Diogo Franco (Kovensky) c1766122c0 Add descriptions for valid JSDoc 2016-11-21 23:38:56 +09:00
Diogo Franco (Kovensky) de44175cdd Refactor Parser additions 2016-11-21 08:37:22 +09:00
Diogo Franco (Kovensky) ebd6af2cdb Support basic template string simplification 2016-11-21 08:37:22 +09:00
Diogo Franco (Kovensky) 268f6b9bcf Pretend template is a string if it resolves to a constant 2016-11-21 08:37:22 +09:00
Diogo Franco (Kovensky) 5be77b3b33 Inline the TemplateElement evaluations 2016-11-21 08:37:22 +09:00
Diogo Franco (Kovensky) da5c735b56 Add implementation 2016-11-21 08:37:22 +09:00
Tobias Koppers aefe8d67a3 support desctruction for variable declaration
fixes #3273
2016-11-14 00:23:50 +01:00
zhaoshengjun 67b2f59ce5 chore(): Refactor code and fix test filter 2016-11-09 22:20:12 +10:00
zhaoshengjun 3ca9718ec4 add testing file 2016-11-09 13:31:21 +10:00
zhaoshengjun 4eff59777e fix(defaultAssign): fix default argument assignment(#3252) 2016-11-09 11:25:18 +10:00
Diogo Franco (Kovensky) 996a4b660b Fix issue #3238 2016-11-08 10:40:34 +09:00
Diogo Franco (Kovensky) fc8b1d348d Add async/await support to Parser 2016-10-31 10:48:33 +09:00
Tobias Koppers 25cab58eb3 fixed some standard linting issues 2016-09-20 00:19:39 +02:00
Bazyli Brzóska fe0c8cafb3 Keep the parsed comments along with the AST (#2905)
When plugging into the 'program' hook of the Parser, comments are preserved and passed as the second parameter, after the AST. 
This allows external plugins to make use of the comments contained within the files without re-parsing each file.
2016-09-08 20:52:53 +02:00
Tobias Koppers 78307a937f allow to display used exports
support Tree Shaking with import *
fixes #2713
2016-06-29 01:17:59 +02:00
Tobias Koppers cf00a1a22d rewrite cases where js beautify and eslint disagree on formatting 2016-06-20 21:46:27 +02:00
Simen Bekkhus b1bdd6989f Use eslint's indent rule 2016-06-20 08:21:00 +02:00
Tobias Koppers f6efe19d06 added support for default arguments
fixes #2622
2016-06-16 01:05:17 +02:00
Tobias Koppers 64972f2f2d hoist imports
fixes #2528
2016-06-16 01:05:17 +02:00
Tobias Koppers f4ba0d0f0a support for importing into object shothand
fixed #2522
2016-06-04 15:22:47 +02:00
Tobias Koppers 2edd1ad5eb support exporting classes
fixed #2523
2016-06-04 15:06:10 +02:00
Tobias Koppers f18d736a17 warn for errors while evaluating but ignore them 2016-06-04 14:19:55 +02:00
Tobias Koppers 7af71d4a69 allow a['b'] instead of a.b
fixed #2228
2016-06-04 12:06:10 +02:00
Tobias Koppers 4f74648d56 also try to parse the module as script
this should allow with() in a weird module
2016-02-13 10:53:31 +01:00
Tobias Koppers f5f4d2b791 Performance 2016-01-20 21:41:42 +01:00
Kenny Tran eebc5ceaf6 Fix no-redeclare in code 2016-01-18 18:57:42 -08:00
Tobias Koppers 91621a7c4b hoist exports, more efficent for immutable declarations 2015-10-31 14:43:44 +01:00
Tobias Koppers 0c110b4ac7 added es6 stuff to the parser
fixes #1490
2015-10-21 18:14:47 +02:00
Tobias Koppers 7cbd78c1da Merge branch 'master' into webpack-2
Conflicts:
	.travis.yml
	bin/config-optimist.js
	test/statsCases/define-plugin/expected.txt
2015-09-19 20:11:48 +02:00
Ahmet Katrancı 8ff6cb5fed Report constructor correctly when inheriting from Tapable 2015-08-18 12:35:57 +01:00
Tobias Koppers 431a4c791c Merge branch 'master' into webpack-2
Conflicts:
	hot/dev-server.js
	hot/only-dev-server.js
	hot/poll.js
	hot/signal.js
	lib/ChunkTemplate.js
	lib/HotModuleReplacement.runtime.js
	lib/HotModuleReplacementPlugin.js
	lib/JsonpMainTemplatePlugin.js
	lib/MainTemplate.js
	lib/NormalModule.js
	lib/Parser.js
	lib/RecordIdsPlugin.js
	lib/WebpackOptionsApply.js
	lib/dependencies/RequireEnsureDependency.js
	lib/node/OldNodeWatchFileSystem.js
	lib/optimize/OccurrenceOrderPlugin.js
	package.json
2015-07-17 09:30:37 +02:00
Tobias Koppers f7d799adb4 rebeautify without spacing after keyword 2015-07-16 00:19:23 +02:00
Avi Haiat 0a340f2b1a feat(app): Beautify all lib files 2015-07-13 01:20:09 +03:00
Tobias Koppers f4b9d5f57a Merge branch 'master' into webpack-2
Conflicts:
	lib/Compilation.js
	lib/Compiler.js
	lib/DefinePlugin.js
	lib/HotModuleReplacementPlugin.js
	lib/Parser.js
	lib/node/NodeSourcePlugin.js
	lib/node/OldNodeWatchFileSystem.js
	package.json
2015-04-27 20:22:13 +02:00
Tobias Koppers cebd3b9722 added linting 2015-04-23 23:55:50 +02:00
Tobias Koppers 210ef3d17d updated parser to new estree spec, updated deps 2015-04-14 22:44:21 +02:00
simonzack e5ba04c56b check for handler 2015-03-05 16:18:32 +11:00
simonzack 9a4c54d350 specify es6 in the parser 2015-03-05 15:40:14 +11:00
simonzack 5bd10d6e88 Merge remote-tracking branch 'remotes/origin/harmony'
Conflicts:
	lib/Parser.js
	package.json
2015-03-05 15:35:23 +11:00
simonzack 6a641b9f37 added walkForOfStatement 2015-03-05 15:34:05 +11:00
simonzack 592ee90988 switched to acorn for it's better es6 support 2015-03-05 15:32:09 +11:00
Tobias Koppers 3ddb26ff36 more reliable parsing of wrapped expressions
fixed #801
2015-02-28 00:51:15 +01:00
Tobias Koppers 196db0743d allow undefined, RegExp and objects in DefinePlugin
merged #807 and #791
2015-02-21 13:20:57 +01:00
Tobias Koppers 5f77afe5f4 ES6 parser, ES6 modules 2015-01-12 17:45:30 +01:00
Tobias Koppers c54989894b typeof RegExp may != object
fixes #649
2014-12-30 23:55:41 +01:00
Tobias Koppers 4fef1312c5 evaluate null
fixes #633
2014-12-22 09:32:42 +01:00
Tobias Koppers cc930801b5 more similar bugs with testcases
fixed #626
2014-12-16 08:12:30 +01:00
Rich Snapp 66de9a455f Walk computed MemberExpression properties 2014-12-11 12:14:51 -07:00
Tobias Koppers 41e42e8589 fixed renaming in IIFEs and Assignments
fixed #551, fixed #494
2014-10-26 11:17:47 +01:00
Tobias Koppers 27b23c0302 fixed detection of free vars while evaluating 2014-10-07 15:15:09 +02:00
Hugues Malphettes c2cc1dd231 Fix #412 - Support for holes inside Arrays
An array with a hole such as `[,'foo']` is parsed by Esprima as null.
Skip its evaluation.

Reference: https://code.google.com/p/esprima/issues/detail?id=525#c18
```
According to
https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API#Expressions:

  interface ArrayExpression <: Expression {
    type: "ArrayExpression";
    elements: [ Expression | null ];
  }
```
2014-08-19 09:59:35 +08:00
Tobias Koppers f7be3c7711 fixed substr bug 2014-08-05 08:30:39 +02:00
Tobias Koppers f53a7f3e66 fixed parsing of wrapped expressions
fixes #345
2014-07-07 13:20:38 +02:00
Tobias Koppers ca46619b5f renaming is off by default and only enabled for defined expressions
fixes #336
2014-07-02 21:34:29 +02:00
Tobias Koppers d80cdcefac Code Quality 2014-06-24 18:53:32 +02:00
Tobias Koppers 158f35bcf1 parser should not crash if to many arguments are passed to an IIFE
fixes #284
2014-05-27 11:52:48 +02:00
Tobias Koppers 23d28ddd43 evaluate stuff for renaming to capture more cases
fixes #208
2014-03-19 22:16:17 +01:00
Tobias Koppers 5e7dfc52cc experimental renaming support 2014-01-31 14:09:08 +01:00
Tobias Koppers 945d0c686f started renaming support
this currently only works for free vars that are really available.
2014-01-31 10:57:28 +01:00
Tobias Koppers 1df510b919 bug fix 2013-12-31 12:45:46 +01:00
Tobias Koppers fe2681cb31 track free vars over IIFEs
#138
2013-12-31 12:24:22 +01:00
Tobias Koppers d614f95898 fixes #136 2013-12-15 10:31:24 +01:00
Tobias Koppers f63a0d60c3 added "statement" plugin to Parser for custom stuff 2013-12-13 08:59:07 +01:00
Tobias Koppers 7633749814 added "program" plugin to Parser for custom stuff 2013-12-13 08:55:38 +01:00
Tobias Koppers 63f40c0e76 support fancy array in AMD, support .replace and .split 2013-12-08 14:59:52 +01:00
Tobias Koppers 415d161dbe evaluate the callee in CallExpression, fixes #117
This allow fancy wrappers around identifiers
2013-11-08 09:00:39 +01:00
Tobias Koppers 54782ef53d support a bit of math: +, -, *, / 2013-09-24 15:17:25 +02:00
Tobias Koppers 5346729da2 better typeof support 2013-09-24 15:09:08 +02:00
Tobias Koppers 01c2f45bf5 changed define option to be more C-like #99
values are code fragments now.
2013-09-24 14:49:39 +02:00
Tobias Koppers a37948d114 added options.define, evaluate conditionals, fixes #99 2013-09-13 11:17:57 +02:00
Tobias Koppers 8b2301056d added hot module replacement, fixes #26 2013-06-19 13:49:57 +02:00
Tobias Koppers 38d3c877dd support labeled modules fixes #72 2013-02-26 12:36:34 +01:00
Tobias Koppers 273506ee34 fix for RegExp evalutating, change in node-libs-browser 2013-02-25 18:18:49 +01:00
Tobias Koppers 1a449cefb6 better config file check, added hook for VariableDeclarators 2013-02-22 17:01:54 +01:00
Tobias Koppers 2183f05db8 added __resourceQuery, __dir/__filename compile time constant 2013-02-16 22:23:22 +01:00
Tobias Koppers 34424b36af fixed some stuff 2013-02-08 00:18:47 +01:00
Tobias Koppers ee01837d66 Refactored everything for 0.9 2013-01-30 18:49:25 +01:00