| 1 | module main |
| 2 | |
| 3 | pub enum ContentType { |
| 4 | none |
| 5 | block |
| 6 | inline |
| 7 | } |
| 8 | |
| 9 | pub struct Content { |
| 10 | pub: |
| 11 | @type ContentType |
| 12 | data string |
| 13 | } |
| 14 | |
| 15 | @[params] |
| 16 | struct Options { |
| 17 | path string @[required] |
| 18 | } |
| 19 | |
| 20 | fn new_content(data string) Content { |
| 21 | return Content{ |
| 22 | @type: .block |
| 23 | data: data |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | fn make_options(opts Options) Options { |
| 28 | return Options{ |
| 29 | ...opts |
| 30 | } |
| 31 | } |
| 32 |