naggum icon indicating copy to clipboard operation
naggum copied to clipboard

Assembler method definition format

Open ForNeVeR opened this issue 9 years ago • 1 comments
trafficstars

We (I and @gsomix) have came to conclusion that it'll be better to use the following format for the method definitions in Naggum.Assembler:

 (.method (name arguments returnType ?metadata) &body)

So we could turn the metadata to an optional argument. @gsomix said that it reminds him Scheme procedure definition syntax.

ForNeVeR avatar Dec 27 '15 12:12 ForNeVeR

Maybe syntax for the call instruction should be also changed to mirror the definition syntax. Consider something like the following:

(call (mscorlib System.Console (WriteLine (System.Int32) System.Void)))

i.e. (call (<assembly> <type> (<method> <arguments> <returnType>))).

ForNeVeR avatar Dec 27 '15 13:12 ForNeVeR