-
Notifications
You must be signed in to change notification settings - Fork 8
/
fix-vcd-type-discriminator_01.sed
40 lines (40 loc) · 1.09 KB
/
fix-vcd-type-discriminator_01.sed
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
33
34
35
36
37
38
39
40
{
/JSON_PROPERTY_TYPE = "_type"/,+1 {
s/type/_&/i;
};
0,/(\.JSON_PROPERTY_)(TYPE,?)$/s//\1_\2/;
0,/Objects\.equals\(this\.type,/ {
/Objects\.equals\(this\.type,/s/type/_&/g;
};
0,/\.append\(toIndentedString\(type\)\)/ {
/\.append\(toIndentedString\(type\)\)/s/type/_&/g;
};
/Objects\.hash/s/type[,\)]/_&/;
0,/type\([a-zA-Z]+ type\) \{/ {
/type\([a-zA-Z]+ type\) \{/ {
N;N;
s/type/_&/;
s/\.(type)/\._\1/;
}
};
0,/\(JSON_PROPERTY_TYPE\)/ {
/\(JSON_PROPERTY_TYPE\)/ {
N;N;N;N;N;
s/type/_&/i;
s/type = type/_&/;
s/(return )(type)/\1_\2/;
s/getType/get_Type/;
s/setType/set_Type/;
}
};
0,/\(JSON_PROPERTY_TYPE\)/ {
/\(JSON_PROPERTY_TYPE\)/ {
N;N;N;N;N;
s/type/_&/i;
s/type = type/_&/;
s/(return )(type)/\1_\2/;
s/getType/get_Type/;
s/setType/set_Type/;
}
};
}