Commit ca1eba0
authored
fix(go): return nil instead of panic when AST node has invalid position (#197)
* fix(go): return nil instead of panic when AST node has invalid position
When parsing files with compilation errors, AST nodes can have End offset
smaller than Pos offset, causing slice bounds out of range panic.1 parent f7385d6 commit ca1eba0
2 files changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| 260 | + | |
260 | 261 | | |
261 | 262 | | |
262 | 263 | | |
| |||
0 commit comments