Open sorawee opened 3 years ago
Source Location in syntax objects does contain span information, but that's span in position, not span in lines, so I'm not sure how that would help.
If you have the actual file, you can read the file and move by the position span to get to the ending line.
Maybe an entirely different approach using lexer output instead of syntax objects, but if I make that it would probably be an entirely different repository
Multiple line datum should be fully counted.
For example:
should be counted as 5 lines. Currently, it counts only 1.
Similarly:
should be counted as 6 lines. Currently, it counts only 2.
This is probably not fixable for
syntax-sloc
, due to the limited information of source location in syntax object, but for files, we should be able to use the span information to count the lines properly.