You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -565,7 +567,7 @@ public protocol MacroConfigFileParserDelegate {
565
567
func endPreprocessorInclusion()
566
568
567
569
/// Invoked once for each macro value assignment. The `macroName` is guaranteed to be non-empty, but `value` may be empty. Any macro conditions are passed as tuples in the `conditions`; parameters are guaranteed to be non-empty strings, but patterns may be empty.
@@ -77,18 +82,32 @@ public struct MacroValueAssignmentTable: Serializable, Sendable {
77
82
78
83
79
84
/// Adds a mapping from `macro` to `value`, inserting it ahead of any already existing assignment for the same macro. Unless the value refers to the lower-precedence expression (using `$(inherited)` notation), any existing assignments are shadowed but not removed.
/// Adds a mapping from each of the macro-to-value mappings in `otherTable`, inserting them ahead of any already existing assignments in the receiving table. The other table isn’t affected in any way (in particular, no reference is kept from the receiver to the other table).
// We don't directly serialize MacroDeclarations, but rather serialize their contents "by hand" so when we deserialize we can re-use existing declarations in our namespace.
225
257
serializer.beginAggregate(valueAssignments.count)
@@ -247,6 +279,17 @@ public struct MacroValueAssignmentTable: Serializable, Sendable {
@@ -255,9 +298,10 @@ public struct MacroValueAssignmentTable: Serializable, Sendable {
255
298
guardlet delegate = deserializer.delegate as?(anyMacroValueAssignmentTableDeserializerDelegate)else{throwDeserializerError.invalidDelegate("delegate must be a MacroValueAssignmentTableDeserializerDelegate")}
256
299
self.namespace = delegate.namespace
257
300
self.valueAssignments =[:]
301
+
self.valueLocations =[:]
258
302
259
303
// Deserialize the table.
260
-
try deserializer.beginAggregate(1)
304
+
try deserializer.beginAggregate(3)
261
305
262
306
// Iterate over all the key-value pairs.
263
307
letcount:Int=try deserializer.beginAggregate()
@@ -304,6 +348,16 @@ public struct MacroValueAssignmentTable: Serializable, Sendable {
/// Private function that inserts a copy of the given linked list of MacroValueAssignments (starting at `srcAsgn`) in front of `dstAsgn` (which is optional). The order of the copies is the same as the order of the originals, and the last one will have `dstAsgn` as its `next` property. This function returns the copy that corresponds to `srcAsgn` so the client can add a reference to it wherever it sees fit.
0 commit comments