Preserve alignment boundaries when matching hash-brace macros

This commit is contained in:
gloamxun committed 2026-11-21 01:36:06 +08:00
1 parent 307303d596
commit 862801ee5f
5 files changed
+57

No files matched your search

@@ -1735,6 +1735,7 @@ impl Executor {
if self.required_raw(files)?.token.kind != *expected {
return self.fail("macro prefix does not match");
}
self.consume_macro_delimiter(expected);
}
let mut arguments = Vec::new();
for (index, delimiter) in definition.parameters.iter().enumerate() {
@@ -1773,6 +1774,7 @@ impl Executor {
// became argument text when the match shifted.
matched += 1;
if matched == delimiter.len() {
self.consume_macro_delimiter(&next.kind);
argument.truncate(argument.len() + 1 - matched);
break;
}