Skip to content

Commit 3f045b7

Browse files
ntreldlang-bot
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 93a8077 commit 3f045b7

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
@@ -1527,11 +1527,12 @@ $(H4 $(LNAME2 cast_floating, Floating Point))
15271527

15281528
$(H4 $(LNAME2 cast_struct, Structs))
15291529

1530-
$(P Casting a value $(I v) to a struct $(I S), when value is not a struct
1531-
of the same type, is equivalent to:)
1530+
$(P Casting an expression $(I e) to a struct $(I S), when the
1531+
expression is not a struct of the same type, is equivalent to a
1532+
$(GLINK PostfixExpression):)
15321533

15331534
---
1534-
S(v)
1535+
S(e)
15351536
---
15361537

15371538
$(H4 $(LNAME2 cast_qualifier, Qualifier Cast))
@@ -1666,8 +1667,10 @@ $(TABLE
16661667
$(TROW `--`, Decrement after use)
16671668
$(TROW `(args)`,
16681669
Either:
1669-
* Call an expression with optional arguments
1670-
* Construct a type with optional arguments
1670+
* $(RELATIVE_LINK2 callable_expressions, Call an expression) with optional arguments
1671+
* Call $(DDSUBLINK spec/operatoroverloading, static-opcall,
1672+
static `opCall`) on a user-defined type
1673+
* $(RELATIVE_LINK2 type-constructor-arguments, Construct a type) with optional arguments
16711674
)
16721675
$(TROW *IndexOperation*, Select a single element)
16731676
$(TROW *SliceOperation*, Select a series of elements)
@@ -1691,6 +1694,8 @@ $(GNAME NamedArgument):
16911694
$(GLINK AssignExpression)
16921695
)
16931696

1697+
$(H4 $(LNAME2 callable_expressions, Callable Expressions))
1698+
16941699
$(P A callable expression can precede a list of named arguments in parentheses.
16951700
The following expressions can be called:)
16961701

0 commit comments

Comments
 (0)