Skip to content

Commit b4b5ec3

Browse files
committed
Fixed issue in parse global options
1 parent 8d5a19e commit b4b5ec3

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

src/FlowBridger/Parsers/SchemaParser.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,21 +267,30 @@ public static SchemaModel ParseSchema ( string content ) {
267267
}
268268
var (lineName, lineValue) = ParseLine ( currentLine );
269269
var lowerName = lineName.ToLowerInvariant ();
270-
if ( lowerName is GlobalMethod ) globalMethods.Add ( ParseMethod ( lines, version ) );
271-
if ( lowerName is GlobalDelegate ) globalDelegates.Add ( ParseMethod ( lines, version ) );
270+
if ( lowerName is GlobalMethod ) {
271+
globalMethods.Add ( ParseMethod ( lines, version ) );
272+
continue;
273+
}
274+
if ( lowerName is GlobalDelegate ) {
275+
globalDelegates.Add ( ParseMethod ( lines, version ) );
276+
continue;
277+
}
272278
if ( lowerName == GlobalOptions ) {
273279
var (optionName, optionValue) = ParseGlobalOption ( lines, version );
274280
if ( !string.IsNullOrEmpty ( optionName ) ) globalOptions.Add ( optionName, optionValue );
281+
continue;
275282
}
276283
if ( lowerName is EventInOut or EventIn or EventOut ) {
277284
var (methods, delegates, @event) = ParseEvent ( lines, version, indirection: lowerName.Contains ( "in" ), outdirection: lowerName.Contains ( "out" ) );
278285
if ( methods.Any () ) globalMethods.AddRange ( methods );
279286
if ( delegates.Any () ) globalDelegates.AddRange ( delegates );
280287
globalEvents.Add ( @event );
288+
continue;
281289
}
282290
if ( lowerName == Version && string.IsNullOrEmpty ( version ) ) {
283291
version = lineValue;
284292
lines.TakeNextLine ();
293+
continue;
285294
}
286295

287296
lines.TakeNextLine ();

0 commit comments

Comments
 (0)