webpack/lib/WebAssemblyParser.js

27 lines
544 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
2017-11-28 23:54:26 +08:00
const Tapable = require("tapable").Tapable;
2017-10-30 20:56:57 +08:00
class WebAssemblyParser extends Tapable {
constructor(options) {
super();
2017-11-28 23:54:26 +08:00
this.hooks = {};
2017-10-30 20:56:57 +08:00
this.options = options;
}
parse(source, initialState) {
// Does nothing current
// TODO parse WASM AST and walk it
// extract exports, imports
return initialState;
}
}
module.exports = WebAssemblyParser;