1135 Commits

Author SHA1 Message Date
Ingvar Stepanyan
252bb46f70 Merge branch 'upstream' into jsx2 2015-01-22 16:11:28 +02:00
Ingvar Stepanyan
caa5da6ce1 Improve spread element parsing (fix allowed contexts and error locations). 2015-01-21 23:51:40 +02:00
Ingvar Stepanyan
d1f28b75aa Merge branch 'upstream' into jsx2 2015-01-21 03:01:27 +00:00
Ingvar Stepanyan
29910d2b2d XJS -> JSX as per facebook/esprima#83. 2015-01-21 03:00:12 +00:00
Ingvar Stepanyan
cae13fd75a Small simplifications after merge. 2015-01-21 02:58:02 +00:00
Marijn Haverbeke
94b5efcd3e Disallow declaration statements in block-less context
Closes #202
2015-01-20 12:55:21 +01:00
Forbes Lindesay
33a7c9fc24 Support import and export declarations in acorn/util/walk 2015-01-20 12:28:20 +01:00
Marijn Haverbeke
a1d2561cfa Restore patch 9f7cb552648829796ab4d6836d08246e95f16b9d to original shape
And make loose parser handle stray class semicolons

Issue #190
2015-01-20 12:02:30 +01:00
Sebastian McKenzie
9f7cb55264 Add stray semicolons as class elements 2015-01-20 11:56:33 +01:00
Ingvar Stepanyan
d64efe1be4 Merge branch 'upstream' into jsx2
Conflicts:
	acorn.js
2015-01-19 14:12:24 +00:00
Sebastian McKenzie
dce9e241db Merge pull request #23 from hawkrives/patch-1
Update .npmignore to ignore big, not-used-in-NPM directories
2015-01-19 08:28:19 +11:00
Hawken Rives
9564ce9fd4 Update .npmignore
Ignore `test` (2.7MB) and `docs` (651KB)
2015-01-18 09:42:10 -06:00
Sebastian McKenzie
b82d5f0290 Merge branch 'master' of github.com:6to5/acorn-6to5 2015-01-18 19:24:30 +11:00
Sebastian McKenzie
89d8eff5ad v0.11.1-18 2015-01-18 19:20:51 +11:00
Sebastian McKenzie
587ab0d07c Merge pull request #22 from tricknotes/fix-repo-name
Fix repository name
2015-01-18 19:17:52 +11:00
Ryunosuke SATO
d24b59ca42 Fix repository name
Now `acorn-6to5` is owned by 6to5 organization.
2015-01-18 17:17:14 +09:00
Sebastian McKenzie
d425759ca7 Merge pull request #21 from charliesome/fix-associativity-parsing-again
Fix associativity parsing, hopefully for good this time
2015-01-18 19:15:44 +11:00
Sebastian McKenzie
d6dec48335 Merge pull request #20 from tricknotes/keep-acorn_scp
Keep acorn_csp.js for npm module
2015-01-18 19:14:48 +11:00
Charlie Somerville
8296fe1415 fix associativity parsing, hopefully for good this time 2015-01-18 19:14:19 +11:00
Ryunosuke SATO
a2f1b75243 Keep acorn_csp.js for npm module
The published version v0.11.1-17 doesn't include acorn_csp.js.
`.npmignore` is required to keep it on NPM module.
2015-01-18 17:12:05 +09:00
Sebastian McKenzie
5f9f588386 fix flow function param type parsing - allow optional notation as well as type declaration - fixes 6to5/6to5#524 2015-01-18 18:33:42 +11:00
Sebastian McKenzie
2debaf0f5e v0.11.1-17 2015-01-18 12:14:49 +11:00
Sebastian McKenzie
7c3a487355 fix exponentiation tests 2015-01-18 12:13:38 +11:00
Sebastian McKenzie
a0a20f9fb2 fix styling in right associative 2015-01-18 10:38:13 +11:00
Sebastian McKenzie
a189dbdcef Merge pull request #19 from charliesome/fix-right-associative-parse
Fix right associative parse precedence
2015-01-18 10:36:12 +11:00
Charlie Somerville
30e9978ffb pass minPrec when right recursing rather than prec - 1 2015-01-18 10:34:34 +11:00
Marijn Haverbeke
dac747dfa9 Add a test for issue #201 2015-01-17 22:26:34 +01:00
Marijn Haverbeke
3e513fc6a8 Kill finishNodeAt in acorn_loose as well
Issue #200
2015-01-17 22:22:26 +01:00
Ingvar Stepanyan
6dee98d1b9 Adapt ES6 template handling to new tokenizer.
Avoid need for:
* extra `templates` array in favor of new `tokContext`;
* special location handling for first & last template elements;
* separate `_templateContinued` token in favor of same `_template`.

