Skip to content

Commit 9b3492d

Browse files
authored
Merge pull request #404 from tayloraswift/legalize-plus
legalize plus sign character in USR
2 parents 6cd5209 + 1294aee commit 9b3492d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Sources/SymbolTests/Main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ enum Main:TestMain, TestBattery
2929
}
3030
if let tests:TestGroup = tests / "Scalar" / "InvalidCharacters"
3131
{
32-
tests.expect(nil: Symbol.USR.init("s:s12Identifi+ableP"))
32+
tests.expect(nil: Symbol.USR.init("s:s12Identifi ableP"))
3333
}
3434

3535
if let tests:TestGroup = tests / "Compound"

Sources/Symbols/Identifiers/Symbol.Decl.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ extension Symbol.Decl
5757
/// mangled suffix, returning nil if the suffix contains characters
5858
/// that are not allowed to appear in a symbol identifier.
5959
///
60-
/// Valid characters are `_`, `[A-Z]`, `[a-z]`, `[0-9]`, '(', ')', '*', ':', '.', '-', `@`,
61-
/// `#`, and `$`.
60+
/// Valid characters are `_`, `[A-Z]`, `[a-z]`, `[0-9]`, '(', ')', '*', '+', ':', '.', '-',
61+
/// `@`, `#`, and `$`.
6262
@inlinable public
6363
init?(_ language:Language, _ suffix:some StringProtocol)
6464
{
@@ -79,6 +79,7 @@ extension Symbol.Decl
7979
case "(": continue
8080
case ")": continue
8181
case "*": continue
82+
case "+": continue
8283
case "0" ... "9": continue
8384
case "@": continue
8485
case "A" ... "Z": continue

0 commit comments

Comments
 (0)