-
Notifications
You must be signed in to change notification settings - Fork 57
Turn on FileCheck Variables #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -416,7 +431,7 @@ private func check(input b : String, against checkStrings : [CheckString]) -> Bo | |||
var failedChecks = false | |||
|
|||
// This holds all the current filecheck variables. | |||
var variableTable = [String:String]() | |||
var variableTable = BoxedTable() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No Box<T>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered it, then realized I only wrote this thing because the C++ just throws a reference to this dictionary everywhere so I only need reference semantics until I can find a way to remove the abstraction altogether.
// VariableTable[VariableDef.0] = MatchInfo[VariableDef.second] | ||
for (v, index) in self.variableDefs { | ||
assert(index < fullMatch.numberOfRanges, "Internal paren error") | ||
#if os(macOS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sad!
Besides pretty diagnostics, the last thing to do here to get feature parity with file check is to support |
|
⛵️ |
Includes a simple demonstration of what variable definitions look like that can be reverted upon request.