Skip to content

Conversation

@AlisdairM
Copy link
Contributor

@AlisdairM AlisdairM commented Oct 25, 2025

Fixes #6844

Index the keyword placeholders, export-keyword, import-keyword, and module-keyword.

@AlisdairM AlisdairM changed the title [lex.pptoken][module][cpp] Inex keyword placeholders] [lex.pptoken][module][cpp] Index keyword placeholders] Oct 25, 2025
Fixes cplusplus#6844

Index the keyword placeholders,
  export-keyword,
  import-keyword, and
  module-keyword.
@AlisdairM AlisdairM force-pushed the index_keyword_placeholders branch from 812ac02 to 192eefd Compare October 25, 2025 13:02
Copy link
Member

@jensmaurer jensmaurer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

module-keyword already appears in our index of grammar productions, where it seems to belong (it looks like a grammar non-terminal).

In contrast, the index entries proposed here introduce "module-keyword" (normal font), which doesn't actually exist.

I'm not particularly opposed to adding entries into the regular index for module-keyword and friends (because they are so special), but I'm wondering how many of our potential readers would look under "keyword placeholder" in the index to find these.

@AlisdairM
Copy link
Contributor Author

Yes, I tried several arrangements and pushed up this first one for feedback. Thanks.

I like the grouping under "keyword placeholders" but was thinking to also have the plain term redirect to the keyword placeholders entry.

I am similarly concerned about the font, but do not know our macros well enough to know the correct or preferred way to fix that. Am hoping to see a review comment explaining ;)

@jensmaurer
Copy link
Member

Again, what's the point here?

module-keyword already appears in our index of grammar productions, so it is already indexed. Nothing to do.

@AlisdairM
Copy link
Contributor Author

Per the linked comment, the other two keyword placeholders are not indexed. The goal is simply to make sure that all three can be easily found in the main index, and I will adjust PR accordingly to find an acceptable way to land.

If we can just get the these grammar terms to appear in the main index from their use in grammar, like most other grammar terms, I would do that --- but I do not know how. They are never defined in the grammar as they are terminals, so do not get the extra kick into the main index.

@jensmaurer
Copy link
Member

jensmaurer commented Oct 25, 2025

Per the linked comment, the other two keyword placeholders are not indexed.

That is not an accurate summary of the linked issue.

All three are indexed in the "index of grammar productions". As explained in the linked issue, there is no index entry in the general index, because they do not have a (traditional) definition.

I have no objection to adding a general index entry for those grammar productions, but that index entry should be the same style as the other grammar entries in the main index, and should point to the definition (which, in this case, is probably a prose text definition). The pull request we have here is nothing like that.

@jensmaurer
Copy link
Member

#8367 fixes this.

@jensmaurer jensmaurer closed this Oct 25, 2025
@AlisdairM AlisdairM deleted the index_keyword_placeholders branch October 25, 2025 16:31
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.

[lex.pptoken] import-keyword, module-keyword, export-keyword are not indexed

2 participants