Skip to content

Commit 3f5d033

Browse files
goto done instead of returning (#157)
1 parent 90ca5a2 commit 3f5d033

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/structs.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ end
513513
@wh
514514
if b == UInt8('}')
515515
pos += 1
516-
return pos, T()
516+
@goto done
517517
elseif b != UInt8('"')
518518
error = ExpectedOpeningQuoteChar
519519
@goto invalid
@@ -610,7 +610,7 @@ end
610610
@wh
611611
if b == UInt8('}')
612612
pos += 1
613-
return pos, T()
613+
@goto done
614614
elseif b != UInt8('"')
615615
error = ExpectedOpeningQuoteChar
616616
@goto invalid
@@ -621,6 +621,9 @@ end
621621
x = StructTypes.construct(c, T)
622622
return c.pos, x
623623

624+
@label done
625+
return pos, StructTypes.construct(values, T)
626+
624627
@label invalid
625628
invalid(error, buf, pos, T)
626629
end

0 commit comments

Comments
 (0)