390 Commits

Author SHA1 Message Date
Ingvar Stepanyan
879d40989a Fix #9 by removing invalid logic introduced with #1. 2014-11-28 16:51:50 +02:00
Ingvar Stepanyan
7a3683de2b Fix space not being skipped after object literal inside expression container.
Fixes #7.
2014-11-22 11:51:28 +02:00
Sebastian McKenzie
f3f49cee80 Fix #5 regression text 2014-11-20 21:38:16 +11:00
Ingvar Stepanyan
731984ebc7 Update version. 2014-11-20 12:23:49 +02:00
Ingvar Stepanyan
29c028acf9 Temporarily disable JSX parser. 2014-11-20 12:22:53 +02:00
Ingvar Stepanyan
46c95f5aee Merge pull request #6 from sebmck/patch-1
Fix spread attributes within elements inside expression containers.
2014-11-20 12:22:15 +02:00
Sebastian McKenzie
20a5d62ac6 Add regression test for #5 2014-11-20 21:07:03 +11:00
Sebastian McKenzie
d3e987896c Fix spread attributes within elements inside expression containers 2014-11-20 19:46:47 +11:00
Ingvar Stepanyan
82f88c459d Fix ignored whitespaces before children elements.
Similar to 790afe (template literals).
Fixes #4.
2014-11-15 02:30:12 +02:00
Ingvar Stepanyan
8ef9ecc34d Update version. 2014-11-13 19:25:25 +02:00
Ingvar Stepanyan
42d21f5064 Merge branch 'upstream' into jsx
Conflicts:
	acorn.js
	test/run.js
2014-11-13 19:25:00 +02:00
Rich Harris
f48a921e24 allow export { default } from "foo" 2014-11-12 17:42:55 +01:00
Marijn Haverbeke
98691e5b80 Properly initialize top node start position 2014-11-12 17:31:45 +01:00
Marijn Haverbeke
249e6961f8 Make tests pass for loose parser
Define Program node extent to be the whole program, make
both parser and the tests conform to this.

Fix a bunch of bugs in the loose parser's handling of corner
cases.

Issue #151
2014-11-12 17:05:19 +01:00
Ingvar Stepanyan
bc64d3c5f4 Add support for nested groups in log (Chrome console + browser). 2014-11-12 16:19:16 +01:00
Ingvar Stepanyan
96ccdb05fa Web-driver support for loose parser + small fixes.
* Added support for acorn_loose and grouped log to web-driver.
* Removed unused copy-pasted `parseTemplate` from loose parser.
* Throw non-SyntaxError errors immediately (as those are generic).
2014-11-12 16:19:16 +01:00
Ingvar Stepanyan
6bf8311061 Loose: fix #33. 2014-11-12 16:19:16 +01:00
Ingvar Stepanyan
2419de74dc Loose: Fix regex after tokenizer changes in #144. 2014-11-12 16:19:16 +01:00
Ingvar Stepanyan
fc2e96fa01 Loose: respect optional semicolons in break/continue/class/import/export. 2014-11-12 16:19:16 +01:00
Ingvar Stepanyan
d4565fed53 Loose: ES6 import, export.
Removed "kind" from tests for ES6 import/export as it's
left only for backward compatibility.
2014-11-12 16:19:15 +01:00
Ingvar Stepanyan
4647f966eb Loose: don't silently skip missed elements in expr list. 2014-11-12 16:19:15 +01:00
Ingvar Stepanyan
aa96edf769 Loose: support for-of without var. 2014-11-12 16:19:15 +01:00
Ingvar Stepanyan
1589a959fa Loose: yield support. 2014-11-12 16:19:15 +01:00
Ingvar Stepanyan
80f8d527ff Loose: Skip ES7 tests as we are targeting ES6 now. 2014-11-12 16:19:15 +01:00
Ingvar Stepanyan
bdce88c184 Loose: for-of statement. 2014-11-12 16:19:15 +01:00
Ingvar Stepanyan
992fc0503d Loose: arrow functions. 2014-11-12 16:19:15 +01:00
Ingvar Stepanyan
ede10a079c Loose: class support. 2014-11-12 16:19:15 +01:00
Ingvar Stepanyan
c6b6ef389e Loose: Remove own tabSize initialization in favor of defaultOptions. 2014-11-12 16:19:15 +01:00
Ingvar Stepanyan
9cdc6809ce Loose: fix pattern+defaults case in function params. 2014-11-12 16:19:15 +01:00
Ingvar Stepanyan
b46b53e149 Loose: implement object methods; expose processed options from acorn. 2014-11-12 16:19:15 +01:00
Ingvar Stepanyan
143066184c Emit full stack trace for unknown exceptions. 2014-11-12 16:19:15 +01:00
Ingvar Stepanyan
dda90580df Loose: Added support for shorthand properties. 2014-11-12 16:19:15 +01:00
Ingvar Stepanyan
963a26e46f Loose: Added support for let and const.
Fixes #146.
2014-11-12 16:19:15 +01:00
Ingvar Stepanyan
4879af22d1 Loose: Added support for assignment patterns to expression and variables. 2014-11-12 16:19:15 +01:00
Ingvar Stepanyan
c5145cedb2 Fix no-options case for acorn. 2014-11-12 16:19:14 +01:00
Ingvar Stepanyan
eba8a5646c Loose: added support for holes in arrays (but disallows trailing comma). 2014-11-12 16:19:14 +01:00
Ingvar Stepanyan
a14a5c8192 Loose: Added support for rest parameters.
Includes correction of mistype ".." vs "...".
2014-11-12 16:19:14 +01:00
Ingvar Stepanyan
b47696eecf Avoid UnaryExpression-specific properties in SpreadElement (just in case). 2014-11-12 16:19:14 +01:00
Ingvar Stepanyan
72df78cc88 Avoid separate handling of SpreadElement in favor of UnaryExpression parser. 2014-11-12 16:19:14 +01:00
Ingvar Stepanyan
ac8bdc608d Allow specifying expected comments/tokens arrays with onComment/onToken.
Allows to avoid both custom `testAssert` and adding extra arguments in `test`.
2014-11-12 16:19:14 +01:00
Ingvar Stepanyan
6d64834352 Removed manual onComment test in favor of new argument. 2014-11-12 16:19:14 +01:00
Ingvar Stepanyan
0abe4b64a8 Collect test stats separately for each mode. 2014-11-12 16:19:14 +01:00
Ingvar Stepanyan
b7367a2a8c Make setOptions non-destructive for original object. 2014-11-12 16:19:14 +01:00
Ingvar Stepanyan
11ecb20e9e Loose: ES6 function params support. 2014-11-12 16:19:14 +01:00
Ingvar Stepanyan
c26fd33826 Clone test options object since calling parse is destructive for it. 2014-11-12 16:19:14 +01:00
Ingvar Stepanyan
61d2067b2b Loose: Added ParenthesizedExpression. 2014-11-12 16:19:13 +01:00
Ingvar Stepanyan
7db211d56a Added loose parser support to test runner (currently failing for 208/1680). 2014-11-12 16:19:13 +01:00
Ingvar Stepanyan
d424874cf8 Editorconfig: enforce Unix line endings and extra new line in the end of file. 2014-11-12 16:19:13 +01:00
Ingvar Stepanyan
86f8c56d2b Added .editorconfig. 2014-11-12 16:19:13 +01:00
Ingvar Stepanyan
074db16fb7 Indentation fix. 2014-11-12 16:19:13 +01:00