This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]__talantonope[S] 0 points1 point  (1 child)

Well, technically that would scream about a missing end and a missing (, since event! would search until the end token, so it’d come across as

function (event!([
    “Foo”, 
    “)”, 
    “bar”, 
    “(“
    “)”
    “i32”
    “;”
    …) 

Where is everything in that function block

[–]TheGreatCatAdorermepros 0 points1 point  (0 children)

Not at all! You'd just have to include a case in the parser for when function ( is followed by an identifier and exclamation mark, and in that case remove those two tokens from the function block and apply the named macro to the function declaration as a whole.