Skip to content

asm grammar dosn't covers bracket syntax #4004

Open
@dlangBugzillaToGithub

Description

@dlangBugzillaToGithub

Mai Lapyst reported this on 2024-05-07T18:59:09Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=24544

Description

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
}
```

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions