@@ -54,10 +54,10 @@ required):
54
54
55
55
- ** ecmaVersion** : Indicates the ECMAScript version to parse. Must be
56
56
either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019),
57
- 11 (2020), 12 (2021), 13 (2022, partial support)
58
- or ` " latest" ` ( the latest the library supports). This influences
59
- support for strict mode, the set of reserved words, and support
60
- for new syntax features.
57
+ 11 (2020), 12 (2021), 13 (2022), 14 (2023), or ` "latest" ` (the
58
+ latest the library supports). This influences support for strict
59
+ mode, the set of reserved words, and support for new syntax
60
+ features.
61
61
62
62
** NOTE** : Only 'stage 4' (finalized) ECMAScript features are being
63
63
implemented by Acorn. Other proposed new features must be
@@ -104,9 +104,9 @@ required):
104
104
- ** allowSuperOutsideMethod** : By default, ` super ` outside a method
105
105
raises an error. Set this to ` true ` to accept such code.
106
106
107
- - ** allowHashBang** : When this is enabled (off by default), if the
108
- code starts with the characters ` #! ` (as in a shellscript), the
109
- first line will be treated as a comment.
107
+ - ** allowHashBang** : When this is enabled, if the code starts with the
108
+ characters ` #! ` (as in a shellscript), the first line will be
109
+ treated as a comment. Defaults to true when ` ecmaVersion ` >= 2023 .
110
110
111
111
- ** locations** : When ` true ` , each node has a ` loc ` object attached
112
112
with ` start ` and ` end ` subobjects, each of which contains the
@@ -271,10 +271,3 @@ The utility spits out the syntax tree as JSON data.
271
271
## Existing plugins
272
272
273
273
- [ ` acorn-jsx ` ] ( https://github.com/RReverser/acorn-jsx ) : Parse [ Facebook JSX syntax extensions] ( https://github.com/facebook/jsx )
274
-
275
- Plugins for ECMAScript proposals:
276
-
277
- - [ ` acorn-stage3 ` ] ( https://github.com/acornjs/acorn-stage3 ) : Parse most stage 3 proposals, bundling:
278
- - [ ` acorn-class-fields ` ] ( https://github.com/acornjs/acorn-class-fields ) : Parse [ class fields proposal] ( https://github.com/tc39/proposal-class-fields )
279
- - [ ` acorn-import-meta ` ] ( https://github.com/acornjs/acorn-import-meta ) : Parse [ import.meta proposal] ( https://github.com/tc39/proposal-import-meta )
280
- - [ ` acorn-private-methods ` ] ( https://github.com/acornjs/acorn-private-methods ) : parse [ private methods, getters and setters proposal] ( https://github.com/tc39/proposal-private-methods ) n
0 commit comments