A PLC target now gets a code graph. Before this, PLC targets skipped the
graph phase entirely.
Nodes:
- A PROGRAM is a module and an entry point.
- A FUNCTION_BLOCK is a class.
- A FUNCTION is a function.
Edges:
- A variable whose type is a function block is a type reference to it.
- A call through an instance is a call to its type.
- Calls by name are calls.
- Standard blocks such as TON have no node, so their edges are dropped.
How it fits together:
- The PLC module reads each tree once, and both the findings and the
graph come from that read.
- The engine gets a public assemble step for nodes parsed outside the
graph crate, and FileGraph is public with line-based adders.
- One build function takes a tree or a PLC project's POUs. The scan
uses it, and so does the explorer's manual rebuild, which would
otherwise replace a PLC target's graph with file nodes only.
POU spans:
- A POU records the line of its END_ keyword.
- A PLCopen POU spans its <pou> element in the XML. Its statements keep
their synthetic lines, so finding lines and fingerprints don't change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>