mirror of
https://github.com/fluencelabs/asmble
synced 2025-04-24 22:32:19 +00:00
add using optional module name to registred names (#8)
This commit is contained in:
parent
1323e02c95
commit
119ce58c9e
@ -21,7 +21,7 @@ buildscript {
|
||||
allprojects {
|
||||
apply plugin: 'java'
|
||||
group 'com.github.cretz.asmble'
|
||||
version '0.4.2-fl'
|
||||
version '0.4.4-fl'
|
||||
|
||||
// skips building and running for the specified examples
|
||||
ext.skipExamples = ['c-simple', 'go-simple', 'rust-regex']
|
||||
|
@ -70,8 +70,10 @@ open class Translate : Command<Translate.Args>() {
|
||||
}
|
||||
}
|
||||
"wasm" ->
|
||||
Script(listOf(Script.Cmd.Module(BinaryToAst(logger = this.logger).toModule(
|
||||
ByteReader.InputStream(inBytes.inputStream())), null)))
|
||||
BinaryToAst(logger = this.logger).toModule(
|
||||
ByteReader.InputStream(inBytes.inputStream())).let { module ->
|
||||
Script(listOf(Script.Cmd.Module(module, module.names?.moduleName)))
|
||||
}
|
||||
else -> error("Unknown in format '$inFormat'")
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user