mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 06:38:03 +08:00
Implement source maps between proto/document nodes
Add the node path to the document node and carry that over to the proto nodes which are generated from that. This pr also adds a compiler pass to assign the paths based on the hierarchical structure of the nodegraph. Test Plan: - Run units tests which check the path propagation works Reviewers: Keavon Reviewed By: Keavon Pull Request: https://github.com/GraphiteEditor/Graphite/pull/1181
This commit is contained in:
committed by
Keavon Chambers
parent
ef93f8442a
commit
a4793fb284
@@ -198,7 +198,7 @@ mod test {
|
||||
#[test]
|
||||
fn push_node() {
|
||||
let mut tree = BorrowTree::default();
|
||||
let val_1_protonode = ProtoNode::value(ConstructionArgs::Value(TaggedValue::U32(2u32)));
|
||||
let val_1_protonode = ProtoNode::value(ConstructionArgs::Value(TaggedValue::U32(2u32)), vec![]);
|
||||
tree.push_node(0, val_1_protonode, &TypingContext::default()).unwrap();
|
||||
let _node = tree.get(0).unwrap();
|
||||
assert_eq!(tree.eval(0, ()), Some(2u32));
|
||||
|
||||
Reference in New Issue
Block a user