webpack/lib/WebAssemblyParser.js

26 lines
517 B
JavaScript
Raw Normal View History

2017-10-30 20:56:57 +08:00
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
// Syntax: https://developer.mozilla.org/en/SpiderMonkey/Parser_API
const Tapable = require("tapable");
class WebAssemblyParser extends Tapable {
constructor(options) {
super();
this.options = options;
}
parse(source, initialState) {
// Does nothing current
// TODO parse WASM AST and walk it
// extract exports, imports
return initialState;
}
}
module.exports = WebAssemblyParser;