@@ -15,20 +15,16 @@ private int ConsumeSMMethodmap()
15
15
if ( ( position + 4 ) < length )
16
16
{
17
17
var methodMapName = string . Empty ;
18
- var methodMapType = string . Empty ;
19
18
var methods = new List < SMMethodmapMethod > ( ) ;
20
19
var fields = new List < SMMethodmapField > ( ) ;
21
20
if ( t [ iteratePosition ] . Kind == TokenKind . Identifier )
22
21
{
22
+ methodMapName = t [ iteratePosition ] . Value ;
23
+
24
+ // Handle declaration like "methodmap MyMap __nullable { ... }"
23
25
if ( t [ iteratePosition + 1 ] . Kind == TokenKind . Identifier )
24
26
{
25
- methodMapType = t [ iteratePosition ] . Value ;
26
27
++ iteratePosition ;
27
- methodMapName = t [ iteratePosition ] . Value ;
28
- }
29
- else
30
- {
31
- methodMapName = t [ iteratePosition ] . Value ;
32
28
}
33
29
++ iteratePosition ;
34
30
}
@@ -97,7 +93,7 @@ private int ConsumeSMMethodmap()
97
93
var functionIndicators = new List < string > ( ) ;
98
94
var parameters = new List < string > ( ) ;
99
95
var methodName = string . Empty ;
100
- var methodReturnValue = string . Empty ;
96
+ var methodReturnType = string . Empty ;
101
97
var ParsingIndicators = true ;
102
98
var InCodeSection = false ;
103
99
var ParenthesisIndex = 0 ;
@@ -144,7 +140,7 @@ private int ConsumeSMMethodmap()
144
140
{
145
141
if ( t [ i + 1 ] . Kind == TokenKind . Identifier )
146
142
{
147
- methodReturnValue = t [ i ] . Value ;
143
+ methodReturnType = t [ i ] . Value ;
148
144
methodName = t [ i + 1 ] . Value ;
149
145
++ i ;
150
146
}
@@ -210,13 +206,13 @@ private int ConsumeSMMethodmap()
210
206
{
211
207
Index = mStartIndex ,
212
208
Name = methodName ,
213
- ReturnType = methodReturnValue ,
214
- MethodKind = functionIndicators . ToArray ( ) ,
215
- Parameters = parameters . ToArray ( ) ,
209
+ ReturnType = methodReturnType ,
210
+ /* MethodKind = functionIndicators.ToArray(),
211
+ Parameters = parameters.ToArray(),*/
216
212
FullName = TrimFullname ( source . Substring ( mStartIndex , mEndIndex - mStartIndex + 1 ) ) ,
217
213
Length = mEndIndex - mStartIndex + 1 ,
218
214
CommentString = TrimComments ( functionCommentString ) ,
219
- MethodmapName = methodMapName ,
215
+ ClassName = methodMapName ,
220
216
File = FileName
221
217
} ) ;
222
218
}
@@ -287,13 +283,13 @@ private int ConsumeSMMethodmap()
287
283
}
288
284
if ( fStartIndex < fEndIndex )
289
285
{
290
- fields . Add ( new SMMethodmapField ( )
286
+ fields . Add ( new SMMethodmapField
291
287
{
292
288
Index = fStartIndex ,
293
289
Length = fEndIndex - fStartIndex + 1 ,
294
290
Name = fieldName ,
295
291
File = FileName ,
296
- MethodmapName = methodMapName ,
292
+ ClassName = methodMapName ,
297
293
FullName = source . Substring ( fStartIndex , fEndIndex - fStartIndex + 1 )
298
294
} ) ;
299
295
}
@@ -308,7 +304,6 @@ private int ConsumeSMMethodmap()
308
304
Length = t [ lastIndex ] . Index - startIndex + 1 ,
309
305
Name = methodMapName ,
310
306
File = FileName ,
311
- Type = methodMapType ,
312
307
InheritedType = inheriteType
313
308
} ;
314
309
mm . Methods . AddRange ( methods ) ;
0 commit comments