@@ -1532,14 +1532,6 @@ func default_() Options[AnnotationParameter] {
1532
1532
})
1533
1533
}
1534
1534
1535
- func raw_default () Options [AnnotationParameter ] {
1536
- return opt (AnnotationParameter {
1537
- Name : "raw_default" ,
1538
- Description : "Sets the raw default value for field." ,
1539
- Types : types (String ),
1540
- })
1541
- }
1542
-
1543
1535
func mut () Options [AnnotationParameter ] {
1544
1536
return opt (AnnotationParameter {
1545
1537
Name : "mut" ,
@@ -1595,6 +1587,14 @@ func lang_alias() Options[AnnotationParameter] {
1595
1587
})
1596
1588
}
1597
1589
1590
+ func lang_default () Options [AnnotationParameter ] {
1591
+ return opt (AnnotationParameter {
1592
+ Name : ".+_default" ,
1593
+ Description : "Sets the default value expression for field in target languages." ,
1594
+ Types : types (String ),
1595
+ })
1596
+ }
1597
+
1598
1598
func appendTo [S ~ []T , T any ](s * S , x ... T ) {
1599
1599
* s = append (* s , x ... )
1600
1600
}
@@ -1656,6 +1656,7 @@ func appendTo[S ~[]T, T any](s *S, x ...T) {
1656
1656
// available="!java",
1657
1657
// tokens="Name",
1658
1658
// default="John Doe",
1659
+ // cpp_default="\"John Doe\"",
1659
1660
// cpp_alias="std::string",
1660
1661
// )
1661
1662
// @optional
@@ -1705,7 +1706,7 @@ var Builtin = Grammar{
1705
1706
Struct : Struct {
1706
1707
Annotations : Annotations {base_next ("struct" , lang_alias ()), deprecated ()},
1707
1708
Field : StructField {
1708
- Annotations : Annotations {base_next ("struct.field" , raw_default (), default_ (), lang_alias ()), optional (), deprecated ()},
1709
+ Annotations : Annotations {base_next ("struct.field" , lang_default (), default_ (), lang_alias ()), optional (), deprecated ()},
1709
1710
},
1710
1711
},
1711
1712
Interface : Interface {
0 commit comments