Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dlang.org.ddoc
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ _=
GEN_DATETIME=$(DATETIME)
GLINK=$(RELATIVE_LINK2 $0, $(I $0))
GLINK2=$(DDSUBLINK spec/$1,$2,$(I $2))
GLINK2_ALTTEXT=$(DDSUBLINK spec/$1,$2,$(I $3))
GLOSSARY = $(HTTP dlang.org/glossary.html#$0, $0)
GLOSSARY2 = $(HTTP dlang.org/glossary.html#$1, $2)
GNAME=<a id="$0">$(SPANC gname, $0)</a>
Expand Down
1 change: 1 addition & 0 deletions ebook.ddoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ MODDEFFILE=<pre class="moddeffile">$0</pre><p></p>
_=

GLINK2=$(GLINK $2)
GLINK2_ALTTEXT=$(RELATIVE_LINK2 $2, $3)
DDLINK=$(RELATIVE_LINK2 $2, $3)
DDSUBLINK=$(RELATIVE_LINK2 $2, $3)
DPLLINK=$(LINK2 https://dlang.org/$1, $2)
Expand Down
3 changes: 3 additions & 0 deletions spec/attribute.dd
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,9 @@ pragma(msg, __traits(getAttributes, typeof(a))); // prints tuple("hello")
attributes accumulate or override earlier ones is also up to how the user
interprets them.
)
$(P
UDAs cannot be attached to template parameters.
)
$(SPEC_SUBNAV_PREV_NEXT property, Properties, pragma, Pragmas)
)

Expand Down
8 changes: 4 additions & 4 deletions spec/expression.dd
Original file line number Diff line number Diff line change
Expand Up @@ -1401,16 +1401,16 @@ $(H3 $(LNAME2 function_literals, Function Literals))

$(GRAMMAR
$(GNAME FunctionLiteral):
$(D function) $(GLINK2 declaration, Type)$(OPT) $(GLINK ParameterAttributes) $(OPT) $(GLINK FunctionLiteralBody)
$(D delegate) $(GLINK2 declaration, Type)$(OPT) $(GLINK ParameterMemberAttributes) $(OPT) $(GLINK FunctionLiteralBody)
$(D function) $(GLINK2 declaration, Type)$(OPT) $(GLINK ParameterWithAttributes) $(OPT) $(GLINK FunctionLiteralBody)
$(D delegate) $(GLINK2 declaration, Type)$(OPT) $(GLINK ParameterWithMemberAttributes) $(OPT) $(GLINK FunctionLiteralBody)
$(GLINK ParameterMemberAttributes) $(GLINK FunctionLiteralBody)
$(GLINK FunctionLiteralBody)
$(GLINK Lambda)

$(GNAME ParameterAttributes):
$(GNAME ParameterWithAttributes):
$(GLINK2 function, Parameters) $(GLINK2 function, FunctionAttributes)$(OPT)

$(GNAME ParameterMemberAttributes):
$(GNAME ParameterWithMemberAttributes):
$(GLINK2 function, Parameters) $(GLINK2 function, MemberFunctionAttributes)$(OPT)

$(GNAME FunctionLiteralBody):
Expand Down
26 changes: 17 additions & 9 deletions spec/function.dd
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,20 @@ $(GNAME ParameterList):
$(D ...)

$(GNAME Parameter):
$(I InOut)$(OPT) $(GLINK2 declaration, BasicType) $(GLINK2 declaration, Declarator)
$(I InOut)$(OPT) $(GLINK2 declaration, BasicType) $(GLINK2 declaration, Declarator) $(D ...)
$(I InOut)$(OPT) $(GLINK2 declaration, BasicType) $(GLINK2 declaration, Declarator) = $(ASSIGNEXPRESSION)
$(I InOut)$(OPT) $(GLINK2 declaration, Type)
$(I InOut)$(OPT) $(GLINK2 declaration, Type) $(D ...)
$(I ParameterAttributes)$(OPT) $(GLINK2 declaration, BasicType) $(GLINK2 declaration, Declarator)
$(I ParameterAttributes)$(OPT) $(GLINK2 declaration, BasicType) $(GLINK2 declaration, Declarator) $(D ...)
$(I ParameterAttributes)$(OPT) $(GLINK2 declaration, BasicType) $(GLINK2 declaration, Declarator) = $(ASSIGNEXPRESSION)
$(I ParameterAttributes)$(OPT) $(GLINK2 declaration, Type)
$(I ParameterAttributes)$(OPT) $(GLINK2 declaration, Type) $(D ...)

$(GNAME ParameterAttributes):
$(I InOut)
$(GLINK2 attribute, UserDefinedAttribute)
$(I ParameterAttributes InOut)
$(I ParameterAttributes) $(GLINK2 attribute, UserDefinedAttribute)
$(I ParameterAttributes)

$(GNAME InOut):
$(I InOutX)
$(I InOut InOutX)

$(GNAME InOutX):
$(D auto)
$(GLINK2 declaration, TypeCtor)
$(D final)
Expand Down Expand Up @@ -1413,6 +1416,11 @@ $(P Template functions and lambdas can deduce the `return` attribute.)

$(P `inout ref` parameters imply the `return` attribute.)


$(H3 $(LNAME2 udas-parameters, User-Defined Attributes for Parameters))

See also: $(GLINK2_ALTTEXT attribute, UserDefinedAttribute, User-Defined Attributes)

$(H3 $(LNAME2 variadic, Variadic Functions))

$(P Functions taking a variable number of arguments are called
Expand Down
1 change: 1 addition & 0 deletions spec/latex.ddoc
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ _=

GLINK=$(LINK2 $0, $(I $0))
GLINK2=$(GLINK $2)
GLINK2_ALTTEXT=$(LINK2 $2, $(I $3))
GNAME={\fontshape{sl}\selectfont $0}
_=

Expand Down