fix: restore iota blocks, asm --format flag and prose after the syntax pass
Test / vet (push) Successful in 48s
Test / test (push) Successful in 2m35s
Test / build (push) Successful in 40s

This commit is contained in:
2026-08-29 17:12:53 +02:00
parent 15e8b88d32
commit 56ad158772
34 changed files with 170 additions and 183 deletions
+3 -5
View File
@@ -212,7 +212,7 @@ func (s *Server) documentFormatting(p documentFormattingParams) []TextEdit {
if text == "" {
return nil
}
formatted := format.Source(uriPath(p.TextDocument.URI), text)
formatted := format.Source(text)
if formatted == text {
return nil
}
@@ -596,8 +596,7 @@ func classifyLine(line []token.Token, a *arch.Table, labels map[string]bool) []s
case token.Hash:
typ = stMacro
case token.Ident:
typ = classifyIdent(line, i, first, t.Text, a, labels,
isDirective, isLabel, isInstr, &mnemonicDone)
typ = classifyIdent(i, first, t.Text, a, labels, isDirective, isLabel, isInstr, &mnemonicDone)
case token.Colon, token.Comma, token.LParen, token.RParen,
token.Plus, token.Minus, token.Star, token.Slash, token.Dollar,
token.LAngle, token.RAngle, token.LShift, token.RShift, token.Arrow, token.At:
@@ -616,8 +615,7 @@ func classifyLine(line []token.Token, a *arch.Table, labels map[string]bool) []s
}
// classifyIdent decides the semantic type of an identifier token.
func classifyIdent(line []token.Token, i, first int, text string, a *arch.Table,
labels map[string]bool, isDirective, isLabel, isInstr bool, mnemonicDone *bool) int {
func classifyIdent(i, first int, text string, a *arch.Table, labels map[string]bool, isDirective, isLabel, isInstr bool, mnemonicDone *bool) int {
upper := strings.ToUpper(text)
switch {