Skip to content

Relabel grammarRailroad-Button #1798

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2025
Merged

Relabel grammarRailroad-Button #1798

merged 1 commit into from
Apr 22, 2025

Conversation

lukaslueg
Copy link
Contributor

I suggest to relabel the button, and use the term "syntax diagram" instead of "railroad". The term "railroad" has no meaning to most readers.


On a different topic: Some of the diagrams can be simplified quite a bit. See the example below, which somewhat makes the written grammar more compact, but is to the benefit of the visual representation. Would you like a PR?

diff --git a/src/visibility-and-privacy.md b/src/visibility-and-privacy.md
index 847d469..e5469be 100644
--- a/src/visibility-and-privacy.md
+++ b/src/visibility-and-privacy.md
@@ -4,11 +4,7 @@ r[vis]
 r[vis.syntax]
 ```grammar,items
 Visibility ->
-      `pub`
-    | `pub` `(` `crate` `)`
-    | `pub` `(` `self` `)`
-    | `pub` `(` `super` `)`
-    | `pub` `(` `in` SimplePath `)`
+      `pub` ( `(` (`crate` | `self` | `super` | (`in` SimplePath))  `)` )?
a b

@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Apr 19, 2025
Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

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

Thanks, seems reasonable! I also pushed some changes to change the documentation, and to adjust the styling so the text doesn't wrap.

@ehuss ehuss enabled auto-merge April 22, 2025 15:23
@ehuss ehuss added this pull request to the merge queue Apr 22, 2025
Merged via the queue into rust-lang:master with commit f606493 Apr 22, 2025
5 checks passed
@lukaslueg lukaslueg deleted the relabel branch April 22, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: The marked PR is awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants