From 5ea2b4673734a5b14e4a56549c5db0b6e0df3720 Mon Sep 17 00:00:00 2001 From: Mike Cohen Date: Tue, 20 May 2025 12:28:13 +1000 Subject: [PATCH] Bugfix: Merge callsites when visiting args This would cause callsites to be lost within args subqueries which affected the verifier --- arg_parser/parser.go | 2 +- visitor.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arg_parser/parser.go b/arg_parser/parser.go index 0477fbb..c99f9dd 100644 --- a/arg_parser/parser.go +++ b/arg_parser/parser.go @@ -213,7 +213,7 @@ func stringParser(ctx context.Context, scope types.Scope, // Convert integer things to what they normally would look // like as a string case uint64, int64, uint32, int32, uint16, - int16, uint8, int8, float64, float32: + int16, uint8, int8, float64, float32, int: return fmt.Sprintf("%v", arg), nil default: diff --git a/visitor.go b/visitor.go index 745210c..fdbddad 100644 --- a/visitor.go +++ b/visitor.go @@ -98,6 +98,7 @@ func NewVisitor(scope types.Scope, options FormatOptions) *Visitor { // Merge results from the in visitor to this visitor. func (self *Visitor) merge(in *Visitor) { self.Fragments = append([]string{}, in.Fragments...) + self.CallSites = append(self.CallSites, in.CallSites...) self.line_breaks = in.line_breaks self.indents = append([]int{}, in.indents...) self.pos = in.pos