Skip to content

Commit c58e870

Browse files
committed
Fixed details issues
1 parent 3437368 commit c58e870

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ value as the notes will make sense for me as I cherry pick a sentence or an anal
1212
Moreover, don't expect direct quotes, changing the sentences vocbulary helps me personally.
1313

1414
<details>
15-
<summary>
16-
### Chapter 1 - The language of macros
17-
</summary>
15+
<summary>Chapter 1 - The language of Macros</summary>
16+
17+
<details>
18+
<summary>What are Macros?</summary>
1819

1920
- Macros are code that write code.
2021
- Elixir itself is made with macros, as a result you can extend the language itself
@@ -34,7 +35,10 @@ end
3435
"<div><h1 class=\"title\">Hello</h1><p>Metaprogramming Elixir</p></div>"
3536
```
3637

37-
#### The Abstract Syntax Tree
38+
</details>
39+
40+
<details>
41+
<summary>The Abstract Syntax Tree</summary>
3842

3943
- Most languages use AST but you never need to know about them. They are used typically during compilation
4044
or interpretation to transform source code into a tree structure before being turned into bytecode
@@ -59,7 +63,10 @@ iex> quote do: div(10, 2)
5963
- The purpose of macros is to interact with this AST with the syntax of Elixir.
6064
- Macros turn you from language consumer to language creator. You have the same level of power as José when he wrote the standard library.
6165

62-
#### Trying It All Together
66+
</details>
67+
68+
<details>
69+
<summary>Trying It All Together</summary>
6370

6471
"Let's write a macro that can print the spoken form of an Elixir mathematical expression, such as 5 + 2, when calculating a result.
6572
In most languages, we would have to parse a string expression into something digestible by our program. With Elixir, we can access
@@ -142,3 +149,5 @@ Much like interpolation from Ecto and the difference between `"Hello world"` and
142149
Back to the `math.exs`example.
143150

144151
</details>
152+
153+
</details>

0 commit comments

Comments
 (0)