|
|
|
@ -19,7 +19,6 @@ function Compiler (handleImportCall) { |
|
|
|
|
this.event = new EventManager() |
|
|
|
|
|
|
|
|
|
var compileJSON |
|
|
|
|
var compilerAcceptsMultipleFiles |
|
|
|
|
|
|
|
|
|
var worker = null |
|
|
|
|
|
|
|
|
@ -74,8 +73,6 @@ function Compiler (handleImportCall) { |
|
|
|
|
if (worker === null) { |
|
|
|
|
var compiler = solc(window.Module) |
|
|
|
|
|
|
|
|
|
compilerAcceptsMultipleFiles = compiler.supportsMulti |
|
|
|
|
|
|
|
|
|
compileJSON = function (source, optimize, cb) { |
|
|
|
|
var missingInputs = [] |
|
|
|
|
var missingInputsCallback = function (path) { |
|
|
|
@ -261,7 +258,6 @@ function Compiler (handleImportCall) { |
|
|
|
|
var data = msg.data |
|
|
|
|
switch (data.cmd) { |
|
|
|
|
case 'versionLoaded': |
|
|
|
|
compilerAcceptsMultipleFiles = !!data.acceptsMultipleFiles |
|
|
|
|
onCompilerLoaded(data.data) |
|
|
|
|
break |
|
|
|
|
case 'compiled': |
|
|
|
@ -295,10 +291,6 @@ function Compiler (handleImportCall) { |
|
|
|
|
|
|
|
|
|
function gatherImports (files, target, importHints, cb) { |
|
|
|
|
importHints = importHints || [] |
|
|
|
|
if (!compilerAcceptsMultipleFiles) { |
|
|
|
|
cb(null, files[target]) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// FIXME: This will only match imports if the file begins with one.
|
|
|
|
|
// It should tokenize by lines and check each.
|
|
|
|
|