Skip to content

Commit 1882eae

Browse files
committed
Document new surface syntax in devdocs/ast.md
1 parent a23e47b commit 1882eae

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

doc/src/devdocs/ast.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ For example `(call f x)` corresponds to `Expr(:call, :f, :x)` in Julia.
2626
| `f(x, y=1, z=2)` | `(call f x (kw y 1) (kw z 2))` |
2727
| `f(x; y=1)` | `(call f (parameters (kw y 1)) x)` |
2828
| `f(x...)` | `(call f (... x))` |
29+
| `f.(x)` | `(. f (tuple x))` |
30+
| `for f.(x)` | `(fordot (. f (tuple x)))` |
2931

3032
`do` syntax:
3133

@@ -48,6 +50,7 @@ call. Finally, chains of comparisons have their own special expression structure
4850
| Input | AST |
4951
|:----------- |:------------------------- |
5052
| `x+y` | `(call + x y)` |
53+
| `x.+y` | `(call .+ x y)` |
5154
| `a+b+c+d` | `(call + a b c d)` |
5255
| `2x` | `(call * 2 x)` |
5356
| `a&&b` | `(&& a b)` |
@@ -59,7 +62,6 @@ call. Finally, chains of comparisons have their own special expression structure
5962
| `a==b` | `(call == a b)` |
6063
| `1<i<=n` | `(comparison 1 < i <= n)` |
6164
| `a.b` | `(. a (quote b))` |
62-
| `a.(b)` | `(. a b)` |
6365

6466
### Bracketed forms
6567

0 commit comments

Comments
 (0)