Skip to content

Commit f4c45f9

Browse files
authored
[spec/grammar] Add key node diagrams (#4272)
* [spec/grammar] Add key node diagrams Add comment about avoiding GLINK2 macro here. Mention AggregateDeclaration. Mention control-flow statements. Describe key *Expression* nodes. * More Expression docs *AssignExpression* and *PostfixExpression* each have at least one kind of *Expression*. Every *Expression* has a *Type*. * *AggregateDeclaration* has *DeclDef* members
1 parent 6f09483 commit f4c45f9

File tree

10 files changed

+1244
-11
lines changed

10 files changed

+1244
-11
lines changed

images/declaration.dot

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
Source file for declaration.svg and declaration.eps. The
3+
commands to run (assuming graphviz is installed) are:
4+
5+
cd /path/to/dlang.org/images
6+
dot -Tsvg declaration.dot >declaration.svg
7+
dot -Teps declaration.dot >declaration.eps
8+
9+
These commands are not part of the makefile because the files are fairly stable
10+
and so as to not make the build depending on graphviz being installed.
11+
*/
12+
13+
digraph "Declaration" {
14+
rankdir="LR";
15+
"Declaration" -> {"VarDeclarations", "FuncDeclaration", "AggregateDeclaration"};
16+
}

images/declaration.eps

Lines changed: 293 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

images/declaration.svg

Lines changed: 55 additions & 0 deletions
Loading

images/expression.dot

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
Source file for expression.svg and expression.eps. The
3+
commands to run (assuming graphviz is installed) are:
4+
5+
cd /path/to/dlang.org/images
6+
dot -Tsvg expression.dot >expression.svg
7+
dot -Teps expression.dot >expression.eps
8+
9+
These commands are not part of the makefile because the files are fairly stable
10+
and so as to not make the build depending on graphviz being installed.
11+
*/
12+
13+
digraph "Expression" {
14+
rankdir="LR";
15+
"Expression" -> {"PrimaryExpression", "AssignExpression", "PostfixExpression"}
16+
"PrimaryExpression" -> {"Identifier", "LiteralExpression"};
17+
}

0 commit comments

Comments
 (0)