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>
916 B
916 B
Static class features support for Acorn
This is a plugin for Acorn - a tiny, fast JavaScript parser, written completely in JavaScript.
It implements support for static class features as defined in the stage 3 proposal Static class features. The emitted AST follows an ESTree proposal.
Usage
This module provides a plugin that can be used to extend the Acorn Parser
class:
const {Parser} = require('acorn');
const staticClassFeatures = require('acorn-static-class-features');
Parser.extend(staticClassFeatures).parse('class X { static x = 0 }');
License
This plugin is released under an MIT License.