Adds:
* token types for backQuote and dollarBraceL instead of skipping them
so they can be handled (i.e. highlighted differently).
2015-01-17 22:21:22 +01:00
Sebastian McKenzie
bdb8e57283 add extra exponentiation operator test 2015-01-18 00:55:12 +11:00
Sebastian McKenzie
572b98b6b9 Merge pull request #18 from charliesome/pow-associativity
Fix ** operator associativity
2015-01-18 00:46:24 +11:00
Charlie Somerville
b51118c3fc use right recursion for right associative operators 2015-01-18 00:44:17 +11:00
Charlie Somerville
5f42326f34 set the rightAssociative flag on _exponent 2015-01-18 00:44:14 +11:00
Sebastian McKenzie
f558bd7db4 remove acorn csp from repo 2015-01-18 00:28:13 +11:00
Sebastian McKenzie
1322501276 add make build task 2015-01-18 00:25:01 +11:00
Sebastian McKenzie
58f84e595f add more exponentation operator tests 2015-01-18 00:24:48 +11:00
Sebastian McKenzie
dc197cecf7 add acorn_csp.js to gitignore 2015-01-18 00:24:28 +11:00
Sebastian McKenzie
8aa74ab845 Merge pull request #17 from jridgewell/mallot
Support Mallet operator
2015-01-17 21:58:48 +11:00
Justin Ridgewell
856571e948 Support Mallet operator
The mallet will check to see if the variable is falsey, and if
it is, override it. It's almost the same as `a = a || b`.

Re: 6to5/6to5#516
2015-01-16 18:28:25 -05:00
Sebastian McKenzie
196ab15f80 Merge pull request #16 from kossnocorp/acorn-6to5/fix_test
Turn on playground for `"obj ?= 2"`
2015-01-17 10:08:53 +11:00
Sasha Koss
ff769780ea Turn on playground for "obj ?= 2"
Without it fail with different issue, doesn’t connected to real case:
`Got error message: Unexpected token (1:5)`.
2015-01-16 20:09:07 +05:30
Ingvar Stepanyan
f6c45ac59f Re-read only number or string after "use strict".
Fixes double-entering same tokContext for various parentheses.
2015-01-14 23:10:10 +02:00
Sebastian McKenzie
f3299fa88d v0.11.1-16 2015-01-15 02:44:52 +11:00
Sebastian McKenzie
886d84c18c limit memoisation assignment operator to playground mode 2015-01-15 02:44:15 +11:00
Ingvar Stepanyan
d34aea63ab Update tests. 2015-01-14 12:36:25 +02:00
Ingvar Stepanyan
e7beee177d Remove deprecated ComprehensionBlock.of property.
Comprehensions were moved to ES7 anyway, so there is no sense
in keeping intermediate no-more-supported syntax.
2015-01-14 12:35:00 +02:00
Ingvar Stepanyan
7e85da74cb shouldSkipSpace is no more needed in finishToken. 2015-01-14 12:31:59 +02:00
Ingvar Stepanyan
ad9411d2ae Made tokenize() compliant with ES6 iterables for easier processing. 2015-01-14 12:29:20 +02:00
Ingvar Stepanyan
802c4cd8cb Initial rewrite of JSX parser onto new tokenizer (all tests passing). 2015-01-14 12:18:08 +02:00
Marijn Haverbeke
0f55a53a7d [loose parser] Fetch token before comment when tokenizer raises unterminated comment error
Closes #197
2015-01-13 22:18:55 +01:00