Skip to content

Commit 61acf33

Browse files
committed
Clarify syntax reference headings
1 parent ace841f commit 61acf33

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lib/elixir/pages/references/syntax-reference.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -391,11 +391,9 @@ end
391391
#=> {{:., [], [{:__aliases__, [], [:Foo]}, :{}]}, [], [{:__aliases__, [], [:Bar]}, {:__aliases__, [], [:Baz]}]}
392392
```
393393
394-
## Optional syntax
394+
## Additional representations
395395
396-
All of the constructs above are part of Elixir's syntax and have their own representation as part of the Elixir AST. This section will discuss the remaining constructs that are alternative representations of the constructs above. In other words, the constructs below can be represented in more than one way in your Elixir code and retain AST equivalence. We call this "Optional Syntax".
397-
398-
For a lightweight introduction to Elixir's Optional Syntax, [see this document](../getting-started/optional-syntax.md). Below we continue with a more complete reference.
396+
All of the constructs above are part of Elixir's syntax and have their own representation as part of the Elixir AST. This section will discuss the remaining constructs that are ultimately representated as one of the constructs above.
399397
400398
### Integers in other bases and Unicode code points
401399
@@ -486,7 +484,7 @@ is the same as
486484
if(condition, [do: this, else: that])
487485
```
488486
489-
which in turn is the same as
487+
which, as per the previous section, is the same as
490488
491489
```elixir
492490
if(condition, [{:do, this}, {:else, that}])
@@ -510,7 +508,7 @@ is the same as:
510508
if(true, do: (this), else: (that))
511509
```
512510
513-
which we have explored in the previous section.
511+
which we have explored in the previous section. This sequence of transformations is also [described in Elixir's Getting Started docs](../getting-started/optional-syntax.md).
514512
515513
Parentheses are important to support multiple expressions. This:
516514

0 commit comments

Comments
 (0)