Commit 7b67da5
committed
Add a type alias for stream location
Prior to this change, the location in the parser stream was represented
by the current index. We would like to update the parser stream to also
return the source position (row/column) as part of the location
information.
This change adds a type alias to represent a location in the parser
stream, and a property to return it. Currently, this is just the index,
but we will update it in future commits.
This allows us to break up the change to make it easier to review, as we
can switch code paths which create span information to use locations
before making any functional changes.1 parent 91e8510 commit 7b67da5
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
| |||
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
34 | 43 | | |
35 | 44 | | |
36 | 45 | | |
| |||
0 commit comments