Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Spelunker] Be less eager to get comments before a declaration (#660)
We were failing an assertion when splicing child nodes out of parent nodes in the following case: ```ts type Foo = ...; // comment function bar() { ... } ``` The TSC `node.getFullStart() ` API would return the location of Foo's comment, and our strategy for moving to the next line didn't work. (This makes `getFullStart()` pretty stupid IMO, but we can't change that.) This PR is a quick hack to fix this by always moving to the start of the next line if the start position points in the middle of a line (i.e., `character` is > 0).
- Loading branch information