Skip to content

Commit

Permalink
cr
Browse files Browse the repository at this point in the history
  • Loading branch information
mcy committed Feb 27, 2025
1 parent ef65eb2 commit f1bfdab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions experimental/parser/diagnostics_internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,8 @@ type justified struct {
// 1. Surrounded on both sides by at least once space. (justifyBetween)
// 2. Has no whitespace to its left or its right. (justifyLeft, justifyRight)
//
// This is necessary in order to generate sensible suggestions in a number of
// cases.
//
// # Case 1: Inserting an equals sign.
// See the comments on doJustify* for details on the different cases this
// function handles.
func justify(stream *token.Stream, span report.Span, message string, edits ...justified) report.DiagnosticOption {
for i := range edits {
switch edits[i].justify {
Expand Down
3 changes: 1 addition & 2 deletions experimental/token/cursor.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ func (c *Cursor) IsSynthetic() bool {
// Clone returns a copy of this cursor, which allows performing operations on
// it without mutating the original cursor.
func (c *Cursor) Clone() *Cursor {
//nolint:revive,stylecheck // The type here is explicit to show a copy actually happens.
var clone Cursor = *c
clone := *c
return &clone
}

Expand Down

0 comments on commit f1bfdab

Please sign in to comment.