style: replace em and en dashes across sources
This commit is contained in:
+4
-4
@@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
// Package format implements a canonical formatter for GAsm source — the
|
||||
// Package format implements a canonical formatter for GAsm source, the
|
||||
// equivalent of gofmt for Plan 9 assembly. It works on the token stream
|
||||
// rather than the AST so that every line (including comments and blanks) is
|
||||
// preserved; it only normalises indentation, operand spacing and per-function
|
||||
@@ -92,7 +92,7 @@ func Source(src string) string {
|
||||
case kInstr:
|
||||
out = renderInstr(line, maxWidth[inf.funcID])
|
||||
// A RET ends the body for indentation purposes: comments that
|
||||
// follow it — typically the next function's doc comment — belong
|
||||
// follow it, typically the next function's doc comment, belong
|
||||
// at column 0, not inside the finished function.
|
||||
if strings.EqualFold(line[0].Text, "RET") {
|
||||
inBody = false
|
||||
@@ -120,8 +120,8 @@ type outLine struct {
|
||||
}
|
||||
|
||||
// normalizeSpacing enforces the canonical blank-line layout: runs of blank
|
||||
// lines collapse to one, and a new block — a label, or a TEXT or GLOBL
|
||||
// directive — is preceded by exactly one blank line. Comments immediately
|
||||
// lines collapse to one, and a new block, a label, or a TEXT or GLOBL
|
||||
// directive, is preceded by exactly one blank line. Comments immediately
|
||||
// above a block belong to it, so the blank line is inserted before them. No
|
||||
// blank line is forced at the top of the file, right after a TEXT (the
|
||||
// function's first label), or between stacked labels that share an address.
|
||||
|
||||
Reference in New Issue
Block a user