@@ -490,11 +490,11 @@ function extract_param_text(p::JS.SyntaxTree)
490490 elseif k === JS. K " ::"
491491 n = JS. numchildren (p)
492492 if n == 1
493- typ = JS. sourcetext (p[1 ])
493+ typ = JS. sourcetext (p[1 ]):: AbstractString
494494 return String (" ::" * typ)
495495 elseif n == 2
496496 name = @something extract_param_text (p[1 ]) return nothing
497- typ = JS. sourcetext (p[2 ])
497+ typ = JS. sourcetext (p[2 ]):: AbstractString
498498 return String (name * " ::" * typ)
499499 else
500500 return nothing
@@ -575,18 +575,19 @@ function should_insert_spaces_around_equal(fi::FileInfo, ca::CallArgs)
575575 JS. kind (kwnode) === JS. K " kw" || continue
576576 has_equals += 1
577577 pos = offset_to_xy (fi, JS. first_byte (kwnode))
578- tok = token_at_offset (fi, pos)
578+ tok = @something token_at_offset (fi, pos) continue
579579 while JS. is_whitespace (this (tok))
580- tok = next_tok (tok)
580+ tok = @something next_tok (tok) @goto next
581581 end
582582 JS. kind (this (tok)) === JS. K " Identifier" || continue
583- tok = next_tok (tok)
583+ tok = @something next_tok (tok) continue
584584 JS. is_whitespace (this (tok)) || continue
585- tok = next_tok (tok)
585+ tok = @something next_tok (tok) continue
586586 JS. is_plain_equals (this (tok)) || continue
587- tok = next_tok (tok)
587+ tok = @something next_tok (tok) continue
588588 JS. is_whitespace (this (tok)) || continue
589589 has_whitespaces += 1
590+ @label next
590591 end
591592 return has_whitespaces ≥ has_equals - has_whitespaces
592593end
0 commit comments