Lines Matching refs:node
156 for node in self.nodes.values():
157 yield from node.node_iter()
304 def __init__(self, node: Node, name: str):
308 node.dt._parse_error("'@' is only allowed in node names")
316 self.node: Node = node
386 .format(self.name, self.node.path, self.node.dt.filename,
407 .format(self.name, self.node.path, self.node.dt.filename,
426 .format(self.name, self.node.path, self.node.dt.filename,
446 .format(self.name, self.node.path, self.node.dt.filename,
472 .format(self.name, self.node.path, self.node.dt.filename,
496 .format(self.name, self.node.path, self.node.dt.filename,
499 return self.node.dt.phandle2node[int.from_bytes(self.value, "big")]
522 .format(self.name, self.node.path,
523 self.node.dt.filename, self))
525 return [self.node.dt.phandle2node[int.from_bytes(self.value[i:i + 4],
544 .format(self.name, self.node.path, self.node.dt.filename,
555 ret = self.node.dt.get_node(path)
836 def move_node(self, node: Node, new_path: str):
848 if node is self.root:
863 old_name = node.name
864 old_path = node.path
876 assert node.parent is not None
878 del node.parent.nodes[old_name]
879 node._name = new_name
880 node.parent = new_parent
881 new_parent.nodes[new_name] = node
937 node.path: Node(node.name, None, ret)
938 for node in self.node_iter()
948 for node in self.node_iter():
949 node_copy = path2node_copy[node.path]
951 parent = node.parent
957 for prop in node.props.values()
960 prop = node.props[prop_name]
970 for child_name, child_node in node.nodes.items()
973 node_copy.labels = node.labels[:]
975 node_copy._omit_if_no_ref = node._omit_if_no_ref
976 node_copy._is_referenced = node._is_referenced
997 node_copy = path2node_copy[prop.node.path]
1005 node_copy = path2node_copy[prop.node.path]
1109 node = self._ref2node(tok.val)
1112 self._parse_node(node)
1115 _append_no_dup(node.labels, label)
1133 def _parse_node(self, node): argument
1151 child = node.nodes.get(tok.val)
1156 child = Node(name=tok.val, parent=node, dt=self)
1165 node.nodes[child.name] = child
1175 prop = node._get_prop(tok.val)
1190 if tok2.val in node.nodes:
1191 node.nodes[tok2.val]._del()
1198 node.props.pop(tok2.val, None)
1385 def _node_phandle(self, node): argument
1392 if "phandle" in node.props:
1393 phandle_prop = node.props["phandle"]
1395 phandle_prop = Property(node, "phandle")
1403 self.phandle2node[phandle_i] = node
1406 node.props["phandle"] = phandle_prop
1746 for node in self.node_iter():
1747 if s in node.labels:
1748 return node
1762 for node in self.node_iter():
1763 phandle = node.props.get("phandle")
1774 if self._ref2node(ref) is node:
1799 self.phandle2node[phandle_val] = node
1807 for node in self.node_iter():
1810 for prop in tuple(node.props.values()):
1893 for node in tuple(self.node_iter()):
1894 if node._omit_if_no_ref and not node._is_referenced:
1895 node._del()
1904 for node in self.node_iter():
1905 for label in node.labels:
1906 label2things[label].add(node)
1907 self.label2node[label] = node
1909 for prop in node.props.values():