You don't need a macro, you can just use a template.
    
    
    template label(name, body) =
      {.emit: astToStr(name) & ":".}
      body
    
    template goto(name) =
      {.emit: "goto " & astToStr(name) & ";".}
    
    proc main =
      echo "from here"
      goto here
      echo "nowhere"
      label here:
        echo "here we go"
    
    main()
    
    
    Run

Reply via email to