add compiletime evm bytecode generator to macro_assembler

This commit is contained in:
jangko 2020-07-24 19:54:27 +07:00
parent bb89a296dd
commit d089a61539
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 5 additions and 0 deletions

View File

@ -377,3 +377,8 @@ macro assembler*(list: untyped): untyped =
of "fork": boa.fork = parseFork(body)
else: error("unknown section '" & label & "'", callSection[0])
result = boa.generateVMProxy()
macro evmByteCode*(list: untyped): untyped =
list.expectKind nnkStmtList
var code = parseCode(list)
result = newLitFixed(code)