Skip to content

Commit 224da41

Browse files
authored
Merge pull request #2504 from MartinNowak/fix_lex_links_in_grammar
fix lex links in grammar overview
2 parents 35099f6 + b254588 commit 224da41

File tree

11 files changed

+32
-30
lines changed

11 files changed

+32
-30
lines changed

dlang.org.ddoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ GEN_DATETIME=$(DATETIME)
176176
GLINK=$(RELATIVE_LINK2 $0, $(I $0))
177177
GLINK2=$(DDSUBLINK spec/$1,$2,$(I $2))
178178
GLINK2_ALTTEXT=$(DDSUBLINK spec/$1,$2,$(I $3))
179+
GLINK_LEX=$(DDSUBLINK spec/lex,$1,$(I $1))
179180
GLOSSARY = $(HTTP dlang.org/glossary.html#$0, $0)
180181
GLOSSARY2 = $(HTTP dlang.org/glossary.html#$1, $2)
181182
GNAME=<a id="$0">$(SPANC gname, $0)</a>

ebook.ddoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ _=
5050

5151
GLINK2=$(GLINK $2)
5252
GLINK2_ALTTEXT=$(RELATIVE_LINK2 $2, $3)
53+
GLINK_LEX=$(GLINK $1)
5354
DDLINK=$(RELATIVE_LINK2 $2, $3)
5455
DDSUBLINK=$(RELATIVE_LINK2 $2, $3)
5556
DPLLINK=$(LINK2 https://dlang.org/$1, $2)

spec/entity.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ $(HEADERNAV_TOC)
66

77
$(GRAMMAR
88
$(GNAME NamedCharacterEntity):
9-
$(CODE_AMP) $(GLINK2 lex, Identifier) $(D ;)
9+
$(CODE_AMP) $(GLINK_LEX Identifier) $(D ;)
1010
)
1111

1212
$(P The full list of named character entities from the

spec/expression.dd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,8 +1121,8 @@ $(GNAME PrimaryExpression):
11211121
$(D true)
11221122
$(D false)
11231123
$(D $)
1124-
$(GLINK2 lex, IntegerLiteral)
1125-
$(GLINK2 lex, FloatLiteral)
1124+
$(GLINK_LEX IntegerLiteral)
1125+
$(GLINK_LEX FloatLiteral)
11261126
$(GLINK CharacterLiteral)
11271127
$(GLINK StringLiterals)
11281128
$(GLINK ArrayLiteral)
@@ -1232,8 +1232,8 @@ $(H3 $(LNAME2 string_literals, String Literals))
12321232

12331233
$(GRAMMAR
12341234
$(GNAME StringLiterals):
1235-
$(GLINK2 lex, StringLiteral)
1236-
$(I StringLiterals) $(GLINK2 lex, StringLiteral)
1235+
$(GLINK_LEX StringLiteral)
1236+
$(I StringLiterals) $(GLINK_LEX StringLiteral)
12371237
)
12381238

12391239
$(P String literals can implicitly convert to any
@@ -2208,7 +2208,7 @@ $(SPEC_SUBNAV_PREV_NEXT pragma, Pragmas, statement, Statements)
22082208
Macros:
22092209
CHAPTER=10
22102210
TITLE=Expressions
2211-
IDENTIFIER=$(GLINK2 lex, Identifier)
2211+
IDENTIFIER=$(GLINK_LEX Identifier)
22122212
USUAL_ARITHMETIC_CONVERSIONS=$(DDSUBLINK spec/type, usual-arithmetic-conversions, Usual Arithmetic Conversions)
22132213
INTEGER_PROMOTIONS=$(DDSUBLINK spec/type, integer-promotions, Integer Promotions)
22142214
_=

spec/grammar.dd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,5 @@ Macros:
2828
PSCURLY_PSSCOPE=$(GLINK ScopeBlockStatement)
2929
PSCURLYSCOPE=$(GLINK NonEmptyOrScopeBlockStatement)
3030
TRAITS_LINK2=$(LINK2 traits.html#$1, $(D $1))
31-
GLINK_LEX=$(GLINK2 lex, $1)
3231
GLINK2=$(GLINK $2)
3332
GRAMMAR_SUMMARY=$0

spec/iasm.dd

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ $(GNAME AsmInstruction):
7373
$(D df) $(I Operands)
7474
$(D dd) $(I Operands)
7575
$(D de) $(I Operands)
76-
$(D db) $(GLINK2 lex, StringLiteral)
77-
$(D ds) $(GLINK2 lex, StringLiteral)
78-
$(D di) $(GLINK2 lex, StringLiteral)
79-
$(D dl) $(GLINK2 lex, StringLiteral)
80-
$(D dw) $(GLINK2 lex, StringLiteral)
81-
$(D dq) $(GLINK2 lex, StringLiteral)
76+
$(D db) $(GLINK_LEX StringLiteral)
77+
$(D ds) $(GLINK_LEX StringLiteral)
78+
$(D di) $(GLINK_LEX StringLiteral)
79+
$(D dl) $(GLINK_LEX StringLiteral)
80+
$(D dw) $(GLINK_LEX StringLiteral)
81+
$(D dq) $(GLINK_LEX StringLiteral)
8282
$(I Opcode)
8383
$(I Opcode Operands)
8484

@@ -109,7 +109,7 @@ $(H2 $(LNAME2 align, align $(I IntegerExpression)))
109109

110110
$(GRAMMAR
111111
$(GNAME IntegerExpression):
112-
$(GLINK2 lex, IntegerLiteral)
112+
$(GLINK_LEX IntegerLiteral)
113113
$(I Identifier)
114114
)
115115

@@ -336,8 +336,8 @@ $(GNAME AsmUnaExp):
336336
$(I AsmPrimaryExp)
337337

338338
$(GNAME AsmPrimaryExp):
339-
$(GLINK2 lex, IntegerLiteral)
340-
$(GLINK2 lex, FloatLiteral)
339+
$(GLINK_LEX IntegerLiteral)
340+
$(GLINK_LEX FloatLiteral)
341341
$(D __LOCAL_SIZE)
342342
$(D $)
343343
$(GLINK Register)

spec/intro.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ $(OL
3535
The source file is divided up into a sequence of tokens.
3636
$(DDSUBLINK spec/lex, specialtokens, Special tokens)
3737
are replaced with other tokens.
38-
$(GLINK2 lex, SpecialTokenSequence)s
38+
$(GLINK_LEX SpecialTokenSequence)s
3939
are processed and removed.
4040
)
4141

spec/latex.ddoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ _=
9494
GLINK=$(LINK2 $0, $(I $0))
9595
GLINK2=$(GLINK $2)
9696
GLINK2_ALTTEXT=$(LINK2 $2, $(I $3))
97+
GLINK_LEX=$(GLINK $1)
9798
GNAME={\fontshape{sl}\selectfont $0}
9899
_=
99100

spec/module.dd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ $(GNAME PackageName):
115115

116116
$(P The $(I Identifier)s preceding the rightmost are the $(I Packages) that the
117117
module is in. The packages correspond to directory names in the source file
118-
path. Package and module names cannot be $(GLINK2 lex, Keyword)s.)
118+
path. Package and module names cannot be $(GLINK_LEX Keyword)s.)
119119

120120
$(P If present, the $(I ModuleDeclaration) appears syntactically first in the
121121
source file, and there can be only one per source file.)
@@ -178,7 +178,7 @@ import foo; // Deprecated: module foo is deprecated - Please use foo2 instead.
178178
characters lower case letters, digits or `_` to ensure maximum portability and compatibility with
179179
various file systems.)
180180
$(LI The file names for packages and modules should also be composed of
181-
the ASCII characters lower case letters, digits or `_` and should not be a $(GLINK2 lex, Keyword).)
181+
the ASCII characters lower case letters, digits or `_` and should not be a $(GLINK_LEX Keyword).)
182182
))
183183

184184
$(H2 $(LEGACY_LNAME2 ImportDeclaration, import-declaration, Import Declaration))
@@ -208,11 +208,11 @@ $(GNAME ImportBindList):
208208
$(GLINK ImportBind) $(D ,) $(I ImportBindList)
209209

210210
$(GNAME ImportBind):
211-
$(GLINK2 lex, Identifier)
212-
$(GLINK2 lex, Identifier) = $(I Identifier)
211+
$(GLINK_LEX Identifier)
212+
$(GLINK_LEX Identifier) = $(I Identifier)
213213

214214
$(GNAME ModuleAliasIdentifier):
215-
$(GLINK2 lex, Identifier)
215+
$(GLINK_LEX Identifier)
216216
)
217217

218218
$(P There are several forms of the $(I ImportDeclaration), from generalized to

spec/template.dd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ $(GNAME SymbolTail):
8989
$(GNAME TemplateSingleArgument):
9090
$(I Identifier)
9191
$(GLINK2 declaration, BasicTypeX)
92-
$(GLINK2 lex, CharacterLiteral)
93-
$(GLINK2 lex, StringLiteral)
94-
$(GLINK2 lex, IntegerLiteral)
95-
$(GLINK2 lex, FloatLiteral)
92+
$(GLINK_LEX CharacterLiteral)
93+
$(GLINK_LEX StringLiteral)
94+
$(GLINK_LEX IntegerLiteral)
95+
$(GLINK_LEX FloatLiteral)
9696
$(D true)
9797
$(D false)
9898
$(D null)

0 commit comments

Comments
 (0)