source: frontend/node_modules/webpack/lib/Parser.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 1.2 KB
RevLine 
[9af201e]1/*
2 MIT License http://www.opensource.org/licenses/mit-license.php
3 Author Tobias Koppers @sokra
4*/
5
6"use strict";
7
8/** @typedef {import("./config/defaults").WebpackOptionsNormalizedWithDefaults} WebpackOptions */
9/** @typedef {import("./Compilation")} Compilation */
10/** @typedef {import("./NormalModule")} NormalModule */
11
12/** @typedef {Record<string, EXPECTED_ANY>} PreparsedAst */
13
14/**
15 * Defines the parser state base type used by this module.
16 * @typedef {object} ParserStateBase
17 * @property {string | Buffer} source
18 * @property {NormalModule} current
19 * @property {NormalModule} module
20 * @property {Compilation} compilation
21 * @property {WebpackOptions} options
22 */
23
24/** @typedef {ParserStateBase & Record<string, EXPECTED_ANY>} ParserState */
25
26class Parser {
27 /* istanbul ignore next */
28 /**
29 * Parses the provided source and updates the parser state.
30 * @abstract
31 * @param {string | Buffer | PreparsedAst} source the source to parse
32 * @param {ParserState} state the parser state
33 * @returns {ParserState} the parser state
34 */
35 parse(source, state) {
36 const AbstractMethodError = require("./errors/AbstractMethodError");
37
38 throw new AbstractMethodError();
39 }
40}
41
42module.exports = Parser;
Note: See TracBrowser for help on using the repository browser.