Files
swift-mirror/lib/Basic/LinkingVerbs.def
Doug Gregor 9d7f0b6211 Rework the selector-splitting heuristics.
This makes a number of changes to the selector-splitting
heuristics. Specifically:

  - Eliminate last-word splitting, and with it the notion of
    multi-words. We only split at prepositions now.
  - Introduce the notion of "linking verbs" such as "will" or
    "should"; when these show up, we refuse to split a selector, which
    helps with delegates.
  - Eliminate the special case for "get" and "set". It wasn't
    helping.
  




Swift SVN r16265
2014-04-12 20:32:16 +00:00

28 lines
957 B
C++

//===--- LinkingVerbs.def - Linking Verbs -----------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
// This file lists the linking verbs that will prevent splitting of the first
// piece of an Objective-C selector.
// ===---------------------------------------------------------------------===//
#ifndef LINKING_VERB
# error Define LINKING_VERB(Word) before including this file.
#endif
LINKING_VERB(did)
LINKING_VERB(is)
LINKING_VERB(has)
LINKING_VERB(needs)
LINKING_VERB(should)
LINKING_VERB(was)
LINKING_VERB(will)
#undef LINKING_VERB