You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* `computeLines` now produces newly introducded 'SourceLineTable'.
* `SourceLineTable` is factored out line tables and `#sourceLocation`
directive info, extracted from `SourceLocationConverter`.
* `forEachLineLength` is now `forEachEndOfLine` which emits the absolute
position of each end-of-line, instead of the line length, because the
caller can easily derive the start-of-line position (i.e. the last
end-of-line).
* `#sourceLocation` info are now handled differently. Specifically, while
traversing the syntax tree, it only collects the raw syntax, then
post-process those info to produce the newly introduced `VirtualFile`.
`VirtualFile` is a type that have enough infomation for
`swift::SourceMamanger` in the compiler. Post-processing is needed
because we want the start position of the _next_ line of the end of
`#sourceLocation` directive, which might still not available when the
first pass sees the directive.
* In the future, the compiler shoud only use `SourceLineTable` instead
of `SourceLocationConverter` as `swift::SourceManager` already know the
file name and the whole source buffer.
0 commit comments