Fixes in chapter 1
This commit is contained in:
parent
6f7d023408
commit
e94f43ab27
@ -172,15 +172,21 @@ A visualization of how this code would lex the expression `+ 12 34` could look l
|
|||||||
```
|
```
|
||||||
text i state tokens
|
text i state tokens
|
||||||
|
|
||||||
+ 12 0 make Plus []
|
+ 12 34 0 make Plus []
|
||||||
^
|
^
|
||||||
+ 12 1 skip whitespace [Plus]
|
+ 12 34 1 skip whitespace [Plus]
|
||||||
^
|
^
|
||||||
+ 12 2 make Int [Plus]
|
+ 12 34 2 make Int [Plus]
|
||||||
^
|
^
|
||||||
+ 12 3 make Int [Plus]
|
+ 12 34 3 make Int [Plus]
|
||||||
^
|
^
|
||||||
+ 12 4 done [Plus Int(12)]
|
+ 12 34 4 skip whitespace [Plus Int(12)]
|
||||||
|
^
|
||||||
|
+ 12 34 5 make Int [Plus Int(12)]
|
||||||
|
^
|
||||||
|
+ 12 34 6 make Int [Plus Int(12)]
|
||||||
|
^
|
||||||
|
+ 12 34 7 done [Plus Int(12) Int(34)]
|
||||||
^
|
^
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user