Skip to content

Commit 4cc649d

Browse files
ntrelBolpat
authored andcommitted
[spec/expression] Tweak postfix/callable expression docs
Tweak cast to struct wording. Add relative links. List static opCall as a postfix expression. Add subheading for expressions that can be called.
1 parent a179d57 commit 4cc649d

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

spec/expression.dd

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,11 +1484,12 @@ $(H4 $(LNAME2 cast_floating, Floating Point))
14841484

14851485
$(H4 $(LNAME2 cast_struct, Structs))
14861486

1487-
$(P Casting a value $(I v) to a struct $(I S), when value is not a struct
1488-
of the same type, is equivalent to:)
1487+
$(P Casting an expression $(I e) to a struct $(I S), when the
1488+
expression is not a struct of the same type, is equivalent to a
1489+
$(GLINK PostfixExpression):)
14891490

14901491
---
1491-
S(v)
1492+
S(e)
14921493
---
14931494

14941495
$(H4 $(LNAME2 cast_qualifier, Qualifier Cast))
@@ -1621,8 +1622,10 @@ $(TABLE
16211622
$(TROW `--`, Decrement after use)
16221623
$(TROW `(args)`,
16231624
Either:
1624-
* Call an expression with optional arguments
1625-
* Construct a type with optional arguments
1625+
* $(RELATIVE_LINK2 callable_expressions, Call an expression) with optional arguments
1626+
* Call $(DDSUBLINK spec/operatoroverloading, static-opcall,
1627+
static `opCall`) on a user-defined type
1628+
* $(RELATIVE_LINK2 type-constructor-arguments, Construct a type) with optional arguments
16261629
)
16271630
$(TROW *IndexOperation*, Select a single element)
16281631
$(TROW *SliceOperation*, Select a series of elements)
@@ -1646,6 +1649,8 @@ $(GNAME NamedArgument):
16461649
$(GLINK AssignExpression)
16471650
)
16481651

1652+
$(H4 $(LNAME2 callable_expressions, Callable Expressions))
1653+
16491654
$(P A callable expression can precede a list of named arguments in parentheses.
16501655
The following expressions can be called:)
16511656

0 commit comments

Comments
 (0)