fix: restore iota blocks, asm --format flag and prose after the syntax pass
This commit is contained in:
+3
-5
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user