File tree Expand file tree Collapse file tree 3 files changed +67
-0
lines changed Expand file tree Collapse file tree 3 files changed +67
-0
lines changed Original file line number Diff line number Diff line change @@ -6198,6 +6198,14 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
6198
6198
}
6199
6199
}
6200
6200
<CSAccessorDecl>"{" { curlyCount++; }
6201
+ <CSAccessorDecl>"}"{B}*"=" {
6202
+ // fall back to next rule if it's not the right bracket
6203
+ if (curlyCount != 0) REJECT;
6204
+ current->initializer = "=";
6205
+ current->endBodyLine=yyLineNr;
6206
+ lastInitializerContext = FindMembers;
6207
+ BEGIN(ReadInitializer);
6208
+ }
6201
6209
<CSAccessorDecl>"}" {
6202
6210
if (curlyCount)
6203
6211
{
@@ -6207,6 +6215,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
6207
6215
{
6208
6216
mtype = Method;
6209
6217
virt = Normal;
6218
+ // not really important, but while we are at it
6219
+ current->endBodyLine=yyLineNr;
6210
6220
unput(';');
6211
6221
BEGIN(FindMembers);
6212
6222
}
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" standalone =" no" ?>
2
+ <doxygen xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" compound.xsd" version =" " >
3
+ <compounddef id =" class_class1" kind =" class" language =" C#" prot =" public" >
4
+ <compoundname >Class1</compoundname >
5
+ <sectiondef kind =" property" >
6
+ <memberdef kind =" property" id =" class_class1_1a6b0b2ab73516e37adb38b8ff33f97c40" prot =" public" static =" no" readable =" no" writable =" no" gettable =" yes" privategettable =" no" protectedgettable =" no" settable =" no" privatesettable =" no" protectedsettable =" no" >
7
+ <type >int</type >
8
+ <definition >int Class1.Property1</definition >
9
+ <argsstring />
10
+ <name >Property1</name >
11
+ <initializer >= 1</initializer >
12
+ <briefdescription >
13
+ </briefdescription >
14
+ <detaileddescription >
15
+ </detaileddescription >
16
+ <inbodydescription >
17
+ </inbodydescription >
18
+ <location file =" 066_property_initializer.cs" line =" 5" column =" 1" bodyfile =" 066_property_initializer.cs" bodystart =" 5" bodyend =" 5" />
19
+ </memberdef >
20
+ <memberdef kind =" property" id =" class_class1_1a0d5b843d48ebc2c078e003d6ff3a1610" prot =" public" static =" no" readable =" no" writable =" no" gettable =" yes" privategettable =" no" protectedgettable =" no" settable =" yes" privatesettable =" no" protectedsettable =" no" >
21
+ <type >string</type >
22
+ <definition >string Class1.Property2</definition >
23
+ <argsstring />
24
+ <name >Property2</name >
25
+ <briefdescription >
26
+ </briefdescription >
27
+ <detaileddescription >
28
+ </detaileddescription >
29
+ <inbodydescription >
30
+ </inbodydescription >
31
+ <location file =" 066_property_initializer.cs" line =" 6" column =" 1" bodyfile =" 066_property_initializer.cs" bodystart =" 6" bodyend =" 6" />
32
+ </memberdef >
33
+ </sectiondef >
34
+ <briefdescription >
35
+ </briefdescription >
36
+ <detaileddescription >
37
+ </detaileddescription >
38
+ <location file =" 066_property_initializer.cs" line =" 4" column =" 1" bodyfile =" 066_property_initializer.cs" bodystart =" 3" bodyend =" 7" />
39
+ <listofallmembers >
40
+ <member refid =" class_class1_1a6b0b2ab73516e37adb38b8ff33f97c40" prot =" public" virt =" non-virtual" >
41
+ <scope >Class1</scope >
42
+ <name >Property1</name >
43
+ </member >
44
+ <member refid =" class_class1_1a0d5b843d48ebc2c078e003d6ff3a1610" prot =" public" virt =" non-virtual" >
45
+ <scope >Class1</scope >
46
+ <name >Property2</name >
47
+ </member >
48
+ </listofallmembers >
49
+ </compounddef >
50
+ </doxygen >
Original file line number Diff line number Diff line change
1
+ // objective: C# property initializer
2
+ // check: class_class1.xml
3
+ class Class1
4
+ {
5
+ public int Property1 { get ; } = 1 ;
6
+ public string Property2 { get ; set ; }
7
+ }
You can’t perform that action at this time.
0 commit comments