Issue 24544 - asm grammar dosn't covers bracket syntax
Summary: asm grammar dosn't covers bracket syntax
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-07 18:59 UTC by Mai Lapyst
Modified: 2024-05-07 18:59 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Mai Lapyst 2024-05-07 18:59:09 UTC
The current grammar for asm statements does not cover the following code:

```d
asm {
  mov ECX, [ESP + 1]
}
```

While there exists a rule in `AsmBrExp` that allows for some brackets, they require an expression before the beginning bracket:

```d
void* pc;
asm {
  mov  pc[EBP],EBX
}
```