Grammar question. TypeSuffix - what is [ AssignExpression .. AssignExpression ] production for?
user1234
user1234 at 12.de
Wed Sep 4 18:38:56 UTC 2024
On Wednesday, 4 September 2024 at 17:31:53 UTC, Nick Treleaven
wrote:
> On Monday, 2 September 2024 at 16:35:11 UTC, monkyyy wrote:
>> Good docs for what seq does, doesnt exist; period. You have to
>> learn from trail and error.
>
> What's wrong with:
>
>> So maybe
>> https://dlang.org/spec/template.html#variadic-templates ,
>> where more specifically
>> https://dlang.org/spec/template.html#seq-ops mentions slicing
>> operation on these sequences ?
What OP wants (I believe) is that:
```
TypeNext:
TypeStaticArray
TypeStaticSlice
TypeSequenceSlice
...
BasicType
TypeStaticArray:
TypeNext [ AssignExpression ]
TypeSlice:
TypeNext [ ]
TypeSequenceSlice:
TypeNext [ AssignExpression .. AssignExpression ]
```
So that the doc for https://dlang.org/spec/type.html could work
similarly to
https://dlang.org/spec/declaration.html, i.e each construct can
have its own grammar div. Actually types-docs feel a bit
sub-standard compared to.
More information about the Digitalmars-d
mailing list