Well, this ain't gonna be pretty! I *think* what you're going to have to do is find the ":", isolate the size with %substr, compare it with "byte" etc. to convert it to a number... and I guess add it into a "sum"... It *may* be that someone has already written a macro to do this, or similar, which would save you a lot of trouble. I don't know where to find such a thing (I'm not much of a macro user).
Suppose you had it... "my_thingy a:dword, b:qword, c:byte", and you added 'em up to get 13. Is this the number you want? Or does the "byte" parameter really need to be a dword? Are you going to want "movzx byte eax, [c]"? Or "movsx" perhaps? Are you going to want to pack multiple "byte" parameters into a dword? This could get hellishly complicated! Think carefully about what you want this macro to do, before you start writing it!
I don't know if it's still true, but some versions of Masm screw it up if you use a "byte" parameter in "invoke". Six (!) bytes on the stack! This suggests "it ain't easy!", to me...
Best,
Frank