Refactor: Rename map to record
This commit renames `Map` to `Record` and updates all related AST nodes, binders, type checkers, and runtime values to reflect this change. This is a semantic change to better align with common programming language terminology.
This commit is contained in:
+10
-10
@@ -193,14 +193,14 @@ impl<E: MacroEvaluator> MacroExpander<E> {
|
||||
})
|
||||
}
|
||||
|
||||
UntypedKind::Map { entries } => {
|
||||
let mut expanded_entries = Vec::new();
|
||||
for (k, v) in entries {
|
||||
expanded_entries.push((self.expand_recursive(k)?, self.expand_recursive(v)?));
|
||||
UntypedKind::Record { fields } => {
|
||||
let mut expanded_fields = Vec::new();
|
||||
for (k, v) in fields {
|
||||
expanded_fields.push((self.expand_recursive(k)?, self.expand_recursive(v)?));
|
||||
}
|
||||
Ok(Node {
|
||||
identity: node.identity,
|
||||
kind: UntypedKind::Map { entries: expanded_entries },
|
||||
kind: UntypedKind::Record { fields: expanded_fields },
|
||||
ty: (),
|
||||
})
|
||||
}
|
||||
@@ -368,14 +368,14 @@ impl<E: MacroEvaluator> MacroExpander<E> {
|
||||
})
|
||||
}
|
||||
|
||||
UntypedKind::Map { entries } => {
|
||||
let mut new_entries = Vec::new();
|
||||
for (k, v) in entries {
|
||||
new_entries.push((self.expand_template(k, state)?, self.expand_template(v, state)?));
|
||||
UntypedKind::Record { fields } => {
|
||||
let mut new_fields = Vec::new();
|
||||
for (k, v) in fields {
|
||||
new_fields.push((self.expand_template(k, state)?, self.expand_template(v, state)?));
|
||||
}
|
||||
Ok(Node {
|
||||
identity: node.identity,
|
||||
kind: UntypedKind::Map { entries: new_entries },
|
||||
kind: UntypedKind::Record { fields: new_fields },
|
||||
ty: (),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user