feat(parser): split plain statements on semicolons in the raw parse
Test / test (push) Failing after 2m30s
Test / test (push) Failing after 2m30s
Assisted-by: GLM 5.3 Flash
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user