feat(parser): split plain statements on semicolons in the raw parse
Test / test (push) Failing after 2m30s

Assisted-by: GLM 5.3 Flash
This commit is contained in:
2026-09-20 19:15:35 +02:00
parent 863926abd6
commit 75e9fd771b
4 changed files with 114 additions and 3 deletions
+4 -2
View File
@@ -462,7 +462,9 @@ TEXT ·f(SB), NOSPLIT, $0
func TestParseUnchangedWithoutExpand(t *testing.T) {
// Without Expand the preprocessor must not exist: a macro invocation
// stays an unexpanded instruction line and ';' keeps the old parse.
// stays an unexpanded instruction line. The ';' statement separator is
// not part of the preprocessor: the plain parse path splits on it the
// same way the expansion path does, so both spellings agree.
f, errs := Parse("t_amd64.s", `
#define TWICE ADDQ AX, AX
TEXT ·f(SB), NOSPLIT, $0
@@ -480,7 +482,7 @@ TEXT ·f(SB), NOSPLIT, $0
mnemonics = append(mnemonics, in.Mnemonic.Text)
}
}
if strings.Join(mnemonics, " ") != "TWICE BYTE RET" {
if strings.Join(mnemonics, " ") != "TWICE BYTE BYTE RET" {
t.Errorf("non-expanding parse changed: %v", mnemonics)
}
}