Commit 60d83a7
committed
Add fn for comparing line numbers.
Elixir is quite flexible wrt syntax around the `->` token. It can follow
`do` or `fn`, either on the same line or separately. Because of this, a
function that can detect whether it's on the same line as its parent was
needed.
After adding this function, all tests passed. I'm skeptical about the
robustness of this function but it will have to be battle hardened by
users reporting bugs.1 parent 56e125b commit 60d83a7
1 file changed
+27
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
109 | 113 | | |
110 | 114 | | |
111 | 115 | | |
| |||
184 | 188 | | |
185 | 189 | | |
186 | 190 | | |
187 | | - | |
188 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
189 | 214 | | |
190 | 215 | | |
191 | 216 | | |
| |||
0 commit comments