Skip to content

Commit eb17cb9

Browse files
lukasluegehuss
authored andcommitted
Relabel grammarRailroad-Button
1 parent 3bf3402 commit eb17cb9

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/notation.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ When such a string in `monospace` font occurs inside the grammar,
4040
it is an implicit reference to a single member of such a string table
4141
production. See [tokens] for more information.
4242

43-
## Railroad visualizations
43+
## Grammar visualizations
4444

45-
Below each grammar block is a button to toggle the display of a [railroad diagram]. A square element is a non-terminal rule, and a rounded rectangle is a terminal.
45+
Below each grammar block is a button to toggle the display of a [syntax diagram]. A square element is a non-terminal rule, and a rounded rectangle is a terminal.
4646

47-
[railroad diagram]: https://en.wikipedia.org/wiki/Syntax_diagram
47+
[syntax diagram]: https://en.wikipedia.org/wiki/Syntax_diagram
4848

4949
## Common productions
5050

theme/reference.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ main > .rule {
627627

628628
/* The toggle button. */
629629
.grammar-toggle-railroad {
630-
width: 120px;
630+
width: 160px;
631631
padding: 5px 0px;
632632
border-radius: 5px;
633633
cursor: pointer;

theme/reference.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ function update_railroad() {
6666
const buttons = document.querySelectorAll('.grammar-toggle-railroad');
6767
buttons.forEach(button => {
6868
if (grammarRailroad) {
69-
button.innerText = "Hide Railroad";
69+
button.innerText = "Hide syntax diagram";
7070
} else {
71-
button.innerText = "Show Railroad";
71+
button.innerText = "Show syntax diagram";
7272
}
7373
});
7474
}

0 commit comments

Comments
 (0)