diff --git a/Sources/App/Parsing/ConstraintsParser+Instances.swift b/Sources/App/Parsing/ConstraintsParser+Instances.swift index 35c6bfe..cb469b9 100644 --- a/Sources/App/Parsing/ConstraintsParser+Instances.swift +++ b/Sources/App/Parsing/ConstraintsParser+Instances.swift @@ -35,7 +35,7 @@ private extension ConstraintsParser { .named("memory address") static let identifier = many(identifierCharacter.butNot(sqm), boundedBy: sqm).asString() .named("identifier") - static let fileLocation = character("@").skipThen(many(character(condition: isClassNameCharacter), untilSkipping: character("#")).asString()).then(integer) + static let fileLocation = character("@").skipThen(many(anyCharacter(), untilSkipping: character("#")).asString()).then(integer) .named("file location") static let partialIdentifierCharacter = characterNot(in: "[]|()<>\":") diff --git a/Tests/AppTests/Inputs/Input+GitHubIssues.swift b/Tests/AppTests/Inputs/Input+GitHubIssues.swift index 3032b20..d51f6ce 100644 --- a/Tests/AppTests/Inputs/Input+GitHubIssues.swift +++ b/Tests/AppTests/Inputs/Input+GitHubIssues.swift @@ -79,4 +79,8 @@ extension Input { "", "" """ + + static let issue16 = """ + "" + """ } diff --git a/Tests/AppTests/ParserTests.swift b/Tests/AppTests/ParserTests.swift index 0b57374..856cf4f 100644 --- a/Tests/AppTests/ParserTests.swift +++ b/Tests/AppTests/ParserTests.swift @@ -37,7 +37,8 @@ class ParserTests: XCTestCase { Input.issue4, Input.issue5, Input.issue10, - Input.issue13 + Input.issue13, + Input.issue16 ] for input in inputs { diff --git a/Tests/AppTests/__Snapshots__/ParserTests/testGitHubIssues.7.json b/Tests/AppTests/__Snapshots__/ParserTests/testGitHubIssues.7.json new file mode 100644 index 0000000..2bc9d7d --- /dev/null +++ b/Tests/AppTests/__Snapshots__/ParserTests/testGitHubIssues.7.json @@ -0,0 +1,50 @@ +{ + "constraints" : [ + { + "constant" : { + "prefix" : "+ ", + "value" : "10" + }, + "description" : "StackView<\/code>'s leading edge should equal LayoutGuide<\/code>'s leading edge plus 10.", + "first" : { + "attribute" : { + "includesMargin" : false, + "name" : "leading" + }, + "instance" : { + "address" : "0x7feb4e8d58b0", + "className" : "App_Debug.StackView", + "color" : "rgb(230,126,34)", + "initial" : "S", + "name" : "StackView", + "suffix" : "" + } + }, + "identity" : { + "address" : "0x7feb4e8fa260", + "className" : "SnapKit.LayoutConstraint", + "color" : "rgb(26,188,156)", + "initial" : "L", + "name" : "LayoutConstraint" + }, + "relation" : "==", + "second" : { + "attribute" : { + "includesMargin" : false, + "name" : "leading" + }, + "instance" : { + "address" : "0x7feb50d2aa70", + "className" : "UILayoutGuide", + "color" : "rgb(245,215,110)", + "initial" : "L", + "name" : "LayoutGuide", + "suffix" : "" + } + } + } + ], + "footnotes" : [ + + ] +} \ No newline at end of file