diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2019-04-24 22:49:32 +0200 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2019-04-30 16:22:56 +0200 |
commit | 72c6ea26830025c9b7cecb2b1dfd1002481d93ad (patch) | |
tree | 51d789d32ffaa3834862722521e1f02ad02a8eae /deps/acorn-plugins/acorn-class-fields/README.md | |
parent | 98e9de7db930e505884ca8d0ca6588afbe43f127 (diff) | |
download | android-node-v8-72c6ea26830025c9b7cecb2b1dfd1002481d93ad.tar.gz android-node-v8-72c6ea26830025c9b7cecb2b1dfd1002481d93ad.tar.bz2 android-node-v8-72c6ea26830025c9b7cecb2b1dfd1002481d93ad.zip |
deps: add acorn stage-3 plugins
This adds bigint, class-fields, numeric-separators, static-class
features, private class methods and fields as dependency. That way
it's possible to use these in combination with acorn to parse these
language features.
This also removes a couple of files that were not necessary for
Node.js to reduce the code base.
PR-URL: https://github.com/nodejs/node/pull/27400
Refs: https://github.com/nodejs/node/issues/27391
Refs: https://github.com/nodejs/node/issues/25835
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'deps/acorn-plugins/acorn-class-fields/README.md')
-rw-r--r-- | deps/acorn-plugins/acorn-class-fields/README.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/deps/acorn-plugins/acorn-class-fields/README.md b/deps/acorn-plugins/acorn-class-fields/README.md new file mode 100644 index 0000000000..60f3463e94 --- /dev/null +++ b/deps/acorn-plugins/acorn-class-fields/README.md @@ -0,0 +1,21 @@ +# Class fields support for Acorn + +[![NPM version](https://img.shields.io/npm/v/acorn-class-fields.svg)](https://www.npmjs.org/package/acorn-class-fields) + +This is a plugin for [Acorn](http://marijnhaverbeke.nl/acorn/) - a tiny, fast JavaScript parser, written completely in JavaScript. + +It implements support for class fields as defined in the stage 3 proposal [Class field declarations for JavaScript](https://github.com/tc39/proposal-class-fields). The emitted AST follows [an ESTree proposal](https://github.com/estree/estree/pull/180). + +## Usage + +This module provides a plugin that can be used to extend the Acorn `Parser` class: + +```javascript +const {Parser} = require('acorn'); +const classFields = require('acorn-class-fields'); +Parser.extend(classFields).parse('class X { x = 0 }'); +``` + +## License + +This plugin is released under an [MIT License](./LICENSE). |