Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Feb 3, 2021

No description provided.

@ehuss
Copy link
Contributor

ehuss commented Feb 3, 2021

Generics is intentionally included here because the token can show up in generic parameters. For example:

struct S<T: Trait<T>=Foo> {
    field: T
}

Here the >= token shows up as part of parsing the generic parameters (or, at least, must be handled in some way).

The reference doesn't (yet — #567) really go into details on token splitting. It's a bit tricky, since different implementations will take different approaches. When making the table, I took the approach of including these strange scenarios where tokens may need to be split into smaller pieces. (AndAnd and ShrEq are other examples.)

Perhaps these strange entries should be marked with a footnote that mentions this split token behavior?

@ghost ghost closed this Feb 3, 2021
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant