ethereum / serpent

Other
366 stars 107 forks source link

preprocessing stage and macro evaluation stage #84

Open ethers opened 9 years ago

ethers commented 9 years ago

develop 8236410

This is for reference, as possible improvement to future Serpent version.

preprocessing stage happens before macro evaluation stage, so code like the following doesn't work:

macro m():
    # (sha3(1, chars=48):uint256)  by itself this works
    x=1
    (sha3(x, chars=48):uint256)

def foo():
    return (m())

Invalid argument count or LLL function: (kv (~sha3 (get 'x) 48) (get 'uint256))