Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mcy committed Feb 28, 2025
1 parent 7453f9c commit 0ee1f76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion experimental/ast/syntax/editions.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
package syntax

import (
"iter"

"github.com/bufbuild/protocompile/internal/ext/iterx"
"github.com/bufbuild/protocompile/internal/iter"
)

// IsEdition returns whether this represents an edition.
Expand Down
3 changes: 2 additions & 1 deletion experimental/parser/legalize_decl.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package parser

import (
"fmt"
"slices"
"strings"
"unicode"

Expand Down Expand Up @@ -319,7 +320,7 @@ func legalizeRange(p *parser, parent classified, decl ast.DeclRange) {
edits = append(edits, report.Edit{
Start: span.Len(), End: span.Len(),
Replace: fmt.Sprintf("\n%sreserved %s;", span.Indentation(), iterx.Join(
iterx.Map(slicesx.Values(least), func(e ast.ExprAny) string { return e.Span().Text() }),
iterx.Map(slices.Values(least), func(e ast.ExprAny) string { return e.Span().Text() }),
", ",
)),
})
Expand Down

0 comments on commit 0ee1f76

Please sign in to comment.