| | |
| | | /** @typedef {Record<string, EXPECTED_ANY>} PreparsedAst */ |
| | | |
| | | /** |
| | | * Defines the parser state base type used by this module. |
| | | * @typedef {object} ParserStateBase |
| | | * @property {string | Buffer} source |
| | | * @property {NormalModule} current |
| | |
| | | * @property {WebpackOptions} options |
| | | */ |
| | | |
| | | /** @typedef {Record<string, EXPECTED_ANY> & ParserStateBase} ParserState */ |
| | | /** @typedef {ParserStateBase & Record<string, EXPECTED_ANY>} ParserState */ |
| | | |
| | | class Parser { |
| | | /* istanbul ignore next */ |
| | | /** |
| | | * Parses the provided source and updates the parser state. |
| | | * @abstract |
| | | * @param {string | Buffer | PreparsedAst} source the source to parse |
| | | * @param {ParserState} state the parser state |