| 1 | @[if debug] |
| 2 | fn foo(x int) { |
| 3 | println('foo, x: ${x}') |
| 4 | } |
| 5 | |
| 6 | @[if bar ?] |
| 7 | fn bar(x int) { |
| 8 | println('bar, x: ${x}') |
| 9 | } |
| 10 | |
| 11 | fn main() { |
| 12 | $if debug { |
| 13 | println('main with debug') |
| 14 | } |
| 15 | foo(123) // will not be called if `-d debug` is not passed |
| 16 | bar(456) // will not be called if `-d bar` is not passed |
| 17 | println('done') |
| 18 | } |
| 19 |