mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Various uses of `getPresumedLineAndColumnForLoc` were likely added when that function was the very misleading name `getLineAndColumn`. Change these to use `getLineAndColumnForBuffer` instead where appropriate, ie. we want the underlying file rather than the location to display to the user. There were also some cases where the buffer identifier had been swapped to use the display name instead, under the assumption that the presumed location was needed. Updated those as well. SingleRawComment: Lines are only used when merging comments, where the original location is fine to use. Index: Doesn't store the file set in #sourceLocation, so using the presumed line would end up pointing to a location that makes no sense. Editor functionality: Formatting and refactoring are on the current file. Using the presumed location would result in incorrect replacements.
//===----------------------------------------------------------------------===//
// SourceKit README
//===----------------------------------------------------------------------===//
Welcome to SourceKit! SourceKit is a framework for supporting IDE features like
indexing, syntax-coloring, code-completion, etc. In general it provides the
infrastructure that an IDE needs for excellent language support.
SourceKit currently only supports the Swift language.
//===----------------------------------------------------------------------===//
// Linking to the SourceKit C API
//===----------------------------------------------------------------------===//
The stable C API for SourceKit is provided via the sourcekitd.framework which
uses an XPC service for process isolation and the libsourcekitdInProc.dylib
library which is in-process.
libsourcekitdInProc.dylib is more convenient for debugging. To use it either:
-Link to this library instead of the framework ("-lsourcekitdInProc" instead
of "-framework sourcekitd")
-Run the binary that linked to the framework using these environment variables:
DYLD_INSERT_LIBRARIES=/path/to/libsourcekitdInProc.dylib DYLD_FORCE_FLAT_NAMESPACE=1 <...>
//===----------------------------------------------------------------------===//