File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 17
17
#ifndef SWIFT_AST_IDENTIFIER_H
18
18
#define SWIFT_AST_IDENTIFIER_H
19
19
20
+ #include " swift/Basic/EditorPlaceholder.h"
20
21
#include " swift/Basic/LLVM.h"
21
22
#include " llvm/ADT/FoldingSet.h"
22
23
#include " llvm/ADT/PointerUnion.h"
@@ -125,7 +126,7 @@ class Identifier {
125
126
}
126
127
127
128
static bool isEditorPlaceholder (StringRef name) {
128
- return name. startswith ( " <# " );
129
+ return swift::isEditorPlaceholder (name );
129
130
}
130
131
131
132
bool isEditorPlaceholder () const {
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ struct EditorPlaceholderData {
46
46
Optional<EditorPlaceholderData>
47
47
parseEditorPlaceholder (StringRef PlaceholderText);
48
48
49
+ // / Checks if an identifier with the given text is an editor placeholder
50
+ bool isEditorPlaceholder (StringRef IdentifierText);
49
51
} // end namespace swift
50
52
51
53
#endif // SWIFT_BASIC_EDITORPLACEHOLDER_H
Original file line number Diff line number Diff line change @@ -78,3 +78,7 @@ swift::parseEditorPlaceholder(StringRef PlaceholderText) {
78
78
79
79
return PHDataTyped;
80
80
}
81
+
82
+ bool swift::isEditorPlaceholder (StringRef IdentifierText) {
83
+ return IdentifierText.startswith (" <#" );
84
+ }
You can’t perform that action at this time.
0 commit comments