aboutsummaryrefslogtreecommitdiff
path: root/v_windows/v/old/vlib/v/fmt/tests/attrs_keep.vv
blob: cad488cec8176d549c90656aa45e0bdce727869c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
struct AttrsWithEscpaedStringArgs {
	dollar    string [foo: '\$var']
	double_bs string [bar: '\\baz']
}

[deprecated: 'use bar() instead']
[foo: bar]
[if debug; inline]
fn keep_attributes() {
	println('hi !')
}

[bar: 'foo']
fn attr_with_arg() {}

['a_string_name']
fn name_only_attr() {}

struct User {
	age           int
	nums          []int
	last_name     string [json: lastName]
	is_registered bool   [json: IsRegistered]
	typ           int    [json: 'type']
	pets          string [json: 'pet_animals'; raw]
}

[_allow_multiple_values]
enum Example {
	value1 = 1
	value1_again = 1
}